Class: Parser::OutputFormat
- Inherits:
-
Object
- Object
- Parser::OutputFormat
- Defined in:
- lib/kuniri/parser/output_format.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#extension ⇒ Object
Returns the value of attribute extension.
-
#outputEngine ⇒ Object
Returns the value of attribute outputEngine.
-
#parserPath ⇒ Object
Returns the value of attribute parserPath.
Instance Method Summary collapse
- #aggregation_generate(pAggregation) ⇒ Object
- #attribute_generate(pAttribute) ⇒ Object
- #basic_structure_generate(pManager) ⇒ Object
- #class_generate(pClass) ⇒ Object
- #comment_generate(pComment) ⇒ Object
-
#create_all_data(pParser) ⇒ Object
Go through all the data, and generate the output.
- #extern_requirement_generate(pRequire) ⇒ Object
- #function_behaviour_generate(pElementName, pFunction) ⇒ Object
- #global_variable_generate(pGlobalVariable) ⇒ Object
- #inheritance_generate(pInheritance) ⇒ Object
- #module_generate(pModule) ⇒ Object
- #parameters_generate(pParameters) ⇒ Object
-
#set_path(pPath) ⇒ Object
Set path to save the output.
Instance Attribute Details
#extension ⇒ Object
Returns the value of attribute extension.
13 14 15 |
# File 'lib/kuniri/parser/output_format.rb', line 13 def extension @extension end |
#outputEngine ⇒ Object
Returns the value of attribute outputEngine.
11 12 13 |
# File 'lib/kuniri/parser/output_format.rb', line 11 def outputEngine @outputEngine end |
#parserPath ⇒ Object
Returns the value of attribute parserPath.
12 13 14 |
# File 'lib/kuniri/parser/output_format.rb', line 12 def parserPath @parserPath end |
Instance Method Details
#aggregation_generate(pAggregation) ⇒ Object
105 106 107 |
# File 'lib/kuniri/parser/output_format.rb', line 105 def aggregation_generate(pAggregation) raise NotImplementedError end |
#attribute_generate(pAttribute) ⇒ Object
77 78 79 |
# File 'lib/kuniri/parser/output_format.rb', line 77 def attribute_generate(pAttribute) raise NotImplementedError end |
#basic_structure_generate(pManager) ⇒ Object
93 94 95 |
# File 'lib/kuniri/parser/output_format.rb', line 93 def basic_structure_generate(pManager) raise NotImplementedError end |
#class_generate(pClass) ⇒ Object
65 66 67 |
# File 'lib/kuniri/parser/output_format.rb', line 65 def class_generate(pClass) raise NotImplementedError end |
#comment_generate(pComment) ⇒ Object
101 102 103 |
# File 'lib/kuniri/parser/output_format.rb', line 101 def comment_generate(pComment) raise NotImplementedError end |
#create_all_data(pParser) ⇒ Object
Go through all the data, and generate the output
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 |
# File 'lib/kuniri/parser/output_format.rb', line 24 def create_all_data(pParser) return nil unless pParser saveElementTo = "./" wrapper = self # Go through each file pParser.fileLanguage.each do |listOfFile| # Inspect each element listOfFile.fileElements.each do |singleElement| @outputEngine.kuniri do if (singleElement.extern_requirements.length() > 0) wrapper.extern_requirement_generate( singleElement.extern_requirements) end if (singleElement.modules.length() > 0) wrapper.module_generate(singleElement.modules) end #if (singleElement.global_variables.length() > 0) # wrapper.global_variable_generate( # singleElement.global_variables) #end if (singleElement.global_functions.length() > 0) singleElement.global_functions.each do |globalFunction| wrapper.function_behaviour_generate("functionData", globalFunction) end end if (singleElement.classes.length() > 0) wrapper.class_generate(singleElement.classes) end end saveElementTo = singleElement.name end write_file(saveElementTo, listOfFile.name) @outputEngine.reset_engine end end |
#extern_requirement_generate(pRequire) ⇒ Object
89 90 91 |
# File 'lib/kuniri/parser/output_format.rb', line 89 def extern_requirement_generate(pRequire) raise NotImplementedError end |
#function_behaviour_generate(pElementName, pFunction) ⇒ Object
81 82 83 |
# File 'lib/kuniri/parser/output_format.rb', line 81 def function_behaviour_generate(pElementName, pFunction) raise NotImplementedError end |
#global_variable_generate(pGlobalVariable) ⇒ Object
85 86 87 |
# File 'lib/kuniri/parser/output_format.rb', line 85 def global_variable_generate(pGlobalVariable) raise NotImplementedError end |
#inheritance_generate(pInheritance) ⇒ Object
69 70 71 |
# File 'lib/kuniri/parser/output_format.rb', line 69 def inheritance_generate(pInheritance) raise NotImplementedError end |
#module_generate(pModule) ⇒ Object
97 98 99 |
# File 'lib/kuniri/parser/output_format.rb', line 97 def module_generate(pModule) raise NotImplementedError end |
#parameters_generate(pParameters) ⇒ Object
73 74 75 |
# File 'lib/kuniri/parser/output_format.rb', line 73 def parameters_generate(pParameters) raise NotImplementedError end |
#set_path(pPath) ⇒ Object
Set path to save the output.
17 18 19 |
# File 'lib/kuniri/parser/output_format.rb', line 17 def set_path(pPath) @parserPath = pPath end |