pylon/PylonBase.h#
Namespaces#
Name |
---|
Pylon Contains definitions of pylon types. |
Classes#
Name | |
---|---|
class | Pylon::PylonAutoInitTerm Helper class to automagically call PylonInitialize and PylonTerminate in constructor and destructor. |
Defines#
Name | |
---|---|
PYLONBASE_H__ | |
PYLONBASE_API | |
PYLON_BASE_3_0_DEPRECATED(message) |
Macros Documentation#
define PYLONBASE_H__#
#define PYLONBASE_H__
define PYLONBASE_API#
#define PYLONBASE_API APIIMPORT
define PYLON_BASE_3_0_DEPRECATED#
#define PYLON_BASE_3_0_DEPRECATED(
message
)
PYLON_DEPRECATED(message)
Source code#
//-----------------------------------------------------------------------------
// Basler pylon SDK
// Copyright (c) 2006-2022 Basler AG
// http://www.baslerweb.com
// Author: AH
//-----------------------------------------------------------------------------
#pragma once
#ifndef PYLONBASE_H__
#define PYLONBASE_H__
#include <pylon/Platform.h>
#ifdef _MSC_VER
# pragma pack(push, PYLON_PACKING)
#endif /* _MSC_VER */
#include <pylon/stdinclude.h>
#ifdef PYLONBASE_EXPORTS
# define PYLONBASE_API APIEXPORT
#else
# define PYLONBASE_API APIIMPORT
#endif
#if defined(PYLON_BASE_3_0_NO_DEPRECATE)
# define PYLON_BASE_3_0_DEPRECATED(message)
#else
# define PYLON_BASE_3_0_DEPRECATED(message) PYLON_DEPRECATED(message)
#endif
namespace Pylon
{
PYLONBASE_API void CDECL PylonInitialize( void );
PYLONBASE_API void CDECL PylonTerminate( bool ShutDownLogging = true );
extern "C" PYLONBASE_API void CDECL GetPylonVersion( unsigned int* major, unsigned int* minor, unsigned int* subminor, unsigned int* build );
extern "C" PYLONBASE_API const char* CDECL GetPylonVersionString();
PYLONBASE_API void CDECL SetProperty( int propertyId, const void* pData, size_t size );
PYLONBASE_API void CDECL GetProperty( int propertyId, void* pData, size_t* pSize );
class PylonAutoInitTerm
{
public:
PYLONBASE_API PylonAutoInitTerm( void )
{
PylonInitialize();
}
PYLONBASE_API ~PylonAutoInitTerm( void )
{
PylonTerminate();
}
private:
// unimplemented new operator to prevent creation on the heap which is a bad idea.
// This object must be created in the local stack frame (see sample above)
void* operator new(size_t);
void* operator new[]( size_t );
};
} // namespace Pylon
#ifdef _MSC_VER
# pragma pack(pop)
#endif /* _MSC_VER */
#endif /* PYLONBASE_H__ */
Updated on 5 July 2022 at 15:30:01