easy-swig 1.0 → 1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +8 -8
  2. data/README.md +90 -9
  3. metadata +4 -5
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- MDNkNmY2ZmU4YTlkM2Y1YTFmYTA0ZWE2NTc3MmE3NWQ0ZjRhMmE5Yg==
4
+ MWJjYTI1Y2Q1Zjg5ZjhmZDcwZmM4OTY4ZDdlZDRhNGFkZjkzYTc4OQ==
5
5
  data.tar.gz: !binary |-
6
- ODE0YmIxYTM1MGU5NTU1YzQ5ZjcwMzliMDBkNjk5ZDY3ZjA5ZmQ5OQ==
6
+ YWYyMThiYTg5NmEyZjczMmNmMjZmYjE5NTU3NzQ4OTRkZDJiMjQ0OQ==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- M2E2NDljMzMxZThlZWQ1YzdkYTE5OGJjZGExOTE0ODMxOTc0MjU3Mjc3NTdl
10
- MGRmZDE2N2UyY2E5OTM5OWMxNzYwYzU3OWE5YmFkZTliYTE0ZTE4YzIyNmRi
11
- N2QyMTQ2NGEwZDU1OGIxOWZlMTExMmJlMDFmZjA5YmVkYmRlMDM=
9
+ NmI1ZTgwOTgxZGViNzc3MTFkYTkwZWI5NzUwMDYzNjYzMDJmMzYwMTZhY2Rk
10
+ MjhjYzcwMmIzODM3YTdiNWRlMDhkYjEyMDBhMjVmMzhkYzVmM2ZhNTUyZGJj
11
+ NGNiNzhhZjJhMGE0MGE5ZDIzNzQyNjdlYjFkYmE4NjAwYTRkNzA=
12
12
  data.tar.gz: !binary |-
13
- OWQwZWQ2MTVmZTFhMWJhNDZmY2NiYzdlY2NhNDBhN2VkYzU0MzMzMWI1ZmJk
14
- OGJiODFjMzIwOWI2NTE4YjZmMGY1NTliNWVlZTBkZDAyMTNlZDMzNWMzNjIy
15
- MTQ1YjUzZDU2YWNjNzY0NDBmOGZhZTBmOTRhODA5MzUzOGE0MjE=
13
+ OGNiMzc2NzZhNjNiMGJmNTEzOTU4MzgyZGM3ZTZkZDBmMTYzYzgxMTVhMTFl
14
+ NzkxMDcxMDFhZTU2MTIyMjY2NDZmYmE3MDNhZmFkZTllZmZlNmM3Njg4OGQ3
15
+ NTE2ZThiMGY5NWI0NGU3NjNkMzZhYWI3YTdlZWRhNWNkYzU2MDg=
data/README.md CHANGED
@@ -13,14 +13,14 @@ Installation and Use
13
13
 
14
14
  EasySwig relies on the Doxyparser gem (https://github.com/davfuenmayor/ruby-doxygen-parser) which on his part depends on Nokogiri (http://nokogiri.org) and Doxygen (www.doxygen.org). Refer to Doxyparser for more information.
15
15
 
16
- To actually generate wrappers you may also want to install SWIG (http://www.swig.org/). Currently only SWIG version 2.0.11 is supported. There is ongoing work on 3.0.0 version support.
16
+ To actually generate wrappers you may also want to install SWIG (http://www.swig.org/). SWIG versions 2.x and 3.x are supported.
17
17
 
18
18
 
19
19
  For using EasySwig you need to create a folder with the following structure:
20
20
  (it is recommended to use the subfolder 'spec/Example' as a template)
21
21
 
22
22
  - A subfolder named 'include' with the header files you want to wrap.
23
- - A CSV file named 'api.csv' with the name of the namespace you want to wrap and which classes to wrap/ignore.
23
+ - A CSV file named 'api.csv' with the name of the namespace you want to wrap and which members to wrap/ignore. See below.
24
24
  - An optional file (optionally named custom_config.i) with %include statements for those header files found in subdirectories (otherwise SWIG won't find them)
25
25
 
26
26
  There are three operations you can do with EasySwig: 'doxygen', 'generate' and 'swig'
@@ -62,25 +62,106 @@ Or with some configuration:
62
62
  EasySwig::swig(config)
63
63
  ```
64
64
 
65
- You can consult the documentation (generated with YARD) in doc/ subfolder for more information about the EasySwig::Config class and its default values.
65
+ You can consult the documentation (generated with YARD: yard doc) in doc/ subfolder for more information about the EasySwig::Config class and its default values.
66
66
 
67
67
 
68
68
  As CLI
69
69
  ----------
70
70
 
71
- Download (or clone) this repository. An illustrative example of how to use EasySwig as CLI-Tool is found in subfolder spec/Example.
71
+ Download (or clone) this repository. An illustrative example of how to use EasySwig as CLI-Tool is found in subfolder Example/
72
72
  Open the corresponding README file and follow the instructions. This Example project can also be used as template for your own wrappers.
73
73
 
74
74
  ```shell
75
- cd spec/Example
75
+ cd Example
76
76
  # Displays command help. Useful for parameter syntax, options and default values
77
- sh ../../bin/easyswig.sh -h
77
+ sh ../bin/easyswig.sh -h
78
78
  # Generate Doxygen XML Intermediate representation. Found in generated subfolder: 'easy-swig/doxygen'
79
- sh ../../bin/easyswig.sh doxygen
79
+ sh ../bin/easyswig.sh doxygen
80
80
  # Generate SWIG Interface Files (.i). Found in generated subfolder: 'easy-swig/generate'
81
- sh ../../bin/easyswig.sh generate
81
+ sh ../bin/easyswig.sh generate
82
82
  # Generate Wrappers using your installed version of SWIG. Found in generated subfolder: 'easy-swig/swig'
83
- sh ../../bin/easyswig.sh swig
83
+ sh ../bin/easyswig.sh swig
84
84
  ```
85
85
 
86
+ Selecting which members to wrap (namespaces/classes/functions/variables...)
87
+ ----------------------
88
+
89
+ EasySwig allows you to cherry-oick which members of a namespace to wrap and also offers some simple configuration. For this we make use of a CSV file
90
+ with following contents:
91
+
92
+ #namespace
93
+
94
+ target_name: Desired name of the Namespace in the Target Language (C#). If empty, 'basename' will be used
95
+ basename: Name of the C/C++ namespace. If empty, 'target_name' will be used
96
+ wrap_classes: Every class/struct in this namespace will be wrapped
97
+ wrap_functions: Every function outside any struct/class in this namespace will be wrapped
98
+ wrap_enums: Every enum outside any struct/class in this namespace will be wrapped
99
+ wrap_variables: Every variable outside any struct/class in this namespace will be wrapped
100
+ friend_support: Support for friend members will be active by default for all structs/classes inside this namespace
101
+ properties: Support for (C#) properties will be active by default for all structs/classes inside this namespace
102
+ partial: Every wrapper for structs/classes inside this namespace will be generated with the 'partial' C# keyword
103
+ nested_support: Support for Innerclasses when using SWIG 2.x (Unnecessary for versions newer than 3.0)
104
+
105
+ #function
106
+
107
+ target_name: Desired name of the function (relative to the given namespace) in the Target Language (C#). If empty, 'basename' will be used
108
+ basename: Name of the C/C++ function (relative to the given namespace). If empty, 'target_name' will be used
109
+ ignore: This member will be ignored. Useful in case it has been indirectly included by checking any of the parent's 'wrap_xxx' flags
110
+
111
+ #variable
112
+
113
+ target_name: Desired name of the global variable (relative to the given namespace) in the Target Language (C#). If empty, 'basename' will be used
114
+ basename: Name of the C/C++ global variable (relative to the given namespace). If empty, 'target_name' will be used
115
+ ignore: This member will be ignored. Useful in case it has been indirectly included by checking any of the parent's 'wrap_xxx' flags
116
+
117
+ #enum
118
+
119
+ target_name: Desired name of the enum (relative to the given namespace) in the Target Language (C#). If empty, 'basename' will be used
120
+ basename: Name of the C/C++ enum (relative to the given namespace). If empty, 'target_name' will be used
121
+ ignore: This member will be ignored. Useful in case it has been indirectly included by checking any of the parent's 'wrap_xxx' flags
122
+
123
+ #class
124
+
125
+ target_name: Desired name of the class/struct (relative to the given namespace) in the Target Language (C#). If empty, 'basename' will be used
126
+ basename: Name of the C/C++ class/struct (relative to the given namespace). If empty, 'target_name' will be used
127
+ ignore: This member will be ignored. Useful in case it has been indirectly included by checking any of the parent's 'wrap_xxx' flags
128
+ wrap_innerclasses: Every innerclass/innerstruct defined inside this class/struct will be wrapped
129
+ wrap_methods: Every method of this class/struct will be wrapped
130
+ wrap_enums: Every enum defined inside this class/struct will be wrapped
131
+ wrap_attributes: Every attribute of this class/struct will be wrapped
132
+ friend_support: Support for friend members is active
133
+ properties: Support for generating (C#) properties will be active by default for every getter/setter method defined in this class/struct
134
+ partial: Class will be generated with the 'partial' C# keyword
135
+ struct: Struct will be mapped as such in the target language (only C# - not yet supported )
136
+ nested_support: Support for Innerclasses when using SWIG 2.x (Unnecessary for versions newer than 3.0)
137
+
138
+ #method
139
+
140
+ target_name: Desired name of the method (relative to the last given class/struct) in the Target Language (C#). If empty, 'basename' will be used
141
+ basename: Name of the C/C++ method (relative to the last given class/struct). If empty, 'target_name' will be used
142
+ ignore: This member will be ignored. Useful in case it has been indirectly included by checking any of the parent's 'wrap_xxx' flags
143
+ properties: If this method is a getter/setter, a cooresponding property will be generated in the target language (C#)
144
+
145
+ #attribute
146
+
147
+ target_name: Desired name of the attribute (relative to the last given class/struct) in the Target Language (C#). If empty, 'basename' will be used
148
+ basename: Name of the C/C++ attribute (relative to the last given class/struct). If empty, 'target_name' will be used
149
+ ignore: This member will be ignored. Useful in case it has been indirectly included by checking any of the parent's 'wrap_xxx' flags
150
+
151
+ #innerenum
152
+
153
+ target_name: Desired name of the enum (relative to the last given class/struct) in the Target Language (C#). If empty, 'basename' will be used
154
+ basename: Name of the C/C++ enum (relative to the last given class/struct). If empty, 'target_name' will be used
155
+ ignore: This member will be ignored. Useful in case it has been indirectly included by checking any of the parent's 'wrap_xxx' flags
156
+
157
+ #innerclass
158
+
159
+ target_name: Desired name of the innerclass (relative to the last given class/struct) in the Target Language (C#). If empty, 'basename' will be used
160
+ basename: Name of the C/C++ innerclass (relative to the last given class/struct). If empty, 'target_name' will be used
161
+ ignore: This member will be ignored. Useful in case it has been indirectly included by checking any of the parent's 'wrap_xxx' flags
162
+ friend_support: Support for friend members is active
163
+ properties: Support for generating (C#) properties will be active by default for every getter/setter method defined in this class/struct
164
+ struct: Structs will be mapped as such in the target language (only C# - not yet supported )
165
+ nested_support: Support for Innerclasses when using SWIG 2.x (Unnecessary for versions newer than 3.0)
166
+
86
167
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: easy-swig
3
3
  version: !ruby/object:Gem::Version
4
- version: '1.0'
4
+ version: '1.1'
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Fuenmayor
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-05-02 00:00:00.000000000 Z
11
+ date: 2014-05-10 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: ! " \nLibrary and CLI-Tool for automatic generation wrappers for C/C++
14
14
  code using SWIG.\nThis is both a Ruby Gem and a CLI Tool. Feed it with a directory
@@ -19,9 +19,8 @@ description: ! " \nLibrary and CLI-Tool for automatic generation wrappers for C
19
19
  relies on the Doxyparser gem (https://github.com/davfuenmayor/ruby-doxygen-parser)
20
20
  which on his part depends on Nokogiri (http://nokogiri.org) and Doxygen (www.doxygen.org).
21
21
  Refer to Doxyparser for more information.\nFor using EasySwig you may also want
22
- to install SWIG (http://www.swig.org/). Currently only SWIG version 2.0.11 is supported.
23
- There is ongoing work on 3.0.0 version support.\n\nEasySwig supports currently
24
- only C#. There is ongoing work on other languages support.\n\n"
22
+ to install SWIG (http://www.swig.org/). SWIG versions 2.x and 3.x are supported.\n\nEasySwig
23
+ supports currently only C#. There is ongoing work on other languages support.\n\n"
25
24
  email:
26
25
  - davfuenmayor@gmail.com
27
26
  executables: []