Class: EasySwig::Config
- Inherits:
-
Object
- Object
- EasySwig::Config
- Defined in:
- lib/config.rb
Overview
Generation Settings
Instance Attribute Summary collapse
-
#csv_file ⇒ Object
- String
-
CSV configuration file input.
-
#custom_file ⇒ Object
- String
-
Custom .i file to be appended at the beginning of the generated .i target.
-
#default_dir ⇒ Object
- String
-
Working directory.
-
#doxy_dir ⇒ Object
- String
-
Directory generated by Doxygen (which include a /xml subdirectory for all XML files. Defaults to: path/to/working/dir/easy-swig/doxygen.
-
#generate_dir ⇒ Object
- String
-
Output directory for Easy-Swig generated .i file(s) aka.
-
#headers_dir ⇒ Object
- String
-
Directory for your project’s header files.
-
#html ⇒ Object
- String
-
Instructs Doxygen to also generate HTML documentation for the header files.
-
#includes_dir ⇒ Object
- Array<String>
-
System include directories.
-
#lang ⇒ Object
- String
-
Target language for SWIG.
-
#module_name ⇒ Object
- String
-
Name of the module.
-
#output_dir ⇒ Object
- String
-
Output directory for SWIG generated files.
-
#stl_support ⇒ Object
- String
-
Special support for the Standard Template Library.
-
#target_file ⇒ Object
- String
-
Target .i file as input for SWIG.
Instance Method Summary collapse
-
#initialize(default_dir = nil) ⇒ Config
constructor
Creates a new Configutation using the default values for a given directory.
- #set_defaults ⇒ Object
Constructor Details
#initialize(default_dir = nil) ⇒ Config
Creates a new Configutation using the default values for a given directory
36 37 38 39 |
# File 'lib/config.rb', line 36 def initialize(default_dir = nil) @default_dir = default_dir set_defaults end |
Instance Attribute Details
#csv_file ⇒ Object
- String
-
CSV configuration file input. Defaults to: path/to/working/dir/api.csv
14 15 16 |
# File 'lib/config.rb', line 14 def csv_file @csv_file end |
#custom_file ⇒ Object
- String
-
Custom .i file to be appended at the beginning of the generated .i target. Used for advanced configuration
Defaults to path/to/working/dir/custom_config.i
25 26 27 |
# File 'lib/config.rb', line 25 def custom_file @custom_file end |
#default_dir ⇒ Object
- String
-
Working directory. Defaults to current working directory
6 7 8 |
# File 'lib/config.rb', line 6 def default_dir @default_dir end |
#doxy_dir ⇒ Object
- String
-
Directory generated by Doxygen (which include a /xml subdirectory for all XML files. Defaults to: path/to/working/dir/easy-swig/doxygen
10 11 12 |
# File 'lib/config.rb', line 10 def doxy_dir @doxy_dir end |
#generate_dir ⇒ Object
- String
-
Output directory for Easy-Swig generated .i file(s) aka. ‘target’. Defaults to path/to/working/dir/easy-swig/generate
18 19 20 |
# File 'lib/config.rb', line 18 def generate_dir @generate_dir end |
#headers_dir ⇒ Object
- String
-
Directory for your project’s header files. Defaults to: path/to/working/dir/include
12 13 14 |
# File 'lib/config.rb', line 12 def headers_dir @headers_dir end |
#html ⇒ Object
- String
-
Instructs Doxygen to also generate HTML documentation for the header files. Defaults to nil (false)
20 21 22 |
# File 'lib/config.rb', line 20 def html @html end |
#includes_dir ⇒ Object
- Array<String>
-
System include directories. Defaults to Linux include directory: [“/usr/include”]
30 31 32 |
# File 'lib/config.rb', line 30 def includes_dir @includes_dir end |
#lang ⇒ Object
- String
-
Target language for SWIG. Defaults to ‘csharp’ (C#)
22 23 24 |
# File 'lib/config.rb', line 22 def lang @lang end |
#module_name ⇒ Object
- String
-
Name of the module. Used to name generated resources. Defaults to the name of the default (working) directory
8 9 10 |
# File 'lib/config.rb', line 8 def module_name @module_name end |
#output_dir ⇒ Object
- String
-
Output directory for SWIG generated files. Defaults to : path/to/working/dir/easy-swig/swig
16 17 18 |
# File 'lib/config.rb', line 16 def output_dir @output_dir end |
#stl_support ⇒ Object
- String
-
Special support for the Standard Template Library. Values ‘YES’/‘NO’ (defaults to ‘YES’)
32 33 34 |
# File 'lib/config.rb', line 32 def stl_support @stl_support end |
#target_file ⇒ Object
- String
-
Target .i file as input for SWIG. If a directory SWIG will be invoked once for every found .i file
Defaults to path/to/working/dir/easy-swig/generate/<MODULE_NAME>.i
28 29 30 |
# File 'lib/config.rb', line 28 def target_file @target_file end |
Instance Method Details
#set_defaults ⇒ Object
41 42 43 44 45 46 47 48 49 50 51 52 53 54 |
# File 'lib/config.rb', line 41 def set_defaults @default_dir ||= Dir.getwd @module_name ||= File.basename(@default_dir) @output_dir ||= "#{@default_dir}/easy-swig/swig" @doxy_dir ||= "#{@default_dir}/easy-swig/doxygen" @generate_dir ||= "#{@default_dir}/easy-swig/generate" @headers_dir ||= "#{@default_dir}/include" @csv_file ||= "#{@default_dir}/api.csv" @custom_file ||= "#{@default_dir}/custom_config.i" @lang ||= "csharp" @stl_support ||= 'YES' @target_file ||= "#{@default_dir}/easy-swig/generate/#{@lang}/#{@module_name}.i" @includes_dir ||= ["/usr/include"] end |