Skip to content

Commit

Permalink
Release/1.5.0 (Autodesk#44)
Browse files Browse the repository at this point in the history
* Add library location to search path (windows) (Autodesk#18)

* Add const and noexcept specifiers (Autodesk#19)

* Add const and noexcept specifiers

 - The function to query the error code from an exception should be
const noexcept.

* Add "const noexcept" in declaration of E%sException

* Remove uninitialized variable (Autodesk#25)

* Fixed release call in Pascal Bindings. (Autodesk#21)

* Issue22 (Autodesk#23)

* Fixed release call in Pascal Bindings.

* fixed init call of out bools and enums

* Out parameter was a mismatch for pascal struct out definition

* Fis issue in python binder for struct-in parameter

* Added Error Propagation to ACT

* Added Binding support for error messages

* Fixed Error Propagation

* Fixed Error Propagation

* Autogenerate error handling in implementation

* Use actual base-class throughout generation

* Replace WIN32 with _WIN32

* Avoid recursive calls to the ErrorMessageFunction

* Back to global error method

* Make CPPDynamic work again

* Make Pascal bindings work again

* Error propgation in Pascal-implementation

* Add missing include (pascal)

* Add Pascal Implementation of Primes

* Add CppDynamic-Example

* Add updated xml for Primes

* Add missing lpr

* Make Pascal Example work

* Add functionality to Primes Example

* Add Python example again

* Make pascal use 2spaces instead of 4

* Fix CPP bindings

* Make python use correct base class

* Update XSD and Documentation

* Add void pointer

* Fix typo in README

* Check component definition for required errors

* Bugfixes to error propagation

* Add rudimentary support for pointers in NodeJs and Go

* Fix base-class in cpp-dynamic-bindings

* Do not prefix binary-names with 'lib' on Unix systems

* Restrict values for class-parent

* ACT components now have prerelease- and build-info (Autodesk#28)

* ACT components now have prerelease and build-info

* Update documentation

* Update documentation and XSD

* Fix circular dependency in pascal implmenetation (Autodesk#30)

lib*_exception.pas and lib*_interfaces.pas had dependencies to each other.
The interface-block of both of the unis don't need the other one. Therefore putting the 'uses' into the implementation-block fixes the issue.

* Enforce CT_Member->Name to be a ST_Name

* Prepare Python bindings for PIP

* Issue 31: Array handling in NodeJS bindings (Autodesk#32)

* Issue 31: Array handling in NodeJS bindings

* fixed linux node compile problems

* Added Node Input Structs

* Fixed Node Generation Bugs

* Change loading of DLL in C++-dynamic

- Make C++-dynamic load via WChar-name
- require user to setup DLL-search-dir correctly

* Update Readme for NodeJS

* Update version

* Fix python-bindings

* Use type="class" instead of type="handle" (Autodesk#33)

* Fix type="class" in global section

* Issue31_Second_Pass (Autodesk#35)

* Added multiple return and out values, struct outs, bugfixes

* Make use of namespaces and scopes of definitions in C++ and Python (Autodesk#36)

* Simplify class, enum, and struct names for Python

* Simplify naming in C++-implementation

* Describe the thin layer of the hourglass with CPP-types instead of C-types (WIP)

* Use CPP-types in CPP-Dynamic (WIP)

* Make C++-bindings use C++ ABI-description

* Update Primes-Example

* Fix dynamic Cpp-binding

* Fix CDynamic

* Added Node Error Propagation (Autodesk#41)

* Added Node Error Propagation

* Added Node Error Propagation

* Updated Readme with capabilities

* Update development version

* Header only generation mode for C++ (Autodesk#43)

* Updated Readme with capabilities

* Added HeaderOnly C++ Mode

* Fixed code generation issues

* Limit to 2 C++ bindings: CppDynamic and Cpp (h-only)

* Remove unused code

* Add binding files for example

* Do not auto--create JournalMethod

* Update Tutorial.md for 1.5.0

* Update Primes Example Code

* Add Cpp-example again

* Update Interface version in examples

* Remove last path

* Update IDL version, fix link in tutorial

* Fix Tutorial for Linux

* Declare RC1

* Fix C-dynamic and NodeJS-binding

* Fix tutorial XMLs (Autodesk#46)

* Update Tutorial- and Readme

* Make separate functions for additional versioninfo

* Support classidentifier in C++-based bindings

* Update example, declare RC2

* Remove unused dllsuffix-attribute (Autodesk#45)

* C sharp bindings (Autodesk#47)

* Initial C# bindings

* First working version

* Added String Handling to CSharp Bindings

* Added Error Propagation to CSharp Bindings

* Reformat Code, update readme.md

* Added experimental array support to CSharp bindings

* Add generation of CSharp-Examples

* Update CSharp LibPrimes Example

* Fix structs + remove external dependency

* Fix formatting

* CSharp fix

* Update Documentation, ake csharp use byte for bool

* Fix bool parameters in CSharp

* Fix CSharp bool-in-parameter

* Update Documentation

* Update version + readme

* Fix Pascal-binding boolean return/out values

* Fix typo

* Add verpatch
  • Loading branch information
martinweismann authored Apr 10, 2019
1 parent 82b03e1 commit ba20316
Show file tree
Hide file tree
Showing 89 changed files with 8,511 additions and 5,492 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
*.exe
*.c
*.go
*.orig

# Visual Studio Code
debug
Expand Down
8 changes: 8 additions & 0 deletions Build/Readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
verpatch.exe is an amazing tool to change resource information in EXEs and DLLs

https://github.com/pavel-a/ddverpatch/releases

Call like this
```
verpatch.exe ..\act.exe /high /va 1.5.0 /pv "1.5.0-RC1+buildnumber-5" /s copyright "(c) 2018-2019 ACT Developers" /s desc "ACT is a code generator for software components" /s productName "Automatic Component Toolkit"
```
2 changes: 1 addition & 1 deletion Build/build.bat
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ set startingDir="%CD%"
set basepath="%~dp0"

cd %basepath%\..\Source
set Sources=actutils.go automaticcomponenttoolkit.go buildbindingcdynamic.go buildbindingcpp.go buildbindinggo.go buildbindingnode.go buildbindingpascal.go buildbindingpython.go buildimplementationcpp.go buildimplementationpascal.go componentdefinition.go componentdiff.go languagewriter.go languagec.go languagepascal.go
set Sources=actutils.go automaticcomponenttoolkit.go buildbindingccpp.go buildbindingcsharp.go buildbindinggo.go buildbindingnode.go buildbindingpascal.go buildbindingpython.go buildimplementationcpp.go buildimplementationpascal.go componentdefinition.go componentdiff.go languagewriter.go languagec.go languagecpp.go languagepascal.go
set GOARCH=amd64

set GOOS=windows
Expand Down
2 changes: 1 addition & 1 deletion Build/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ startingpath="$(pwd)"
basepath="$(cd "$(dirname "$0")" && pwd)"
cd "$basepath/../Source"

Sources="actutils.go automaticcomponenttoolkit.go buildbindingcdynamic.go buildbindingcpp.go buildbindinggo.go buildbindingnode.go buildbindingpascal.go buildbindingpython.go buildimplementationcpp.go buildimplementationpascal.go componentdefinition.go componentdiff.go languagewriter.go languagec.go languagepascal.go"
Sources="actutils.go automaticcomponenttoolkit.go buildbindingccpp.go buildbindingcsharp.go buildbindinggo.go buildbindingnode.go buildbindingpascal.go buildbindingpython.go buildimplementationcpp.go buildimplementationpascal.go componentdefinition.go componentdiff.go languagewriter.go languagec.go languagecpp.go languagepascal.go"
GOARCH="amd64"

echo "Build act.exe"
Expand Down
Binary file added Build/verpatch.exe
Binary file not shown.
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Contributions are welcome and we are looking for people that can improve existin
You can also contribute by reporting bugs in the [Issue tracker](../../issues), helping review pull requests, participate in discussions about issues and more.

## Filing issues
1. When filing an issue to report errors or problems, make sure to answer these five questions:
1. When filing an [issue](../../issues) to report errors or problems, make sure to answer these five questions:
1. Which version of ACT are you using?
Run <br/>`act.* -v`<br/> to print ACT's version.
2. Which operating system, programming language(s) and development tools (compiler/interpreter) are you using?
Expand Down
77 changes: 65 additions & 12 deletions Documentation/IDL.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@



| **Version** | 1.3.2 |
| **Version** | 1.5.0 |
| --- | --- |

## Disclaimer
Expand Down Expand Up @@ -76,10 +76,13 @@ Element **\<component>** of type **CT\_Component**
| 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 three digit vesion of this component. |
| 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](https://semver.org/).
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](#2-license) element,
Expand Down Expand Up @@ -147,7 +150,7 @@ of type **CT\_Export**
| 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}${NameSpace}_${ClassName}...". 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.|

## 7. Global
Element **\<global>** of type **CT\_Global**
Expand All @@ -157,18 +160,38 @@ Element **\<global>** of type **CT\_Global**
##### Attributes
| 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 semantic version of the 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](#9-function-type) elements that define the exported global functions of the component.
The names of the \<method> elements MUST be unique within the \<global> element.

The `releasemethod`-attribute must be the name of a \<method> within the \<global> element of a method that has exactly one parameter with `type="handle"`, `class="BaseClass"` and `pass="in"`.
The `versionmethod`-attribute must be the name of a \<method> within the \<global> element of a method that has exactly three parameters with `type="uint32"` and `pass="out"`.
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:
1. `type="class"`, `class="$BASECLASSNAME"` and `pass="in"`, where `"$BASECLASSNAME"` is the value of the `baseclassname` attribute of the \<global> element.
2. `type="string"` and `pass="out"`: outputs the last error message
3. `type="bool"` and `pass="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.

## 8. Class
Element **\<class>** of type **CT\_Class**

Expand All @@ -184,6 +207,10 @@ Element **\<class>** of type **CT\_Class**
The \<class> element contains a list of [method](#9-function-type) 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.

## 9. Function Type
Element **\<functiontype>**
<br/>
Expand Down Expand Up @@ -293,6 +320,9 @@ Element **\<errors>** of type **CT\_ErrorList**
The \<errors> element contains a list of [\<error>](#16-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`

## 16. Error
Element **\<error>** of type **CT\_Error**
Expand All @@ -312,18 +342,41 @@ 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](../Source/ACT.xsd).
TODO: add all simple types here.

### 17.1 Type
ST_Type `string` denotes a null-terminated string. If a component requires arbitrary strings that can contain null-characters, on should use the type `basicarray` of class `uint8`.
Supported types are:
- `bool`: denotes a boolean value (`true` or `false`).
Although this can be encoded in a single bit, the thin C89-layer APIs generated by ACT will use an unsigned 8 bit value (a `uint8` in ACT terms) to encode a boolean value.
A numerical value of `0` encodes `false`, all oher values encode `true`.
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 - 2<sup>8</sup>-1, 0 - 2<sup>16</sup>-1, 0 - 2<sup>32</sup>-1, 0 - 2<sup>64</sup>-1, respectively.
- `int8`, `int16`, `int32`, `int64`:
A _signed_ integer vaules ranging from -2<sup>7</sup> - 2<sup>7</sup>-1, -2<sup>15</sup> - 2<sup>15</sup>-1,
-2<sup>31</sup> - 2<sup>31</sup>-1,
-2<sup>63</sup> - 2<sup>63</sup>-1, respectively.
- `pointer`: An address in memory without knowledge of the kind of data that resides there. In C++, this corresponds to a `void*`.
- `string` denotes a null-terminated string. If a component requires arbitrary strings that can contain null-characters, one should use the type `basicarray` of class `uint8`.
- `single`: Single precision floating point number.
- `double`: Double precision floating point number.
- `struct`: see [13. Struct](#13-struct)
- `enum`: see [11. Enum](#11-enum)
- `basicarray`: an array of [ST\_ScalarTypes](#17-2-scalartype)
- `enumarray`: an array of [enums](#11-enum)
- `structarray`: an array of [structs](#13-struct)
- `handle`: the identifier (address, unique identifier, hash, ...) of a class instance [class instance](#8-class)
- `functiontype`: see [9. Function Type](#9-function-type)

### 17.2 ScalarType
ST_ScalarType `bool` denotes a boolean value (`true` or `false`).
Although this can be encoded in a single bit, the thin C89-layer APIs generated by ACT will use a unsigned 8 bit value (a `uint8` in ACT terms) to encode a boolean value.
A numerical value of `0` encodes `false`, all oher values encode `true`.
Implementations and bindings should use the definition of a boolean value native to the respective language of the implementation or binding.
A subset of scalar or integral of ST\_Type:

`bool`, `uint8`, `uint16`, `uint32`, `uint64`, `int8`, `int16`, `int32`, `int64`, `single`, `double`, `pointer`.

### 17.3 ComposedType
A subset of more complex types, or types composed of other ST\_Types:

`string`, `enum`, `basicarray`, `enumarray`, `structarray`, `handle`, `functiontype`

### 17.4 Name
### 17.5 Description
### 17.6 ErrorName
Expand Down
Binary file modified Documentation/images/element_global.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit ba20316

Please sign in to comment.