Skip to content

Commit 28e4263

Browse files
Version 1.0.0
1 parent 52fe2d1 commit 28e4263

File tree

75 files changed

+13075
-2
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

75 files changed

+13075
-2
lines changed

.gitignore

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
*.cpp
2+
*.hpp
3+
*.h
4+
*.exe
5+
*.linux
6+
*.darwin
7+
*.exe
8+
*.c
9+
*.go
10+
11+
# Visual Studio Code
12+
debug
13+
.vscode
14+
15+
*_headers
16+
17+
Examples/*.xml

Documentation/IDL.md

Lines changed: 337 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,337 @@
1+
# ![ACT logo](images/ACT_logo_50px.png) Automatic Component Toolkit
2+
3+
## Specification of the Interface Description Language of the Automatic Component Toolkit (ACT-IDL)
4+
5+
6+
7+
| **Version** | 0.1.0 |
8+
| --- | --- |
9+
10+
## Disclaimer
11+
12+
THESE MATERIALS ARE PROVIDED "AS IS." The contributors expressly disclaim any warranties (express, implied, or otherwise), including implied warranties of merchantability, non-infringement, fitness for a particular purpose, or title, related to the materials. The entire risk as to implementing or otherwise using the materials is assumed by the implementer and user. IN NO EVENT WILL ANY MEMBER BE LIABLE TO ANY OTHER PARTY FOR LOST PROFITS OR ANY FORM OF INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER FROM ANY CAUSES OF ACTION OF ANY KIND WITH RESPECT TO THIS DELIVERABLE OR ITS GOVERNING AGREEMENT, WHETHER BASED ON BREACH OF CONTRACT, TORT (INCLUDING NEGLIGENCE), OR OTHERWISE, AND WHETHER OR NOT THE OTHER MEMBER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
13+
14+
## Table of Contents
15+
16+
- [Preface](#preface)
17+
* [Document Conventions](#document-conventions)
18+
* [Language Notes](#language-notes)
19+
- [Elements and types in the ACT-IDL](#elements-and-types-in-the-act-idl)
20+
* [1. Component](#1-component)
21+
* [2. License](#2-license)
22+
* [3. License Line](#3-license-line)
23+
* [4. Bindings](#4-bindings)
24+
* [5. Implementations](#5-implementations)
25+
* [6. Export](#6-export)
26+
* [7. Global](#7-global)
27+
* [8. Class](#8-class)
28+
* [9. Function Type](#9-function-type)
29+
* [10. Param](#10-param)
30+
* [11. Enum](#11-enum)
31+
* [12. Option](#12-option)
32+
* [13. Struct](#13-struct)
33+
* [14. Member](#14-member)
34+
* [15. Errors](#15-errors)
35+
* [16. Error](#16-error)
36+
* [17. Simple Types](#17-simple-types)
37+
- [Appendix A. XSD Schema of ACT-IDL](#appendix-a-xsd-schema-of-act-idl)
38+
- [Appendix B. Example of ACT-IDL](#appendix-b-example-of-act-idl)
39+
40+
# Preface
41+
42+
## Document Conventions
43+
44+
Except where otherwise noted, syntax descriptions are expressed in the ABNF format as defined in RFC 4234.
45+
46+
Glossary terms are formatted like _this_.
47+
48+
Syntax descriptions and code are formatted as `Markdown code blocks.`
49+
50+
Replaceable items, that is, an item intended to be replaced by a value, are formatted in _`monospace cursive`_ type.
51+
52+
Notes are formatted as follows:
53+
54+
>**Note:** This is a note.
55+
56+
## Language Notes
57+
58+
In this specification, the words that are used to define the significance of each requirement are written in uppercase. These words are used in accordance with their definitions in RFC 2119, and their respective meanings are reproduced below:
59+
60+
- _MUST._ This word, or the adjective "REQUIRED," means that the item is an absolute requirement of the specification.
61+
- _SHOULD._ This word, or the adjective "RECOMMENDED," means that there may exist valid reasons in particular circumstances to ignore this item, but the full implications should be understood and the case carefully weighed before choosing a different course.
62+
- _MAY._ This word, or the adjective "OPTIONAL," means that this item is truly optional.
63+
64+
65+
# Elements and types in the ACT-IDL
66+
67+
## 1. Component
68+
Element **\<component>** of type **CT\_Component**
69+
70+
![element component](images/element_component.png)
71+
72+
##### Attributes
73+
| Name | Type | Use | Default | Annotation |
74+
| --- | --- | --- | --- | --- |
75+
| libraryname | **ST\_LibraryName** | required | | Specifies the name of the component. Can contain spaces. |
76+
| namespace | **ST\_NameSpace** | required | | Specifies the namespace for the components's functionality. |
77+
| copyright | **xs:string** | required | | The legal copyright holder. |
78+
| basename | **ST\_BaseName** | required | | The basename will be used as prefix for generated filenames and all sorts of identifiers in the generated source code. |
79+
| year | **ST\_Year** | optional | the current year | The year associcated with the copyright. |
80+
| @anyAttribute | | | | |
81+
82+
The \<component> element is the root element of a ACT-IDL file.
83+
There MUST be exactly one \<component> element in a ACT-IDL file.
84+
A component MUST have exactly one child [license](#2-license) element,
85+
one child [bindings](#4-bindings) element,
86+
one child [implementations](#5-implementations) element,
87+
one child [errors](#15-errors) element and
88+
one child [global](#7-global) element.
89+
90+
The names of the \<struct>-, \<enum>-, \<functiontype>- and \<class>-elements MUST be unique within the \<component>.
91+
92+
>**Note:** Regarding the \"uniqueness\" of attributes of type **xs:string**.
93+
>Within this specification strings are considered equal regardless of the case of the individual letters.
94+
95+
## 2. License
96+
Element **\<license>** of type **CT\_License**
97+
98+
![element license](images/element_license.png)
99+
100+
The \<license> element contains a list of at least one child [license line](#3-license-line) element.
101+
The license lines will be included as comments at the start of all generated source code files.
102+
103+
## 3. License Line
104+
Element **\<licenseline>** of type **CT\_LicenseLine**
105+
106+
![element licenseline](images/element_licenseline.png)
107+
108+
##### Attributes
109+
| Name | Type | Use | Default | Annotation |
110+
| --- | --- | --- | --- | --- |
111+
| value | **xs:string** | required | | A line of the license. |
112+
113+
## 4. Bindings
114+
Element **\<bindings>** of type **CT\_BindingList**
115+
116+
![element bindings](images/element_bindings.png)
117+
118+
The CT\_BindingList type contains a list of [binding](#6-export) elements.
119+
The \<binding> elements in the \<bindings> element determine the language bindings that will be generated.
120+
121+
## 5. Implementations
122+
Element **\<implementations>** of type **CT\_ImplementationsList**
123+
124+
![element implementation](images/element_implementations.png)
125+
126+
The CT\_ImplementationsList type contains a list of [implementation](#6-export) elements.
127+
The \<implementation> elements in the \<implementations> element determine the languages for which implementation stubs will be generated.
128+
129+
## 6. Export
130+
Element **\<binding>**
131+
<br/>
132+
![element binding](images/element_binding.png)
133+
<br/>
134+
Element **\<implmentation>**
135+
<br/>
136+
![element implmentation](images/element_implementation.png)
137+
<br/>
138+
of type **CT\_Export**
139+
<br/>
140+
![type export](images/type_export.png)
141+
142+
143+
##### Attributes
144+
| Name | Type | Use | Default | Annotation |
145+
| --- | --- | --- | --- | --- |
146+
| language | **ST\_Language** | required | | The programming langugage of this export. |
147+
| indentation | **ST\_Indentation** | optional | 4spaces | Which string should be used to denote a single level of indentation in the generated source code files. |
148+
| stubidentifier | **ST\_StubIdentifier** | optional | "" | Generated sources files of this export will follow the naming schme "...${BaseName}_${stubidentifier}...". Only used in \<implementation> right now. |
149+
| classidentifier | **ST\_ClassIdentifier** | optional | "" | Generated classes of this export will follow the naming schme "...${ClassIdentifier}${NameSpace}_${ClassName}...". Only used in \<implementation> right now. |
150+
151+
## 7. Global
152+
Element **\<global>** of type **CT\_Global**
153+
154+
![element global](images/element_global.png)
155+
156+
##### Attributes
157+
| Name | Type | Use | Default | Annotation |
158+
| --- | --- | --- | --- | --- |
159+
| releasemethod | **ST\_Name** | required | | Specifies the name of the method used to release a class instance owned by the generated component. |
160+
| versionmethod | **ST\_Name** | required | | Specifies the name of the method used to obtain the semantic version of the component. |
161+
| journalmethod | **ST\_Name** | optional | | Specifies the name of the method used to set the journal file. If ommitted, journalling will not be built into the component. |
162+
163+
The \<global> element contains a list of [method](#9-function-type) elements that define the exported global functions of the component.
164+
The names of the \<method> elements MUST be unique within the \<global> element.
165+
166+
TODO: explanation of siganture of release and version method.
167+
168+
## 8. Class
169+
Element **\<class>** of type **CT\_Class**
170+
171+
![element class](images/element_class.png)
172+
173+
##### Attributes
174+
| Name | Type | Use | Default | Annotation |
175+
| --- | --- | --- | --- | --- |
176+
| name | **ST\_Name** | required | | The name of this class. |
177+
| parent | **ST\_Name** | optional | | The name of the parent class of this class. |
178+
| description | **ST\_Description** | optional | | A description of this class. |
179+
180+
The \<class> element contains a list of [method](#9-function-type) elements that define the exported member functions of this class.
181+
The names of the \<method> elements MUST be unique in this list.
182+
183+
## 9. Function Type
184+
Element **\<functiontype>**
185+
<br/>
186+
![element functiontype](images/element_functiontype.png)
187+
188+
Element **\<method>**
189+
<br/>
190+
![element method](images/element_method.png)
191+
192+
of Complex type **CT\_FunctionType**
193+
<br/>
194+
![type functiontype](images/type_functiontype.png)
195+
196+
##### Attributes
197+
| Name | Type | Use | Default | Annotation |
198+
| --- | --- | --- | --- | --- |
199+
| name | **ST\_Name** | required | | The name of this function type. |
200+
| description | **ST\_Description** | required | | A description of this function type. |
201+
202+
The CT\_FunctionType-type describes the signature of a function in the interface.
203+
Each element of type CT\_FunctionType contains a list of [param](#10-param) elements.
204+
The names of the param in this list MUST be unique.
205+
This list MUST contain zero or one param-elements with the pass-value \"return\".
206+
207+
The \<functiontype>-element can be used to define callback functions into the consumer's code.
208+
209+
## 10. Param
210+
Element **\<param>** of type **CT\_Param**
211+
212+
![element param](images/element_param.png)
213+
214+
##### Attributes
215+
| Name | Type | Use | Default | Annotation |
216+
| --- | --- | --- | --- | --- |
217+
| name | **ST\_Name** | required | | The name of this parameter. |
218+
| description | **ST\_Description** | required | | A description of this parameter. |
219+
| pass | **ST\_Pass** | required | | Specifies whether the parameter is passed "in", "out" or as "return"-value of the enclosing functiontype. |
220+
| type | **ST\_Type** | required | | The type of this parameter. |
221+
| class | **ST\_Name** | optional | | Required if the type is an [**ST\_ComposedType**](#173-composedtype) |
222+
223+
224+
## 11. Enum
225+
Element **\<enum>** of type **CT\_Enum**
226+
227+
![element enum](images/element_enum.png)
228+
229+
##### Attributes
230+
| Name | Type | Use | Default | Annotation |
231+
| --- | --- | --- | --- | --- |
232+
| name | **ST\_Name** | required | | The name of this Enumeration. |
233+
234+
The \<enum> element defines an enumerated type (see https://en.wikipedia.org/wiki/Enumerated_type), i.e. a set of named values.<br/>
235+
It contains a list of at least one [option](#12-option) element.
236+
The names as well as the values of the options in this list MUST be unique within a \<enum> element.
237+
238+
239+
## 12. Option
240+
Element **\<option>** of type **CT\_Option**
241+
242+
![element option](images/element_option.png)
243+
244+
##### Attributes
245+
| Name | Type | Use | Default | Annotation |
246+
| --- | --- | --- | --- | --- |
247+
| name | **ST\_Name** | required | | The name of this option. |
248+
| value | **xs:nonNegativeInteger** | required | | The numerical value of this option. |
249+
250+
251+
## 13. Struct
252+
Element **\<struct>** of type **CT\_Struct**
253+
254+
![element struct](images/element_struct.png)
255+
256+
##### Attributes
257+
| Name | Type | Use | Default | Annotation |
258+
| --- | --- | --- | --- | --- |
259+
| name | **ST\_Name** | required | | The name of this struct. |
260+
261+
The \<struct> element defines a composite data type (see https://en.wikipedia.org/wiki/Composite_data_type). <br/>
262+
It contains a list of at least one [member](#14-member) element.
263+
The names of the member elements MUST be unique within a struct element.
264+
265+
266+
## 14. Member
267+
Element **\<member>** of type **CT\_Member**
268+
269+
![element member](images/element_member.png)
270+
271+
##### Attributes
272+
| Name | Type | Use | Default | Annotation |
273+
| --- | --- | --- | --- | --- |
274+
| name | **ST\_Name** | required | | The name of this member. |
275+
| type | **ST\_ScalarType** | required | | The scalar type of this member. |
276+
| rows | **xs:positiveInteger** | optional | 1 | The number of rows of this member. |
277+
| columns | **xs:positiveInteger** | optional | 1 | The number of columns of this member. |
278+
279+
The \<member> element defines a member (or "field") within a struct. Only [**ST\_ScalarType**](#172-scalartype) is allowed within structs.
280+
By default, the member defines a single value of its type within the enclusing struct. One- or two-dimensional arrays of fixed size can be
281+
defined by setting the rows and colums attributes to the desired size of the array.
282+
283+
284+
## 15. Errors
285+
Element **\<errors>** of type **CT\_ErrorList**
286+
287+
![element errors](images/element_errors.png)
288+
289+
The \<errors> element contains a list of [\<error>](#16-error) elements.
290+
The names and codes of the \<error> elements in this list MUST be unique within the \<errors> element.
291+
292+
293+
## 16. Error
294+
Element **\<error>** of type **CT\_Error**
295+
296+
![element error](images/element_error.png)
297+
298+
##### Attributes
299+
| Name | Type | Use | Default | Annotation |
300+
| --- | --- | --- | --- | --- |
301+
| name | **ST\_ErrorName** | required | | The name of this error. |
302+
| code | **xs:positiveInteger** | required | | The numerical error code of this error. |
303+
| description | **ST\_ErrorDescription** | otpional | | A short description of this error. |
304+
305+
306+
## 17. Simple Types
307+
The simple types of this specification encode features, concepts, data types,
308+
and naming rules used in or required by programming languages.
309+
310+
For now, please look the up in the [ACT.xsd](../Source/ACT.xsd).
311+
TODO: add all simple types here.
312+
313+
### 17.1 Type
314+
### 17.2 ScalarType
315+
### 17.3 ComposedType
316+
### 17.4 Name
317+
### 17.5 Description
318+
### 17.6 ErrorName
319+
### 17.7 ErrorDescription
320+
### 17.8 Pass
321+
### 17.9 Language
322+
### 17.10 Indentation
323+
### 17.11 Year
324+
### 17.12 Version
325+
### 17.13 Stub Identifier
326+
### 17.14 Class Identifier
327+
### 17.16 NameSpace
328+
### 17.15 Library Name
329+
### 17.16 Base Name
330+
331+
332+
# Appendix A. XSD Schema of ACT-IDL
333+
See [ACT.xsd](../Source/ACT.xsd).
334+
TODO: include the .xsds content here.
335+
336+
# Appendix B. Example of ACT-IDL
337+
dolor sit amen
3.5 KB
Loading

Documentation/images/O.png

553 Bytes
Loading

Documentation/images/O32.png

959 Bytes
Loading

Documentation/images/Tick.png

588 Bytes
Loading

Documentation/images/Tick32.png

968 Bytes
Loading

Documentation/images/X.png

419 Bytes
Loading

Documentation/images/X32.png

548 Bytes
Loading
4.32 KB
Loading
35.6 KB
Loading
22.9 KB
Loading
46.5 KB
Loading

Documentation/images/element_enum.png

19.7 KB
Loading
15.8 KB
Loading
18.1 KB
Loading
4.63 KB
Loading
26.1 KB
Loading
4.27 KB
Loading
19.7 KB
Loading
17.1 KB
Loading
11.3 KB
Loading
19.9 KB
Loading
4.06 KB
Loading
14.5 KB
Loading
17.2 KB
Loading
20.8 KB
Loading

Documentation/images/type_export.png

15.5 KB
Loading
19.2 KB
Loading

Examples/Numbers/Project/.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
build*
2+
_build*
3+

0 commit comments

Comments
 (0)