Skip to content

Commit

Permalink
Upgrading GenICam reference implementation to v3.1
Browse files Browse the repository at this point in the history
  • Loading branch information
heikohimu committed Sep 27, 2018
1 parent 5a15ab1 commit 80b76c6
Show file tree
Hide file tree
Showing 189 changed files with 10,090 additions and 9,581 deletions.
88 changes: 44 additions & 44 deletions genicam/CMakeLists.txt
Expand Up @@ -16,75 +16,75 @@ message(STATUS "Detected architecture ${ARCHITECTURE}")

if ("${ARCHITECTURE}" STREQUAL "arm")
set(GENICAM_LIBRARIES
${CMAKE_CURRENT_SOURCE_DIR}/bin/Linux32_ARMhf/libGCBase_gcc46_v3_0.so
${CMAKE_CURRENT_SOURCE_DIR}/bin/Linux32_ARMhf/libMathParser_gcc46_v3_0.so
${CMAKE_CURRENT_SOURCE_DIR}/bin/Linux32_ARMhf/libGenApi_gcc46_v3_0.so
${CMAKE_CURRENT_SOURCE_DIR}/bin/Linux32_ARMhf/libNodeMapData_gcc46_v3_0.so
${CMAKE_CURRENT_SOURCE_DIR}/bin/Linux32_ARMhf/liblog4cpp_gcc46_v3_0.so
${CMAKE_CURRENT_SOURCE_DIR}/bin/Linux32_ARMhf/libXmlParser_gcc46_v3_0.so
${CMAKE_CURRENT_SOURCE_DIR}/bin/Linux32_ARMhf/libLog_gcc46_v3_0.so
${CMAKE_CURRENT_SOURCE_DIR}/bin/Linux32_ARMhf/libGCBase_gcc46_v3_1.so
${CMAKE_CURRENT_SOURCE_DIR}/bin/Linux32_ARMhf/libMathParser_gcc46_v3_1.so
${CMAKE_CURRENT_SOURCE_DIR}/bin/Linux32_ARMhf/libGenApi_gcc46_v3_1.so
${CMAKE_CURRENT_SOURCE_DIR}/bin/Linux32_ARMhf/libNodeMapData_gcc46_v3_1.so
${CMAKE_CURRENT_SOURCE_DIR}/bin/Linux32_ARMhf/liblog4cpp_gcc46_v3_1.so
${CMAKE_CURRENT_SOURCE_DIR}/bin/Linux32_ARMhf/libXmlParser_gcc46_v3_1.so
${CMAKE_CURRENT_SOURCE_DIR}/bin/Linux32_ARMhf/libLog_gcc46_v3_1.so
)
elseif ("${ARCHITECTURE}" STREQUAL "aarch64")
set(GENICAM_LIBRARIES
${CMAKE_CURRENT_SOURCE_DIR}/bin/Linux64_ARM/libGCBase_gcc48_v3_0.so
${CMAKE_CURRENT_SOURCE_DIR}/bin/Linux64_ARM/libMathParser_gcc48_v3_0.so
${CMAKE_CURRENT_SOURCE_DIR}/bin/Linux64_ARM/libGenApi_gcc48_v3_0.so
${CMAKE_CURRENT_SOURCE_DIR}/bin/Linux64_ARM/libNodeMapData_gcc48_v3_0.so
${CMAKE_CURRENT_SOURCE_DIR}/bin/Linux64_ARM/liblog4cpp_gcc48_v3_0.so
${CMAKE_CURRENT_SOURCE_DIR}/bin/Linux64_ARM/libXmlParser_gcc48_v3_0.so
${CMAKE_CURRENT_SOURCE_DIR}/bin/Linux64_ARM/libLog_gcc48_v3_0.so
${CMAKE_CURRENT_SOURCE_DIR}/bin/Linux64_ARM/libGCBase_gcc48_v3_1.so
${CMAKE_CURRENT_SOURCE_DIR}/bin/Linux64_ARM/libMathParser_gcc48_v3_1.so
${CMAKE_CURRENT_SOURCE_DIR}/bin/Linux64_ARM/libGenApi_gcc48_v3_1.so
${CMAKE_CURRENT_SOURCE_DIR}/bin/Linux64_ARM/libNodeMapData_gcc48_v3_1.so
${CMAKE_CURRENT_SOURCE_DIR}/bin/Linux64_ARM/liblog4cpp_gcc48_v3_1.so
${CMAKE_CURRENT_SOURCE_DIR}/bin/Linux64_ARM/libXmlParser_gcc48_v3_1.so
${CMAKE_CURRENT_SOURCE_DIR}/bin/Linux64_ARM/libLog_gcc48_v3_1.so
)
elseif ("${ARCHITECTURE}" STREQUAL "i686")
set(GENICAM_LIBRARIES
${CMAKE_CURRENT_SOURCE_DIR}/bin/Linux32_i86/libGCBase_gcc421_v3_0.so
${CMAKE_CURRENT_SOURCE_DIR}/bin/Linux32_i86/libMathParser_gcc421_v3_0.so
${CMAKE_CURRENT_SOURCE_DIR}/bin/Linux32_i86/libGenApi_gcc421_v3_0.so
${CMAKE_CURRENT_SOURCE_DIR}/bin/Linux32_i86/libNodeMapData_gcc421_v3_0.so
${CMAKE_CURRENT_SOURCE_DIR}/bin/Linux32_i86/liblog4cpp_gcc421_v3_0.so
${CMAKE_CURRENT_SOURCE_DIR}/bin/Linux32_i86/libXmlParser_gcc421_v3_0.so
${CMAKE_CURRENT_SOURCE_DIR}/bin/Linux32_i86/libLog_gcc421_v3_0.so
${CMAKE_CURRENT_SOURCE_DIR}/bin/Linux32_i86/libGCBase_gcc42_v3_1.so
${CMAKE_CURRENT_SOURCE_DIR}/bin/Linux32_i86/libMathParser_gcc42_v3_1.so
${CMAKE_CURRENT_SOURCE_DIR}/bin/Linux32_i86/libGenApi_gcc42_v3_1.so
${CMAKE_CURRENT_SOURCE_DIR}/bin/Linux32_i86/libNodeMapData_gcc42_v3_1.so
${CMAKE_CURRENT_SOURCE_DIR}/bin/Linux32_i86/liblog4cpp_gcc42_v3_1.so
${CMAKE_CURRENT_SOURCE_DIR}/bin/Linux32_i86/libXmlParser_gcc42_v3_1.so
${CMAKE_CURRENT_SOURCE_DIR}/bin/Linux32_i86/libLog_gcc42_v3_1.so
)
elseif ("${ARCHITECTURE}" STREQUAL "x86_64")
set(GENICAM_LIBRARIES
${CMAKE_CURRENT_SOURCE_DIR}/bin/Linux64_x64/libGCBase_gcc421_v3_0.so
${CMAKE_CURRENT_SOURCE_DIR}/bin/Linux64_x64/libMathParser_gcc421_v3_0.so
${CMAKE_CURRENT_SOURCE_DIR}/bin/Linux64_x64/libGenApi_gcc421_v3_0.so
${CMAKE_CURRENT_SOURCE_DIR}/bin/Linux64_x64/libNodeMapData_gcc421_v3_0.so
${CMAKE_CURRENT_SOURCE_DIR}/bin/Linux64_x64/liblog4cpp_gcc421_v3_0.so
${CMAKE_CURRENT_SOURCE_DIR}/bin/Linux64_x64/libXmlParser_gcc421_v3_0.so
${CMAKE_CURRENT_SOURCE_DIR}/bin/Linux64_x64/libLog_gcc421_v3_0.so
${CMAKE_CURRENT_SOURCE_DIR}/bin/Linux64_x64/libGCBase_gcc42_v3_1.so
${CMAKE_CURRENT_SOURCE_DIR}/bin/Linux64_x64/libMathParser_gcc42_v3_1.so
${CMAKE_CURRENT_SOURCE_DIR}/bin/Linux64_x64/libGenApi_gcc42_v3_1.so
${CMAKE_CURRENT_SOURCE_DIR}/bin/Linux64_x64/libNodeMapData_gcc42_v3_1.so
${CMAKE_CURRENT_SOURCE_DIR}/bin/Linux64_x64/liblog4cpp_gcc42_v3_1.so
${CMAKE_CURRENT_SOURCE_DIR}/bin/Linux64_x64/libXmlParser_gcc42_v3_1.so
${CMAKE_CURRENT_SOURCE_DIR}/bin/Linux64_x64/libLog_gcc42_v3_1.so
)
elseif ("${ARCHITECTURE}" STREQUAL "WIN32_i86")
install(FILES
${CMAKE_CURRENT_SOURCE_DIR}/bin/Win32_i86/GCBase_MD_VC120_v3_0.dll
${CMAKE_CURRENT_SOURCE_DIR}/bin/Win32_i86/GenApi_MD_VC120_v3_0.dll
${CMAKE_CURRENT_SOURCE_DIR}/bin/Win32_i86/Log_MD_VC120_v3_0.dll
${CMAKE_CURRENT_SOURCE_DIR}/bin/Win32_i86/MathParser_MD_VC120_v3_0.dll
${CMAKE_CURRENT_SOURCE_DIR}/bin/Win32_i86/GCBase_MD_VC120_v3_1.dll
${CMAKE_CURRENT_SOURCE_DIR}/bin/Win32_i86/GenApi_MD_VC120_v3_1.dll
${CMAKE_CURRENT_SOURCE_DIR}/bin/Win32_i86/Log_MD_VC120_v3_1.dll
${CMAKE_CURRENT_SOURCE_DIR}/bin/Win32_i86/MathParser_MD_VC120_v3_1.dll
${CMAKE_CURRENT_SOURCE_DIR}/bin/Win32_i86/msvcp120.dll
${CMAKE_CURRENT_SOURCE_DIR}/bin/Win32_i86/msvcr120.dll
${CMAKE_CURRENT_SOURCE_DIR}/bin/Win32_i86/NodeMapData_MD_VC120_v3_0.dll
${CMAKE_CURRENT_SOURCE_DIR}/bin/Win32_i86/XmlParser_MD_VC120_v3_0.dll
${CMAKE_CURRENT_SOURCE_DIR}/bin/Win32_i86/NodeMapData_MD_VC120_v3_1.dll
${CMAKE_CURRENT_SOURCE_DIR}/bin/Win32_i86/XmlParser_MD_VC120_v3_1.dll
COMPONENT bin DESTINATION bin
)
set(GENICAM_LIBRARIES
${CMAKE_CURRENT_SOURCE_DIR}/library/CPP/lib/Win32_i86/GCBase_MD_VC120_v3_0.lib
${CMAKE_CURRENT_SOURCE_DIR}/library/CPP/lib/Win32_i86/GenApi_MD_VC120_v3_0.lib
${CMAKE_CURRENT_SOURCE_DIR}/library/CPP/lib/Win32_i86/GCBase_MD_VC120_v3_1.lib
${CMAKE_CURRENT_SOURCE_DIR}/library/CPP/lib/Win32_i86/GenApi_MD_VC120_v3_1.lib
)
elseif ("${ARCHITECTURE}" STREQUAL "WIN64_x64")
install(FILES
${CMAKE_CURRENT_SOURCE_DIR}/bin/Win64_x64/GCBase_MD_VC120_v3_0.dll
${CMAKE_CURRENT_SOURCE_DIR}/bin/Win64_x64/GenApi_MD_VC120_v3_0.dll
${CMAKE_CURRENT_SOURCE_DIR}/bin/Win64_x64/Log_MD_VC120_v3_0.dll
${CMAKE_CURRENT_SOURCE_DIR}/bin/Win64_x64/MathParser_MD_VC120_v3_0.dll
${CMAKE_CURRENT_SOURCE_DIR}/bin/Win64_x64/GCBase_MD_VC120_v3_1.dll
${CMAKE_CURRENT_SOURCE_DIR}/bin/Win64_x64/GenApi_MD_VC120_v3_1.dll
${CMAKE_CURRENT_SOURCE_DIR}/bin/Win64_x64/Log_MD_VC120_v3_1.dll
${CMAKE_CURRENT_SOURCE_DIR}/bin/Win64_x64/MathParser_MD_VC120_v3_1.dll
${CMAKE_CURRENT_SOURCE_DIR}/bin/Win64_x64/msvcp120.dll
${CMAKE_CURRENT_SOURCE_DIR}/bin/Win64_x64/msvcr120.dll
${CMAKE_CURRENT_SOURCE_DIR}/bin/Win64_x64/NodeMapData_MD_VC120_v3_0.dll
${CMAKE_CURRENT_SOURCE_DIR}/bin/Win64_x64/XmlParser_MD_VC120_v3_0.dll
${CMAKE_CURRENT_SOURCE_DIR}/bin/Win64_x64/NodeMapData_MD_VC120_v3_1.dll
${CMAKE_CURRENT_SOURCE_DIR}/bin/Win64_x64/XmlParser_MD_VC120_v3_1.dll
COMPONENT bin DESTINATION bin
)
set(GENICAM_LIBRARIES
${CMAKE_CURRENT_SOURCE_DIR}/library/CPP/lib/Win64_x64/GCBase_MD_VC120_v3_0.lib
${CMAKE_CURRENT_SOURCE_DIR}/library/CPP/lib/Win64_x64/GenApi_MD_VC120_v3_0.lib
${CMAKE_CURRENT_SOURCE_DIR}/library/CPP/lib/Win64_x64/GCBase_MD_VC120_v3_1.lib
${CMAKE_CURRENT_SOURCE_DIR}/library/CPP/lib/Win64_x64/GenApi_MD_VC120_v3_1.lib
)
else ()
message(FATAL_ERROR "Unknown architecture")
Expand Down
6 changes: 6 additions & 0 deletions genicam/License_ReadMe.txt
Expand Up @@ -53,9 +53,11 @@ xs3p DSTC http://xml.fiforms.org/xs3p/index.html
xxhash New BSD https://code.google.com/p/xxhash/
XSLTProc MIT license http://xmlsoft.org/XSLT/xsltproc2.html
XSDe Proprietary NA
PCRE2 BSD license http://www.pcre.org/

Note that the XSDe license was purchased by one of the members of the committee but
allows all members to re-compile the parser as long as only the GenApi XML vocabulary is used.
The XSDe free proprietary license is used for the firmware update module.

All license texts come as part of the GenICam distribution in the licenses
subdiretory. If not, you can download them from the internet.
Expand All @@ -69,6 +71,10 @@ xs3p xs3p_License.mht http://xml.fiforms.org/xs3p/index.html
xxhash xxhash_License.txt http://opensource.org/licenses/BSD-3-Clause
XSLTProc MIT_License.txt http://opensource.org/licenses/mit-license.html
XSDe XSDe License.pdf NA
XSDe Free NA
Proprietary
License
PCRE2 pcre2_License.txt http://www.pcre.org/licence.txt

Last but not least GenICam redistributes the C/C++ runtime DLLs of the
Microsoft Visual C++ compiler in the version 12.0
Expand Down
Binary file removed genicam/bin/Linux32_ARMhf/libGCBase_gcc46_v3_0.so
Binary file not shown.
Binary file added genicam/bin/Linux32_ARMhf/libGCBase_gcc46_v3_1.so
Binary file not shown.
Binary file removed genicam/bin/Linux32_ARMhf/libGenApi_gcc46_v3_0.so
Binary file not shown.
Binary file added genicam/bin/Linux32_ARMhf/libGenApi_gcc46_v3_1.so
Binary file not shown.
Binary file removed genicam/bin/Linux32_ARMhf/libLog_gcc46_v3_0.so
Binary file not shown.
Binary file added genicam/bin/Linux32_ARMhf/libLog_gcc46_v3_1.so
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed genicam/bin/Linux32_ARMhf/liblog4cpp_gcc46_v3_0.so
Binary file not shown.
Binary file not shown.
Binary file removed genicam/bin/Linux32_i86/libGCBase_gcc421_v3_0.so
Binary file not shown.
Binary file added genicam/bin/Linux32_i86/libGCBase_gcc42_v3_1.so
Binary file not shown.
Binary file removed genicam/bin/Linux32_i86/libGenApi_gcc421_v3_0.so
Binary file not shown.
Binary file added genicam/bin/Linux32_i86/libGenApi_gcc42_v3_1.so
Binary file not shown.
Binary file removed genicam/bin/Linux32_i86/libLog_gcc421_v3_0.so
Binary file not shown.
Binary file added genicam/bin/Linux32_i86/libLog_gcc42_v3_1.so
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed genicam/bin/Linux32_i86/libXmlParser_gcc421_v3_0.so
Binary file not shown.
Binary file not shown.
Binary file removed genicam/bin/Linux32_i86/liblog4cpp_gcc421_v3_0.so
Binary file not shown.
Binary file added genicam/bin/Linux32_i86/liblog4cpp_gcc42_v3_1.so
Binary file not shown.
Binary file removed genicam/bin/Linux64_ARM/libGCBase_gcc48_v3_0.so
Binary file not shown.
Binary file added genicam/bin/Linux64_ARM/libGCBase_gcc48_v3_1.so
Binary file not shown.
Binary file removed genicam/bin/Linux64_ARM/libGenApi_gcc48_v3_0.so
Binary file not shown.
Binary file added genicam/bin/Linux64_ARM/libGenApi_gcc48_v3_1.so
Binary file not shown.
Binary file removed genicam/bin/Linux64_ARM/libLog_gcc48_v3_0.so
Binary file not shown.
Binary file added genicam/bin/Linux64_ARM/libLog_gcc48_v3_1.so
Binary file not shown.
Binary file removed genicam/bin/Linux64_ARM/libMathParser_gcc48_v3_0.so
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed genicam/bin/Linux64_ARM/libXmlParser_gcc48_v3_0.so
Binary file not shown.
Binary file not shown.
Binary file removed genicam/bin/Linux64_ARM/liblog4cpp_gcc48_v3_0.so
Binary file not shown.
Binary file added genicam/bin/Linux64_ARM/liblog4cpp_gcc48_v3_1.so
Binary file not shown.
Binary file removed genicam/bin/Linux64_x64/libGCBase_gcc421_v3_0.so
Binary file not shown.
Binary file added genicam/bin/Linux64_x64/libGCBase_gcc42_v3_1.so
Binary file not shown.
Binary file removed genicam/bin/Linux64_x64/libGenApi_gcc421_v3_0.so
Binary file not shown.
Binary file added genicam/bin/Linux64_x64/libGenApi_gcc42_v3_1.so
Binary file not shown.
Binary file removed genicam/bin/Linux64_x64/libLog_gcc421_v3_0.so
Binary file not shown.
Binary file added genicam/bin/Linux64_x64/libLog_gcc42_v3_1.so
Binary file not shown.
Binary file removed genicam/bin/Linux64_x64/libMathParser_gcc421_v3_0.so
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed genicam/bin/Linux64_x64/libXmlParser_gcc421_v3_0.so
Binary file not shown.
Binary file not shown.
Binary file removed genicam/bin/Linux64_x64/liblog4cpp_gcc421_v3_0.so
Binary file not shown.
Binary file added genicam/bin/Linux64_x64/liblog4cpp_gcc42_v3_1.so
Binary file not shown.
Binary file removed genicam/bin/Win32_i86/GCBase_MD_VC120_v3_0.dll
Binary file not shown.
Binary file added genicam/bin/Win32_i86/GCBase_MD_VC120_v3_1.dll
Binary file not shown.
Binary file removed genicam/bin/Win32_i86/GenApi_MD_VC120_v3_0.dll
Binary file not shown.
Binary file added genicam/bin/Win32_i86/GenApi_MD_VC120_v3_1.dll
Binary file not shown.
Binary file removed genicam/bin/Win32_i86/Log_MD_VC120_v3_0.dll
Binary file not shown.
Binary file added genicam/bin/Win32_i86/Log_MD_VC120_v3_1.dll
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed genicam/bin/Win32_i86/NodeMapData_MD_VC120_v3_0.dll
Binary file not shown.
Binary file not shown.
Binary file removed genicam/bin/Win32_i86/XmlParser_MD_VC120_v3_0.dll
Binary file not shown.
Binary file not shown.
Binary file removed genicam/bin/Win64_x64/GCBase_MD_VC120_v3_0.dll
Binary file not shown.
Binary file added genicam/bin/Win64_x64/GCBase_MD_VC120_v3_1.dll
Binary file not shown.
Binary file removed genicam/bin/Win64_x64/GenApi_MD_VC120_v3_0.dll
Binary file not shown.
Binary file added genicam/bin/Win64_x64/GenApi_MD_VC120_v3_1.dll
Binary file not shown.
Binary file removed genicam/bin/Win64_x64/Log_MD_VC120_v3_0.dll
Binary file not shown.
Binary file added genicam/bin/Win64_x64/Log_MD_VC120_v3_1.dll
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed genicam/bin/Win64_x64/NodeMapData_MD_VC120_v3_0.dll
Binary file not shown.
Binary file not shown.
Binary file removed genicam/bin/Win64_x64/XmlParser_MD_VC120_v3_0.dll
Binary file not shown.
Binary file not shown.
104 changes: 52 additions & 52 deletions genicam/library/CPP/include/Base/GCArray.h
@@ -1,52 +1,52 @@
/****************************************************************************
(c) 2014 by Teledyne DALSA
Section: Digital Imaging
Project: GCBase
Author: Eric Bourbonnais
License: This file is published under the license of the EMVA GenICam Standard Group.
A text file describing the legal terms is included in your installation as 'GenICam_license.pdf'.
If for some reason you are missing this file please contact the EMVA or visit the website
(http://www.genicam.org) for a full copy.
THIS SOFTWARE IS PROVIDED BY THE EMVA GENICAM STANDARD GROUP "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE EMVA GENICAM STANDARD GROUP
OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
****************************************************************************/

#ifndef GCBASE_GCARRAY_H
#define GCBASE_GCARRAY_H

#include <Base/GCTypes.h>
namespace GENICAM_NAMESPACE
{
template< class T>
class gcarray
{
public:
gcarray( size_t size) : m_p( NULL)
{
if(size)
m_p = new T[size];
};
~gcarray( ){ if(m_p) delete [] m_p;};
T* get() const {return m_p;} ;
T* operator *() {return m_p;} ;
T operator[](size_t idx) {return m_p[idx];} ;
private:
T* m_p;
};

}

#endif // GCBASE_GCARRAY_H
/****************************************************************************
(c) 2014 by Teledyne DALSA
Section: Digital Imaging
Project: GCBase
Author: Eric Bourbonnais
License: This file is published under the license of the EMVA GenICam Standard Group.
A text file describing the legal terms is included in your installation as 'GenICam_license.pdf'.
If for some reason you are missing this file please contact the EMVA or visit the website
(http://www.genicam.org) for a full copy.
THIS SOFTWARE IS PROVIDED BY THE EMVA GENICAM STANDARD GROUP "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE EMVA GENICAM STANDARD GROUP
OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
****************************************************************************/

#ifndef GCBASE_GCARRAY_H
#define GCBASE_GCARRAY_H

#include <Base/GCTypes.h>
namespace GENICAM_NAMESPACE
{
template< class T>
class gcarray
{
public:
gcarray( size_t size) : m_p( NULL)
{
if(size)
m_p = new T[size];
};
~gcarray( ){ if(m_p) delete [] m_p;};
T* get() const {return m_p;} ;
T* operator *() {return m_p;} ;
T operator[](size_t idx) {return m_p[idx];} ;
private:
T* m_p;
};

}

#endif // GCBASE_GCARRAY_H
39 changes: 20 additions & 19 deletions genicam/library/CPP/include/Base/GCException.h
Expand Up @@ -91,33 +91,33 @@ namespace GENICAM_NAMESPACE
void AssembleMessage();

//! The full error message
gcstring m_What;
GENICAM_NAMESPACE::gcstring m_What;

//! The full error message
gcstring m_ExceptionType;
GENICAM_NAMESPACE::gcstring m_ExceptionType;

//! Line number at which the error occurred
unsigned int m_SourceLine;

//! Filename in which the error occurred
gcstring m_SourceFileName;
GENICAM_NAMESPACE::gcstring m_SourceFileName;

//! Error description
gcstring m_Description;
GENICAM_NAMESPACE::gcstring m_Description;

/* the following members are GenApi specific */

//! Node and method where the call stack entered the node map (may be empty)
gcstring m_EntryPoint;
GENICAM_NAMESPACE::gcstring m_EntryPoint;

//! Node where the error occurred (may be empty)
gcstring m_ErrorNodeName;
GENICAM_NAMESPACE::gcstring m_ErrorNodeName;
};

//! Creates an exception with the same functionality as the GenericException but being of different type
//! \ingroup Base_PublicUtilities
#define DECLARE_EXCEPTION( name ) \
class GCBASE_RTTI_CLASS_API name : public GenICam::GenericException \
class GCBASE_RTTI_CLASS_API name : public GENICAM_NAMESPACE::GenericException \
{ \
public: \
name( const char* pDescription, const char *pSourceFileName, int SourceLine ); \
Expand Down Expand Up @@ -193,6 +193,7 @@ namespace GENICAM_NAMESPACE
vsnprintf( pBuffer, sizeof pBuffer, pFormat, vap );
# endif

va_end(vap);

return E(pBuffer, m_SourceFileName.c_str(), m_SourceLine, m_ExceptionType.c_str());
};
Expand All @@ -214,47 +215,47 @@ namespace GENICAM_NAMESPACE

protected:
//! the path to the source file where the exception is thrown
gcstring m_SourceFileName;
GENICAM_NAMESPACE::gcstring m_SourceFileName;

//! The line within the source file where the exception is thrown
int m_SourceLine;

//! the type of the exception in string
gcstring m_ExceptionType;
GENICAM_NAMESPACE::gcstring m_ExceptionType;
};

//! \addtogroup Base_PublicImpl
//! \{

//! Fires a generic exception, e.g. throw GENERIC_EXCEPTION("%ld too large", Value);
#define GENERIC_EXCEPTION GenICam::ExceptionReporter<GenICam::GenericException>(__FILE__, __LINE__).Report
#define GENERIC_EXCEPTION GENICAM_NAMESPACE::ExceptionReporter<GENICAM_NAMESPACE::GenericException>(__FILE__, __LINE__).Report

//! Fires a bad alloc exception, e.g. throw BAD_ALLOC_EXCEPTION();
#define BAD_ALLOC_EXCEPTION GenICam::ExceptionReporter<GenICam::BadAllocException>(__FILE__, __LINE__, "BadAllocException" ).Report
#define BAD_ALLOC_EXCEPTION GENICAM_NAMESPACE::ExceptionReporter<GENICAM_NAMESPACE::BadAllocException>(__FILE__, __LINE__, "BadAllocException" ).Report

//! Fires an invalid argument exception, e.g. throw INVALID_ARGUMENT_EXCEPTION("%ld too large", Value);
#define INVALID_ARGUMENT_EXCEPTION GenICam::ExceptionReporter<GenICam::InvalidArgumentException>(__FILE__, __LINE__, "InvalidArgumentException" ).Report
#define INVALID_ARGUMENT_EXCEPTION GENICAM_NAMESPACE::ExceptionReporter<GENICAM_NAMESPACE::InvalidArgumentException>(__FILE__, __LINE__, "InvalidArgumentException" ).Report

//! Fires an out of range exception, e.g. throw OUT_OF_RANGE_EXCEPTION("%ld too large", Value);
#define OUT_OF_RANGE_EXCEPTION GenICam::ExceptionReporter<GenICam::OutOfRangeException>(__FILE__, __LINE__, "OutOfRangeException" ).Report
#define OUT_OF_RANGE_EXCEPTION GENICAM_NAMESPACE::ExceptionReporter<GENICAM_NAMESPACE::OutOfRangeException>(__FILE__, __LINE__, "OutOfRangeException" ).Report

//! Fires an property exception, e.g. throw PROPERTY_EXCEPTION("%ld too large", Value);
#define PROPERTY_EXCEPTION GenICam::ExceptionReporter<GenICam::PropertyException>(__FILE__, __LINE__, "PropertyException" ).Report
#define PROPERTY_EXCEPTION GENICAM_NAMESPACE::ExceptionReporter<GENICAM_NAMESPACE::PropertyException>(__FILE__, __LINE__, "PropertyException" ).Report

//! Fires a runtime exception, e.g. throw RUNTIME_EXCEPTION("buh!")
#define RUNTIME_EXCEPTION GenICam::ExceptionReporter<GenICam::RuntimeException>(__FILE__, __LINE__, "RuntimeException" ).Report
#define RUNTIME_EXCEPTION GENICAM_NAMESPACE::ExceptionReporter<GENICAM_NAMESPACE::RuntimeException>(__FILE__, __LINE__, "RuntimeException" ).Report

//! Fires a logical error exception, e.g. throw LOGICAL_ERROR_EXCEPTION("Should never reach this point")
#define LOGICAL_ERROR_EXCEPTION GenICam::ExceptionReporter<GenICam::LogicalErrorException>(__FILE__, __LINE__, "LogicalErrorException" ).Report
#define LOGICAL_ERROR_EXCEPTION GENICAM_NAMESPACE::ExceptionReporter<GENICAM_NAMESPACE::LogicalErrorException>(__FILE__, __LINE__, "LogicalErrorException" ).Report

//! Fires a access exception, e.g. throw ACCESS_EXCEPTION("Not everybody")
#define ACCESS_EXCEPTION GenICam::ExceptionReporter<GenICam::AccessException>(__FILE__, __LINE__, "AccessException" ).Report
#define ACCESS_EXCEPTION GENICAM_NAMESPACE::ExceptionReporter<GENICAM_NAMESPACE::AccessException>(__FILE__, __LINE__, "AccessException" ).Report

//! Fires a timeout error exception, e.g. throw TIMEOUT_EXCEPTION("Not everybody")
#define TIMEOUT_EXCEPTION GenICam::ExceptionReporter<GenICam::TimeoutException>(__FILE__, __LINE__,"TimeoutException" ).Report
#define TIMEOUT_EXCEPTION GENICAM_NAMESPACE::ExceptionReporter<GENICAM_NAMESPACE::TimeoutException>(__FILE__, __LINE__,"TimeoutException" ).Report

//! Fires a dynamic cast exception, e.g. throw DYNAMICCAST_EXCEPTION("Not everybody")
#define DYNAMICCAST_EXCEPTION GenICam::ExceptionReporter<GenICam::DynamicCastException>(__FILE__, __LINE__, "DynamicCastException" ).Report
#define DYNAMICCAST_EXCEPTION GENICAM_NAMESPACE::ExceptionReporter<GENICAM_NAMESPACE::DynamicCastException>(__FILE__, __LINE__, "DynamicCastException" ).Report

//! Range check for int64
#define CHECK_RANGE_I64(_Value, _Min, _Max, _Inc) \
Expand Down
21 changes: 14 additions & 7 deletions genicam/library/CPP/include/Base/GCNamespace.h
Expand Up @@ -31,16 +31,23 @@

#include <GenICamVersion.h>

#if ! defined( GENICAM_NAMESPACE_DEFINED )
// This is the development namespace for the GenICam libraries
#if defined(GENICAM_COMPANY_SUFFIX)
# define GENICAM_NAMESPACE GENICAM_SEP_UNDERSCORE_COMPANY(GenICam, GENICAM_VERSION_MAJOR, GENICAM_VERSION_MINOR, GENICAM_COMPANY_SUFFIX)
#else
# define GENICAM_NAMESPACE GENICAM_SEP_UNDERSCORE(GenICam, GENICAM_VERSION_MAJOR, GENICAM_VERSION_MINOR)
#endif
# if defined(GENICAM_COMPANY_SUFFIX)
# define GENICAM_NAMESPACE GENICAM_SEP_UNDERSCORE_COMPANY(GenICam, GENICAM_VERSION_MAJOR, GENICAM_VERSION_MINOR, GENICAM_COMPANY_SUFFIX)
# else
# define GENICAM_NAMESPACE GENICAM_SEP_UNDERSCORE(GenICam, GENICAM_VERSION_MAJOR, GENICAM_VERSION_MINOR)
# endif

# define GENICAM_NAMESPACE_DEFINED
#endif // GENICAM_NAMESPACE_DEFINED

namespace GENICAM_NAMESPACE {}

// Public alias
namespace GenICam = GENICAM_NAMESPACE;

#if ! defined( GENICAM_SUPPRESS_NAMESPACE_ALIAS )
// Public alias
namespace GenICam = GENICAM_NAMESPACE;
#endif // GENICAM_SUPPRESS_NAMESPACE_ALIAS

#endif // GENICAM_NAMESPACE_H

0 comments on commit 80b76c6

Please sign in to comment.