Class: MxxRu::Cpp::SourceSubdirObjPlacement
- Inherits:
-
ObjPlacement
- Object
- ObjPlacement
- MxxRu::Cpp::SourceSubdirObjPlacement
- Defined in:
- lib/mxx_ru/cpp/obj_placement.rb
Overview
The generator of folder name for an object file, using a subfolder with a fixed name in a folder with source file. Folder for lib, dll and exe files are not modified. get_obj and get_mswin_res methods are checking if result folder exists. If it’s not, they are trying to create it.
Instance Attribute Summary collapse
-
#subdir ⇒ Object
readonly
Returns the value of attribute subdir.
Instance Method Summary collapse
- #get_dll(source_path_name, toolset, target) ⇒ Object
- #get_exe(source_path_name, toolset, target) ⇒ Object
- #get_lib(source_path_name, toolset, target) ⇒ Object
- #get_mswin_res(source_path_name, toolset, target) ⇒ Object
- #get_obj(source_path_name, toolset, target) ⇒ Object
-
#initialize(a_subdir = "o") ⇒ SourceSubdirObjPlacement
constructor
A new instance of SourceSubdirObjPlacement.
Constructor Details
#initialize(a_subdir = "o") ⇒ SourceSubdirObjPlacement
Returns a new instance of SourceSubdirObjPlacement.
124 125 126 127 |
# File 'lib/mxx_ru/cpp/obj_placement.rb', line 124 def initialize( a_subdir = "o" ) # The name of subfolder, object files should be located in. @subdir = a_subdir.clone end |
Instance Attribute Details
#subdir ⇒ Object (readonly)
Returns the value of attribute subdir.
122 123 124 |
# File 'lib/mxx_ru/cpp/obj_placement.rb', line 122 def subdir @subdir end |
Instance Method Details
#get_dll(source_path_name, toolset, target) ⇒ Object
159 160 161 162 163 164 165 |
# File 'lib/mxx_ru/cpp/obj_placement.rb', line 159 def get_dll( source_path_name, toolset, target ) return String.new( source_path_name ) end |
#get_exe(source_path_name, toolset, target) ⇒ Object
167 168 169 170 171 172 173 |
# File 'lib/mxx_ru/cpp/obj_placement.rb', line 167 def get_exe( source_path_name, toolset, target ) return String.new( source_path_name ) end |
#get_lib(source_path_name, toolset, target) ⇒ Object
151 152 153 154 155 156 157 |
# File 'lib/mxx_ru/cpp/obj_placement.rb', line 151 def get_lib( source_path_name, toolset, target ) return String.new( source_path_name ) end |
#get_mswin_res(source_path_name, toolset, target) ⇒ Object
140 141 142 143 144 145 146 147 148 149 |
# File 'lib/mxx_ru/cpp/obj_placement.rb', line 140 def get_mswin_res( source_path_name, toolset, target ) result = File.join( source_path_name, subdir ) MxxRu::Util.ensure_path_exists( result ) return result end |
#get_obj(source_path_name, toolset, target) ⇒ Object
129 130 131 132 133 134 135 136 137 138 |
# File 'lib/mxx_ru/cpp/obj_placement.rb', line 129 def get_obj( source_path_name, toolset, target ) result = File.join( source_path_name, subdir ) MxxRu::Util.ensure_path_exists( result ) return result end |