Class: Ritsu::SrcFiles::TargetCmakeLists::Template
- Defined in:
- lib/ritsu/src_files/target_cmake_lists.rb,
lib/ritsu/ext/qt/src_files/target_cmake_lists.rb,
lib/ritsu/ext/cuda/src_files/target_cmake_lists.rb
Direct Known Subclasses
ExecutableCmakeLists::Template, SharedLibraryCmakeLists::Template, StaticLibraryCmakeLists::Template
Instance Attribute Summary collapse
-
#cuda_compile_template ⇒ Object
readonly
Returns the value of attribute cuda_compile_template.
-
#cuda_include_directories_template ⇒ Object
readonly
Returns the value of attribute cuda_include_directories_template.
-
#custom_commands_template ⇒ Object
readonly
Returns the value of attribute custom_commands_template.
-
#dependencies_template ⇒ Object
readonly
Returns the value of attribute dependencies_template.
-
#install_template ⇒ Object
readonly
Returns the value of attribute install_template.
-
#libraries_template ⇒ Object
readonly
Returns the value of attribute libraries_template.
-
#qt_moc_template ⇒ Object
readonly
Returns the value of attribute qt_moc_template.
-
#qt_ui_template ⇒ Object
readonly
Returns the value of attribute qt_ui_template.
-
#source_files_template ⇒ Object
readonly
Returns the value of attribute source_files_template.
-
#target ⇒ Object
readonly
Returns the value of attribute target.
Attributes included from BlockMixin
#contents, #id, #indent_length, #indent_level, #local_indentation
Instance Method Summary collapse
-
#initialize(target, id = nil) ⇒ Template
constructor
A new instance of Template.
-
#initialize_before_cuda ⇒ Template
A new instance of Template.
-
#initialize_before_qt ⇒ Template
A new instance of Template.
- #position_to_insert(block, new_block) ⇒ Object
- #position_to_insert_before_cuda ⇒ Object
- #position_to_insert_before_qt ⇒ Object
Methods included from TemplatePolicies::FlexibleBlockMatchingAndCreateMissingBlockButLeaveUserTextBe
Methods included from TemplatePolicies::FlexibleBlockMatching
Methods inherited from Template
#add_content, #add_template, #child_template_with_id, #child_template_with_id_position, #child_templates, #create_block, #update_block
Methods included from BlockMixin
#add_line, #add_new_line, #block_structure?, #clear_contents, #indent, #initialize_block_mixin, #outdent
Constructor Details
#initialize(target, id = nil) ⇒ Template
Returns a new instance of Template.
150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 |
# File 'lib/ritsu/src_files/target_cmake_lists.rb', line 150 def initialize(target, id = nil) super(id) @target = target @libraries_template = LibrariesTemplate.new(@target) contents << @libraries_template contents << "" @custom_commands_template = CustomCommandsTemplate.new(@target) contents << @custom_commands_template contents << "" @source_files_template = SourceFilesTemplate.new(@target) contents << @source_files_template contents << "" @dependencies_template = DependenciesTemplate.new(@target) contents << @dependencies_template contents << "" @install_template = InstallTemplate.new(@target) contents << @install_template end |
Instance Attribute Details
#cuda_compile_template ⇒ Object (readonly)
Returns the value of attribute cuda_compile_template.
77 78 79 |
# File 'lib/ritsu/ext/cuda/src_files/target_cmake_lists.rb', line 77 def cuda_compile_template @cuda_compile_template end |
#cuda_include_directories_template ⇒ Object (readonly)
Returns the value of attribute cuda_include_directories_template.
78 79 80 |
# File 'lib/ritsu/ext/cuda/src_files/target_cmake_lists.rb', line 78 def cuda_include_directories_template @cuda_include_directories_template end |
#custom_commands_template ⇒ Object (readonly)
Returns the value of attribute custom_commands_template.
145 146 147 |
# File 'lib/ritsu/src_files/target_cmake_lists.rb', line 145 def custom_commands_template @custom_commands_template end |
#dependencies_template ⇒ Object (readonly)
Returns the value of attribute dependencies_template.
147 148 149 |
# File 'lib/ritsu/src_files/target_cmake_lists.rb', line 147 def dependencies_template @dependencies_template end |
#install_template ⇒ Object (readonly)
Returns the value of attribute install_template.
148 149 150 |
# File 'lib/ritsu/src_files/target_cmake_lists.rb', line 148 def install_template @install_template end |
#libraries_template ⇒ Object (readonly)
Returns the value of attribute libraries_template.
144 145 146 |
# File 'lib/ritsu/src_files/target_cmake_lists.rb', line 144 def libraries_template @libraries_template end |
#qt_moc_template ⇒ Object (readonly)
Returns the value of attribute qt_moc_template.
76 77 78 |
# File 'lib/ritsu/ext/qt/src_files/target_cmake_lists.rb', line 76 def qt_moc_template @qt_moc_template end |
#qt_ui_template ⇒ Object (readonly)
Returns the value of attribute qt_ui_template.
75 76 77 |
# File 'lib/ritsu/ext/qt/src_files/target_cmake_lists.rb', line 75 def qt_ui_template @qt_ui_template end |
#source_files_template ⇒ Object (readonly)
Returns the value of attribute source_files_template.
146 147 148 |
# File 'lib/ritsu/src_files/target_cmake_lists.rb', line 146 def source_files_template @source_files_template end |
#target ⇒ Object (readonly)
Returns the value of attribute target.
143 144 145 |
# File 'lib/ritsu/src_files/target_cmake_lists.rb', line 143 def target @target end |
Instance Method Details
#initialize_before_cuda ⇒ Template
Returns a new instance of Template.
80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 |
# File 'lib/ritsu/ext/cuda/src_files/target_cmake_lists.rb', line 80 def initialize(target, id = nil) super(id) @target = target @libraries_template = LibrariesTemplate.new(@target) contents << @libraries_template contents << "" @custom_commands_template = CustomCommandsTemplate.new(@target) contents << @custom_commands_template contents << "" @source_files_template = SourceFilesTemplate.new(@target) contents << @source_files_template contents << "" @dependencies_template = DependenciesTemplate.new(@target) contents << @dependencies_template contents << "" @install_template = InstallTemplate.new(@target) contents << @install_template end |
#initialize_before_qt ⇒ Template
Returns a new instance of Template.
78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 |
# File 'lib/ritsu/ext/qt/src_files/target_cmake_lists.rb', line 78 def initialize(target, id = nil) super(id) @target = target @libraries_template = LibrariesTemplate.new(@target) contents << @libraries_template contents << "" @custom_commands_template = CustomCommandsTemplate.new(@target) contents << @custom_commands_template contents << "" @source_files_template = SourceFilesTemplate.new(@target) contents << @source_files_template contents << "" @dependencies_template = DependenciesTemplate.new(@target) contents << @dependencies_template contents << "" @install_template = InstallTemplate.new(@target) contents << @install_template end |
#position_to_insert(block, new_block) ⇒ Object
174 175 176 |
# File 'lib/ritsu/src_files/target_cmake_lists.rb', line 174 def position_to_insert(block, new_block) block.contents.length end |
#position_to_insert_before_cuda ⇒ Object
99 100 101 |
# File 'lib/ritsu/ext/cuda/src_files/target_cmake_lists.rb', line 99 def position_to_insert(block, new_block) block.contents.length end |
#position_to_insert_before_qt ⇒ Object
93 94 95 |
# File 'lib/ritsu/ext/qt/src_files/target_cmake_lists.rb', line 93 def position_to_insert(block, new_block) block.contents.length end |