Skip to content

Commit a119495

Browse files
committed
version changes after building act and examples
1 parent c989721 commit a119495

File tree

80 files changed

+640
-313
lines changed

Some content is hidden

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

80 files changed

+640
-313
lines changed

Examples/Injection/Calculation_component/Bindings/Cpp/calculation_abi.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Copyright (C) 2019 Calculation developers
44
55
All rights reserved.
66
7-
This file has been generated by the Automatic Component Toolkit (ACT) version 1.7.0-develop.
7+
This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.0-alpha.
88
99
Abstract: This is an autogenerated C++-Header file in order to allow an easy
1010
use of Calculation library

Examples/Injection/Calculation_component/Bindings/Cpp/calculation_implicit.hpp

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Copyright (C) 2019 Calculation developers
44
55
All rights reserved.
66
7-
This file has been generated by the Automatic Component Toolkit (ACT) version 1.7.0-develop.
7+
This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.0-alpha.
88
99
Abstract: This is an autogenerated C++-Header file in order to allow an easy
1010
use of Calculation library
@@ -69,27 +69,29 @@ typedef PCalculator PCalculationCalculator;
6969

7070
template<class T> class classParam {
7171
private:
72+
std::shared_ptr<T> m_sharedPtr;
7273
const T* m_ptr;
7374

7475
public:
7576
classParam(const T* ptr)
76-
: m_ptr (ptr)
77+
: m_ptr(ptr)
7778
{
7879
}
7980

8081
classParam(std::shared_ptr <T> sharedPtr)
81-
: m_ptr (sharedPtr.get())
82+
: m_sharedPtr(sharedPtr), m_ptr(sharedPtr.get())
8283
{
8384
}
8485

8586
CalculationHandle GetHandle()
8687
{
8788
if (m_ptr != nullptr)
8889
return m_ptr->handle();
89-
return nullptr;
90+
return (CalculationHandle)nullptr;
9091
}
9192
};
9293

94+
9395
/*************************************************************************************************************************
9496
Class ECalculationException
9597
**************************************************************************************************************************/
@@ -192,12 +194,12 @@ class CInputVector {
192194

193195
public:
194196

195-
explicit CInputVector( const std::vector<T>& vec)
197+
CInputVector(const std::vector<T>& vec)
196198
: m_data( vec.data() ), m_size( vec.size() )
197199
{
198200
}
199201

200-
CInputVector( const T* in_data, size_t in_size)
202+
CInputVector(const T* in_data, size_t in_size)
201203
: m_data( in_data ), m_size(in_size )
202204
{
203205
}
@@ -375,7 +377,7 @@ inline CBase* CWrapper::polymorphicFactory(CalculationHandle pHandle)
375377
*/
376378
inline PCalculator CWrapper::CreateCalculator()
377379
{
378-
CalculationHandle hInstance = nullptr;
380+
CalculationHandle hInstance = (CalculationHandle)nullptr;
379381
CheckError(nullptr,calculation_createcalculator(&hInstance));
380382

381383
if (!hInstance) {
@@ -467,7 +469,7 @@ inline CBase* CWrapper::polymorphicFactory(CalculationHandle pHandle)
467469

468470
return resultSymbolLookupMethod;
469471
}
470-
472+
471473
inline void CWrapper::CheckError(CBase * pBaseClass, CalculationResult nResult)
472474
{
473475
if (nResult != 0) {
@@ -518,7 +520,7 @@ inline CBase* CWrapper::polymorphicFactory(CalculationHandle pHandle)
518520
*/
519521
Numbers::PVariable CCalculator::GetEnlistedVariable(const Calculation_uint32 nIndex)
520522
{
521-
NumbersHandle hVariable = nullptr;
523+
NumbersHandle hVariable = (CalculationHandle)nullptr;
522524
CheckError(calculation_calculator_getenlistedvariable(m_pHandle, nIndex, &hVariable));
523525

524526
if (!hVariable) {
@@ -541,7 +543,7 @@ inline CBase* CWrapper::polymorphicFactory(CalculationHandle pHandle)
541543
*/
542544
Numbers::PVariable CCalculator::Multiply()
543545
{
544-
NumbersHandle hInstance = nullptr;
546+
NumbersHandle hInstance = (CalculationHandle)nullptr;
545547
CheckError(calculation_calculator_multiply(m_pHandle, &hInstance));
546548

547549
if (!hInstance) {
@@ -556,7 +558,7 @@ inline CBase* CWrapper::polymorphicFactory(CalculationHandle pHandle)
556558
*/
557559
Numbers::PVariable CCalculator::Add()
558560
{
559-
NumbersHandle hInstance = nullptr;
561+
NumbersHandle hInstance = (CalculationHandle)nullptr;
560562
CheckError(calculation_calculator_add(m_pHandle, &hInstance));
561563

562564
if (!hInstance) {

Examples/Injection/Calculation_component/Bindings/Cpp/calculation_types.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Copyright (C) 2019 Calculation developers
44
55
All rights reserved.
66
7-
This file has been generated by the Automatic Component Toolkit (ACT) version 1.7.0-develop.
7+
This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.0-alpha.
88
99
Abstract: This is an autogenerated C++-Header file with basic types in
1010
order to allow an easy use of Calculation library

Examples/Injection/Calculation_component/Bindings/CppDynamic/calculation_dynamic.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Copyright (C) 2019 Calculation developers
44
55
All rights reserved.
66
7-
This file has been generated by the Automatic Component Toolkit (ACT) version 1.7.0-develop.
7+
This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.0-alpha.
88
99
Abstract: This is an autogenerated C++-Header file in order to allow an easy
1010
use of Calculation library

Examples/Injection/Calculation_component/Bindings/CppDynamic/calculation_dynamic.hpp

Lines changed: 21 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Copyright (C) 2019 Calculation developers
44
55
All rights reserved.
66
7-
This file has been generated by the Automatic Component Toolkit (ACT) version 1.7.0-develop.
7+
This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.0-alpha.
88
99
Abstract: This is an autogenerated C++-Header file in order to allow an easy
1010
use of Calculation library
@@ -69,27 +69,29 @@ typedef PCalculator PCalculationCalculator;
6969

7070
template<class T> class classParam {
7171
private:
72+
std::shared_ptr<T> m_sharedPtr;
7273
const T* m_ptr;
7374

7475
public:
7576
classParam(const T* ptr)
76-
: m_ptr (ptr)
77+
: m_ptr(ptr)
7778
{
7879
}
7980

8081
classParam(std::shared_ptr <T> sharedPtr)
81-
: m_ptr (sharedPtr.get())
82+
: m_sharedPtr(sharedPtr), m_ptr(sharedPtr.get())
8283
{
8384
}
8485

8586
CalculationHandle GetHandle()
8687
{
8788
if (m_ptr != nullptr)
8889
return m_ptr->handle();
89-
return nullptr;
90+
return (CalculationHandle)nullptr;
9091
}
9192
};
9293

94+
9395
/*************************************************************************************************************************
9496
Class ECalculationException
9597
**************************************************************************************************************************/
@@ -192,12 +194,12 @@ class CInputVector {
192194

193195
public:
194196

195-
explicit CInputVector( const std::vector<T>& vec)
197+
CInputVector(const std::vector<T>& vec)
196198
: m_data( vec.data() ), m_size( vec.size() )
197199
{
198200
}
199201

200-
CInputVector( const T* in_data, size_t in_size)
202+
CInputVector(const T* in_data, size_t in_size)
201203
: m_data( in_data ), m_size(in_size )
202204
{
203205
}
@@ -399,7 +401,7 @@ inline CBase* CWrapper::polymorphicFactory(CalculationHandle pHandle)
399401
*/
400402
inline PCalculator CWrapper::CreateCalculator()
401403
{
402-
CalculationHandle hInstance = nullptr;
404+
CalculationHandle hInstance = (CalculationHandle)nullptr;
403405
CheckError(nullptr,m_WrapperTable.m_CreateCalculator(&hInstance));
404406

405407
if (!hInstance) {
@@ -491,7 +493,7 @@ inline CBase* CWrapper::polymorphicFactory(CalculationHandle pHandle)
491493

492494
return resultSymbolLookupMethod;
493495
}
494-
496+
495497
inline void CWrapper::CheckError(CBase * pBaseClass, CalculationResult nResult)
496498
{
497499
if (nResult != 0) {
@@ -526,7 +528,7 @@ inline CBase* CWrapper::polymorphicFactory(CalculationHandle pHandle)
526528

527529
return CALCULATION_SUCCESS;
528530
}
529-
531+
530532
inline CalculationResult CWrapper::releaseWrapperTable(sCalculationDynamicWrapperTable * pWrapperTable)
531533
{
532534
if (pWrapperTable == nullptr)
@@ -544,7 +546,7 @@ inline CBase* CWrapper::polymorphicFactory(CalculationHandle pHandle)
544546

545547
return CALCULATION_SUCCESS;
546548
}
547-
549+
548550
inline CalculationResult CWrapper::loadWrapperTable(sCalculationDynamicWrapperTable * pWrapperTable, const char * pLibraryFileName)
549551
{
550552
if (pWrapperTable == nullptr)
@@ -554,7 +556,9 @@ inline CBase* CWrapper::polymorphicFactory(CalculationHandle pHandle)
554556

555557
#ifdef _WIN32
556558
// Convert filename to UTF16-string
557-
int nLength = static_cast<int>(strnlen_s(pLibraryFileName, MAX_PATH));
559+
int nLength = 0;
560+
while ((pLibraryFileName[nLength] != 0) && (nLength < MAX_PATH))
561+
nLength++;
558562
int nBufferSize = nLength * 2 + 2;
559563
std::vector<wchar_t> wsLibraryFileName(nBufferSize);
560564
int nResult = MultiByteToWideChar(CP_UTF8, 0, pLibraryFileName, nLength, &wsLibraryFileName[0], nBufferSize);
@@ -691,9 +695,9 @@ inline CBase* CWrapper::polymorphicFactory(CalculationHandle pHandle)
691695
pWrapperTable->m_LibraryHandle = hLibrary;
692696
return CALCULATION_SUCCESS;
693697
}
694-
698+
695699
inline CalculationResult CWrapper::loadWrapperTableFromSymbolLookupMethod(sCalculationDynamicWrapperTable * pWrapperTable, void* pSymbolLookupMethod)
696-
{
700+
{
697701
if (pWrapperTable == nullptr)
698702
return CALCULATION_ERROR_INVALIDPARAM;
699703
if (pSymbolLookupMethod == nullptr)
@@ -757,8 +761,7 @@ inline CBase* CWrapper::polymorphicFactory(CalculationHandle pHandle)
757761
return CALCULATION_ERROR_COULDNOTFINDLIBRARYEXPORT;
758762

759763
return CALCULATION_SUCCESS;
760-
}
761-
764+
}
762765

763766

764767
/**
@@ -798,7 +801,7 @@ inline CBase* CWrapper::polymorphicFactory(CalculationHandle pHandle)
798801
*/
799802
Numbers::PVariable CCalculator::GetEnlistedVariable(const Calculation_uint32 nIndex)
800803
{
801-
NumbersHandle hVariable = nullptr;
804+
NumbersHandle hVariable = (CalculationHandle)nullptr;
802805
CheckError(m_pWrapper->m_WrapperTable.m_Calculator_GetEnlistedVariable(m_pHandle, nIndex, &hVariable));
803806

804807
if (!hVariable) {
@@ -821,7 +824,7 @@ inline CBase* CWrapper::polymorphicFactory(CalculationHandle pHandle)
821824
*/
822825
Numbers::PVariable CCalculator::Multiply()
823826
{
824-
NumbersHandle hInstance = nullptr;
827+
NumbersHandle hInstance = (CalculationHandle)nullptr;
825828
CheckError(m_pWrapper->m_WrapperTable.m_Calculator_Multiply(m_pHandle, &hInstance));
826829

827830
if (!hInstance) {
@@ -836,7 +839,7 @@ inline CBase* CWrapper::polymorphicFactory(CalculationHandle pHandle)
836839
*/
837840
Numbers::PVariable CCalculator::Add()
838841
{
839-
NumbersHandle hInstance = nullptr;
842+
NumbersHandle hInstance = (CalculationHandle)nullptr;
840843
CheckError(m_pWrapper->m_WrapperTable.m_Calculator_Add(m_pHandle, &hInstance));
841844

842845
if (!hInstance) {

Examples/Injection/Calculation_component/Bindings/CppDynamic/calculation_types.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Copyright (C) 2019 Calculation developers
44
55
All rights reserved.
66
7-
This file has been generated by the Automatic Component Toolkit (ACT) version 1.7.0-develop.
7+
This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.0-alpha.
88
99
Abstract: This is an autogenerated C++-Header file with basic types in
1010
order to allow an easy use of Calculation library

Examples/Injection/Calculation_component/Bindings/Java9/calculation/Base.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
55
All rights reserved.
66
7-
This file has been generated by the Automatic Component Toolkit (ACT) version 1.7.0-develop.
7+
This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.0-alpha.
88
99
Abstract: This is an autogenerated Java file in order to allow an easy
1010
use of Calculation library

Examples/Injection/Calculation_component/Bindings/Java9/calculation/CalculationException.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
55
All rights reserved.
66
7-
This file has been generated by the Automatic Component Toolkit (ACT) version 1.7.0-develop.
7+
This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.0-alpha.
88
99
Abstract: This is an autogenerated Java file in order to allow an easy
1010
use of Calculation library

Examples/Injection/Calculation_component/Bindings/Java9/calculation/CalculationWrapper.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
55
All rights reserved.
66
7-
This file has been generated by the Automatic Component Toolkit (ACT) version 1.7.0-develop.
7+
This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.0-alpha.
88
99
Abstract: This is an autogenerated Java file in order to allow an easy
1010
use of Calculation library

Examples/Injection/Calculation_component/Bindings/Java9/calculation/Calculator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
55
All rights reserved.
66
7-
This file has been generated by the Automatic Component Toolkit (ACT) version 1.7.0-develop.
7+
This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.0-alpha.
88
99
Abstract: This is an autogenerated Java file in order to allow an easy
1010
use of Calculation library

Examples/Injection/Calculation_component/Bindings/Pascal/Unit_Calculation.pas

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
66
All rights reserved.
77
8-
This file has been generated by the Automatic Component Toolkit (ACT) version 1.7.0-develop.
8+
This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.0-alpha.
99
1010
Abstract: This is an autogenerated Pascal Header file in order to allow an easy
1111
use of Calculation library

Examples/Injection/Calculation_component/Bindings/Python/Calculation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
55
All rights reserved.
66
7-
This file has been generated by the Automatic Component Toolkit (ACT) version 1.7.0-develop.
7+
This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.0-alpha.
88
99
Abstract: This is an autogenerated Python file in order to allow an easy
1010
use of Calculation library

Examples/Injection/Calculation_component/Implementations/Cpp/Interfaces/calculation_abi.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Copyright (C) 2019 Calculation developers
44
55
All rights reserved.
66
7-
This file has been generated by the Automatic Component Toolkit (ACT) version 1.7.0-develop.
7+
This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.0-alpha.
88
99
Abstract: This is an autogenerated C++-Header file in order to allow an easy
1010
use of Calculation library

Examples/Injection/Calculation_component/Implementations/Cpp/Interfaces/calculation_interfaceexception.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Copyright (C) 2019 Calculation developers
44
55
All rights reserved.
66
7-
This file has been generated by the Automatic Component Toolkit (ACT) version 1.7.0-develop.
7+
This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.0-alpha.
88
99
Abstract: This is an autogenerated C++ Implementation file with the basic internal
1010
exception type in order to allow an easy use of Calculation library

Examples/Injection/Calculation_component/Implementations/Cpp/Interfaces/calculation_interfaceexception.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Copyright (C) 2019 Calculation developers
44
55
All rights reserved.
66
7-
This file has been generated by the Automatic Component Toolkit (ACT) version 1.7.0-develop.
7+
This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.0-alpha.
88
99
Abstract: This is an autogenerated C++ Header file with the basic internal
1010
exception type in order to allow an easy use of Calculation library

Examples/Injection/Calculation_component/Implementations/Cpp/Interfaces/calculation_interfaces.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Copyright (C) 2019 Calculation developers
44
55
All rights reserved.
66
7-
This file has been generated by the Automatic Component Toolkit (ACT) version 1.7.0-develop.
7+
This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.0-alpha.
88
99
Abstract: This is an autogenerated C++ header file in order to allow easy
1010
development of Calculation library. The implementer of Calculation library needs to

Examples/Injection/Calculation_component/Implementations/Cpp/Interfaces/calculation_interfacewrapper.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Copyright (C) 2019 Calculation developers
44
55
All rights reserved.
66
7-
This file has been generated by the Automatic Component Toolkit (ACT) version 1.7.0-develop.
7+
This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.0-alpha.
88
99
Abstract: This is an autogenerated C++ implementation file in order to allow easy
1010
development of Calculation library. The functions in this file need to be implemented. It needs to be generated only once.

Examples/Injection/Calculation_component/Implementations/Cpp/Interfaces/calculation_types.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Copyright (C) 2019 Calculation developers
44
55
All rights reserved.
66
7-
This file has been generated by the Automatic Component Toolkit (ACT) version 1.7.0-develop.
7+
This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.0-alpha.
88
99
Abstract: This is an autogenerated C++-Header file with basic types in
1010
order to allow an easy use of Calculation library

0 commit comments

Comments
 (0)