Skip to content

Commit 8669c3c

Browse files
authored
fix existing examples and add documentation to Primes example (#223)
* fix examples * build examples in GitHub Actions pipeline * enabling executing permissions for build scirpt * fixing line endings for the build scripts * fix calculator example pascal compilation * fix library loading in calculator example * fix calculator pascal library loading * fixing Calculator, UnitTest, Prime examples * commiting LibPrimes Example * adding execution permissions to libPrimes build scripts * fixing python binding error
1 parent 8f7f84f commit 8669c3c

File tree

227 files changed

+14366
-738
lines changed

Some content is hidden

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

227 files changed

+14366
-738
lines changed

Build/Dockerfile

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,27 @@ RUN rpm --import https://download.mono-project.com/repo/xamarin.gpg \
4242
&& dnf config-manager --add-repo https://download.mono-project.com/repo/centos8-stable.repo \
4343
&& dnf -y install mono-complete
4444

45-
# General tools
46-
RUN dnf -y install glibc-common glibc-utils less passwd tar vim-minimal vim-enhanced which sudo bash-completion mc yum-utils && yum clean all
45+
# .NET
46+
RUN dnf -y install wget \
47+
&& wget https://packages.microsoft.com/config/centos/8/packages-microsoft-prod.rpm \
48+
&& rpm -Uvh packages-microsoft-prod.rpm \
49+
&& dnf -y install dotnet-sdk-6.0
50+
51+
# General purpose tools
52+
RUN dnf -y install \
53+
glibc-common \
54+
glibc-utils \
55+
less \
56+
passwd \
57+
tar \
58+
vim-minimal \
59+
vim-enhanced \
60+
which \
61+
sudo \
62+
bash-completion \
63+
mc \
64+
yum-utils \
65+
&& yum clean all
4766

4867
# Enable GCC toolset in shells
4968
RUN echo "source /opt/rh/gcc-toolset-9/enable" >> /etc/bashrc

Examples/Calculator/Calculator.xml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@
2828
</errors>
2929

3030
<class name="Base">
31+
<method name="ClassTypeId" description="Get Class Type Id">
32+
<param name="ClassTypeId" type="uint64" pass="return"
33+
description="Class type as a 64 bits integer" />
34+
</method>
3135
</class>
3236

3337
<class name="Variable" parent="Base" description="A variable number">
@@ -61,7 +65,7 @@
6165
</method>
6266
</class>
6367

64-
<global baseclassname="Base" releasemethod="ReleaseInstance" acquiremethod="AcquireInstance" versionmethod="GetVersion" errormethod="GetLastError">
68+
<global baseclassname="Base" releasemethod="ReleaseInstance" acquiremethod="AcquireInstance" versionmethod="GetVersion" errormethod="GetLastError" classtypeidmethod="ClassTypeId">
6569

6670
<method name="GetVersion" description = "retrieves the binary version of this library.">
6771
<param name="Major" type="uint32" pass="out" description="returns the major version of this library" />

Examples/Calculator/Calculator_component/Bindings/CppDynamic/calculator_abi.hpp

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Copyright (C) 2019 Calculator developers
44
55
All rights reserved.
66
7-
This file has been generated by the Automatic Component Toolkit (ACT) version 1.6.0.
7+
This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop.
88
99
Abstract: This is an autogenerated C++-Header file in order to allow an easy
1010
use of Calculator library
@@ -29,12 +29,23 @@ Interface version: 1.0.0
2929
#include "calculator_types.hpp"
3030

3131

32+
#ifdef __cplusplus
3233
extern "C" {
34+
#endif
3335

3436
/*************************************************************************************************************************
3537
Class definition for Base
3638
**************************************************************************************************************************/
3739

40+
/**
41+
* Get Class Type Id
42+
*
43+
* @param[in] pBase - Base instance.
44+
* @param[out] pClassTypeId - Class type as a 64 bits integer
45+
* @return error code or 0 (success)
46+
*/
47+
CALCULATOR_DECLSPEC CalculatorResult calculator_base_classtypeid(Calculator_Base pBase, Calculator_uint64 * pClassTypeId);
48+
3849
/*************************************************************************************************************************
3950
Class definition for Variable
4051
**************************************************************************************************************************/
@@ -165,7 +176,9 @@ CALCULATOR_DECLSPEC CalculatorResult calculator_createvariable(Calculator_double
165176
*/
166177
CALCULATOR_DECLSPEC CalculatorResult calculator_createcalculator(Calculator_Calculator * pInstance);
167178

179+
#ifdef __cplusplus
168180
}
181+
#endif
169182

170183
#endif // __CALCULATOR_HEADER_CPP
171184

Examples/Calculator/Calculator_component/Bindings/CppDynamic/calculator_dynamic.h

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Copyright (C) 2019 Calculator developers
44
55
All rights reserved.
66
7-
This file has been generated by the Automatic Component Toolkit (ACT) version 1.6.0.
7+
This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop.
88
99
Abstract: This is an autogenerated C++-Header file in order to allow an easy
1010
use of Calculator library
@@ -24,6 +24,15 @@ Interface version: 1.0.0
2424
Class definition for Base
2525
**************************************************************************************************************************/
2626

27+
/**
28+
* Get Class Type Id
29+
*
30+
* @param[in] pBase - Base instance.
31+
* @param[out] pClassTypeId - Class type as a 64 bits integer
32+
* @return error code or 0 (success)
33+
*/
34+
typedef CalculatorResult (*PCalculatorBase_ClassTypeIdPtr) (Calculator_Base pBase, Calculator_uint64 * pClassTypeId);
35+
2736
/*************************************************************************************************************************
2837
Class definition for Variable
2938
**************************************************************************************************************************/
@@ -160,6 +169,7 @@ typedef CalculatorResult (*PCalculatorCreateCalculatorPtr) (Calculator_Calculato
160169

161170
typedef struct {
162171
void * m_LibraryHandle;
172+
PCalculatorBase_ClassTypeIdPtr m_Base_ClassTypeId;
163173
PCalculatorVariable_GetValuePtr m_Variable_GetValue;
164174
PCalculatorVariable_SetValuePtr m_Variable_SetValue;
165175
PCalculatorCalculator_EnlistVariablePtr m_Calculator_EnlistVariable;

0 commit comments

Comments
 (0)