Version | 1.5.0 |
---|
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.
- Preface
- Elements and types in the ACT-IDL
- Appendix A. XSD Schema of ACT-IDL
- Appendix B. Example of ACT-IDL
Except where otherwise noted, syntax descriptions are expressed in the ABNF format as defined in RFC 4234.
Glossary terms are formatted like this.
Syntax descriptions and code are formatted as Markdown code blocks.
Replaceable items, that is, an item intended to be replaced by a value, are formatted in monospace cursive
type.
Notes are formatted as follows:
Note: This is a note.
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:
- MUST. This word, or the adjective "REQUIRED," means that the item is an absolute requirement of the specification.
- 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.
- MAY. This word, or the adjective "OPTIONAL," means that this item is truly optional.
Element <component> of type CT_Component
Name | Type | Use | Default | Annotation |
---|---|---|---|---|
libraryname | ST_LibraryName | required | Specifies the name of the component. Can contain spaces. | |
namespace | ST_NameSpace | required | Specifies the namespace for the components's functionality. | |
copyright | xs:string | required | The legal copyright holder. | |
basename | ST_BaseName | required | The basename will be used as prefix for generated filenames and all sorts of identifiers in the generated source code. | |
version | ST_Version | required | The semantic version of this component. | |
year | ST_Year | optional | the current year | The year associcated with the copyright. |
@anyAttribute |
It is RECOMMENDED that components generated with ACT follow the semantic versioning scheme. The "version" attribute encodes the semantic version of this component. Major, Minor and Micro-version info MUST be included. Pre-release information and build information MAY be included.
The <component> element is the root element of a ACT-IDL file. There MUST be exactly one <component> element in a ACT-IDL file. A component MUST have exactly one child license element, one child bindings element, one child implementations element, one child errors element and one child global element.
The names of the <struct>-, <enum>-, <functiontype>- and <class>-elements MUST be unique within the <component>.
Note: Regarding the "uniqueness" of attributes of type xs:string. Within this specification strings are considered equal regardless of the case of the individual letters.
Element <license> of type CT_License
The <license> element contains a list of at least one child line element. The license lines will be included as comments at the start of all generated source code files.
Element <line> of type CT_LicenseLine
Name | Type | Use | Default | Annotation |
---|---|---|---|---|
value | xs:string | required | A line of the license. |
Element <bindings> of type CT_BindingList
The CT_BindingList type contains a list of binding elements. The <binding> elements in the <bindings> element determine the language bindings that will be generated.
Element <implementations> of type CT_ImplementationsList
The CT_ImplementationsList type contains a list of implementation elements. The <implementation> elements in the <implementations> element determine the languages for which implementation stubs will be generated.
Element <binding>
Element <implmentation>
of type CT_Export
Name | Type | Use | Default | Annotation |
---|---|---|---|---|
language | ST_Language | required | The programming langugage of this export. | |
indentation | ST_Indentation | optional | 4spaces | Which string should be used to denote a single level of indentation in the generated source code files. |
stubidentifier | ST_StubIdentifier | optional | "" | Generated sources files of this export will follow the naming schme "...${BaseName}_${stubidentifier}...". Only used in <implementation> right now. |
classidentifier | ST_ClassIdentifier | optional | "" | Generated classes of this export will follow the naming schme "...${ClassIdentifier}_${ClassName}...". The only binding that supports this are the C++-bindings. |
Element <global> of type CT_Global
Name | Type | Use | Default | Annotation |
---|---|---|---|---|
baseclassname | ST_Name | required | Specifies the name of a class that is the base class for all classes of the generated component. | |
releasemethod | ST_Name | required | Specifies the name of the method used to release a class instance owned by the generated component. | |
versionmethod | ST_Name | required | Specifies the name of the method used to obtain the major, minor and micro version of the component. | |
prereleasemethod | ST_Name | required | Specifies the name of the method used to obtain the prerelease information of the component. | |
buildinfomethod | ST_Name | required | Specifies the name of the method used to obtain the build information of the component. | |
errormethod | ST_Name | required | Specifies the name of the method used to query the last error that occured during the call of class's method. | |
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. |
The <global> element contains a list of method elements that define the exported global functions of the component. The names of the <method> elements MUST be unique within the <global> element.
The baseclassname
-attribute must be the name of a <class> element within the components list of classes.
This class will be the base class for all classes of the generated component.
The releasemethod
-attribute must be the name of a <method> within the <global> element of a component that has exactly one parameter with type="class"
, class="BaseClass"
and pass="in"
.
The versionmethod
-attribute must be the name of a <method> within the <global> element of a component that has exactly three parameters. The three parameters MUST be of type type="uint32"
and pass="out"
.
The prereleasemethod
-attribute is optional an can be the name of a <method> within the <global> element of a component that has two parameters.
The first parameter MUST be of type type="bool"
and pass="return"
, the second parameter MUST be of type type="string"
and pass="out"
.
The buildinfomethod
-attribute is optional an can be the name of a <method> within the <global> element of a component that has two parameters.
The first parameter MUST be of type type="bool"
and pass="return"
, the second parameter MUST be of type type="string"
and pass="out"
.
The errormethod
-attribute must be the name of a <method> within the <global> element of a method that has exactly three parameters:
type="class"
,class="$BASECLASSNAME"
andpass="in"
, where"$BASECLASSNAME"
is the value of thebaseclassname
attribute of the <global> element.type="string"
andpass="out"
: outputs the last error messagetype="bool"
andpass="return"
: returns the instance of the baseclass has an error.
If the journalmethod
attribute is given, it must be the name of a <method> within the <global> element of a method that has exactly one parameter with type="string"
and pass="in"
.
Note
type="handle"
is equivalent to type="class"
for backwards compatibility. It will be removed in a later version.
Element <class> of type CT_Class
Name | Type | Use | Default | Annotation |
---|---|---|---|---|
name | ST_Name | required | The name of this class. | |
parent | ST_Name | optional | The name of the parent class of this class. | |
description | ST_Description | optional | A description of this class. |
The <class> element contains a list of method elements that define the exported member functions of this class. The names of the <method> elements MUST be unique in this list.
If the parent
-attribute is empty, and the name of this class differs from the baseclassname
-attribute of the <global> element, baseclassname
will be considered as the parent class of this class.
A class MUST be defined in the list of <class> elements before it is used as parent-class of another class. This restiction rules out circular inheritance. Moreover, the default baseclassname
MUST be defined as the first <class> within the IDL-file.
of Complex type CT_FunctionType
Name | Type | Use | Default | Annotation |
---|---|---|---|---|
name | ST_Name | required | The name of this function type. | |
description | ST_Description | required | A description of this function type. |
The CT_FunctionType-type describes the signature of a function in the interface. Each element of type CT_FunctionType contains a list of param elements. The names of the param in this list MUST be unique. This list MUST contain zero or one param-elements with the pass-value "return".
The <functiontype>-element can be used to define callback functions into the consumer's code.
Element <param> of type CT_Param
Name | Type | Use | Default | Annotation |
---|---|---|---|---|
name | ST_Name | required | The name of this parameter. | |
description | ST_Description | required | A description of this parameter. | |
pass | ST_Pass | required | Specifies whether the parameter is passed "in", "out" or as "return"-value of the enclosing functiontype. | |
type | ST_Type | required | The type of this parameter. | |
class | ST_Name | optional | Required if the type is an ST_ComposedType |
Element <enum> of type CT_Enum
Name | Type | Use | Default | Annotation |
---|---|---|---|---|
name | ST_Name | required | The name of this Enumeration. |
The <enum> element defines an enumerated type (see https://en.wikipedia.org/wiki/Enumerated_type), i.e. a set of named values.
It contains a list of at least one option element.
The names as well as the values of the options in this list MUST be unique within a <enum> element.
Element <option> of type CT_Option
Name | Type | Use | Default | Annotation |
---|---|---|---|---|
name | ST_Name | required | The name of this option. | |
value | xs:nonNegativeInteger | required | The numerical value of this option. |
Element <struct> of type CT_Struct
Name | Type | Use | Default | Annotation |
---|---|---|---|---|
name | ST_Name | required | The name of this struct. |
The <struct> element defines a composite data type (see https://en.wikipedia.org/wiki/Composite_data_type).
It contains a list of at least one member element.
The names of the member elements MUST be unique within a struct element.
Element <member> of type CT_Member
Name | Type | Use | Default | Annotation |
---|---|---|---|---|
name | ST_Name | required | The name of this member. | |
type | ST_ScalarType | required | The scalar type of this member. | |
rows | xs:positiveInteger | optional | 1 | The number of rows of this member. |
columns | xs:positiveInteger | optional | 1 | The number of columns of this member. |
The <member> element defines a member (or "field") within a struct. Only ST_ScalarType is allowed within structs. 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 defined by setting the rows and colums attributes to the desired size of the array.
Element <errors> of type CT_ErrorList
The <errors> element contains a list of <error> elements. The names and codes of the <error> elements in this list MUST be unique within the <errors> element.
Each ACT-component MUST contain at least the following 8 error codes:
NOTIMPLEMENTED
, INVALIDPARAM
, INVALIDCAST
, BUFFERTOOSMALL
, GENERICEXCEPTION
, COULDNOTLOADLIBRARY
, COULDNOTFINDLIBRARYEXPORT
, INCOMPATIBLEBINARYVERSION
Element <error> of type CT_Error
Name | Type | Use | Default | Annotation |
---|---|---|---|---|
name | ST_ErrorName | required | The name of this error. | |
code | xs:positiveInteger | required | The numerical error code of this error. | |
description | ST_ErrorDescription | otpional | A short description of this error. |
The simple types of this specification encode features, concepts, data types, and naming rules used in or required by programming languages.
For now, please look the up in the ACT.xsd.
Supported types are:
bool
: denotes a boolean value (true
orfalse
). Although this can be encoded in a single bit, the thin C89-layer APIs generated by ACT will use an unsigned 8 bit value (auint8
in ACT terms) to encode a boolean value. A numerical value of0
encodesfalse
, all oher values encodetrue
. Implementations and bindings should use the definition of a boolean value that is native to the respective language of the implementation or binding.uint8
,uint16
,uint32
,uint64
: An unsigned integer vaules ranging from 0 - 28-1, 0 - 216-1, 0 - 232-1, 0 - 264-1, respectively.int8
,int16
,int32
,int64
: A signed integer vaules ranging from -27 - 27-1, -215 - 215-1, -231 - 231-1, -263 - 263-1, respectively.pointer
: An address in memory without knowledge of the kind of data that resides there. In C++, this corresponds to avoid*
.string
denotes a null-terminated string. If a component requires arbitrary strings that can contain null-characters, one should use the typebasicarray
of classuint8
.single
: Single precision floating point number.double
: Double precision floating point number.struct
: see 13. Structenum
: see 11. Enumbasicarray
: an array of ST_ScalarTypesenumarray
: an array of enumsstructarray
: an array of structshandle
: the identifier (address, unique identifier, hash, ...) of a class instance class instancefunctiontype
: see 9. Function Type
A subset of scalar or integral of ST_Type:
bool
, uint8
, uint16
, uint32
, uint64
, int8
, int16
, int32
, int64
, single
, double
, pointer
.
A subset of more complex types, or types composed of other ST_Types:
string
, enum
, basicarray
, enumarray
, structarray
, handle
, functiontype
See ACT.xsd
See libPrimes.xml