Go to the documentation of this file.
30 #ifndef GENAPI_GENAPIUTILITIES_DEF_H_
31 #define GENAPI_GENAPIUTILITIES_DEF_H_
45 #if defined(UNDER_RTSS)
47 #endif // defined(UNDER_RTSS)
49 #if defined(UNDER_RTSS)
50 #define USE_TEMP_CACHE_FILE 0
52 #define USE_TEMP_CACHE_FILE 1
53 #endif // defined(UNDER_RTSS)
55 #if defined(UNDER_RTSS)
56 #define USE_TEMP_CACHE_FILE 0
58 #define USE_TEMP_CACHE_FILE 1
59 #endif // defined(UNDER_RTSS)
61 #if defined (_MSC_VER)
63 # define PLATFORM_NAME "Win64_x64"
65 # define PLATFORM_NAME "Win32_i86"
67 #elif defined (__GNUC__)
68 # define GENICAM_GCC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__)
69 # if defined (__LP64__)
70 # if defined (__linux__)
71 # define PLATFORM_NAME "Linux64_x64"
72 # elif defined (__APPLE__)
73 # define PLATFORM_NAME "Maci64_x64"
75 # error Unknown Platform
78 # if defined (__linux__)
79 # define PLATFORM_NAME "Linux32_i86"
80 # elif defined (__APPLE__)
81 # error Unsupported Platform
82 # elif defined (VXWORKS)
83 # define PLATFORM_NAME "VxWorks_PPC"
85 # error Unknown Platform
89 # error Unknown Platform
93 # define GC_COUNTOF(arr) (sizeof (arr) / sizeof (arr)[0] )
100 template<
typename Td,
typename Ts>
103 const Td d =
static_cast<Td
>( s );
104 if (
static_cast<Ts
>( d ) != s ){
115 return INTEGRAL_CAST2<T, int64_t>( ll );
144 #if defined(UNDER_RTSS)
145 GCBASE_API
bool DoesFileExist(
const gcstring &FilePath );
147 #endif // defined(UNDER_RTSS)
198 gcstring_vector& tokens,
199 const gcstring& delimiters =
" "
204 const gcstring &FileTemplate,
205 gcstring_vector &FileNames,
206 const bool DirectoriesOnly =
false );
212 #define GENICAM_UNUSED(unused_var) ((void)(unused_var))
214 #if !defined(GENICAM_DEPRECATED)
215 # if defined(__GNUC__) && (((__GNUC__ * 100) + __GNUC_MINOR__ ) >= 301) // is at least GCC 3.1 compiler?
216 # define GENICAM_DEPRECATED(FUNCTION) FUNCTION __attribute__ ((deprecated))
217 # elif defined(_MSC_VER) && (_MSC_VER >= 1300) // is at least VC 2003 compiler?
218 # define GENICAM_DEPRECATED(FUNCTION) __declspec(deprecated) FUNCTION
220 # define GENICAM_DEPRECATED(FUNCTION) FUNCTION
221 # endif // compiler check
222 #endif // #if !defined(GENICAM_DEPRECATED)
234 #define _TO_STRING( __stN ) #__stN
235 #define EXPAND_TO_STRINGISE( __stN ) _TO_STRING( __stN )
236 #define __LINE_STR__ EXPAND_TO_STRINGISE(__LINE__)
237 #define __LOCATION__ __FILE__ "(" __LINE_STR__ ")"
238 #define __OUTPUT_FORMATER__(_type) __LOCATION__ " : " _type " : "
241 #define __WARN__ __OUTPUT_FORMATER__("WARNING")
242 #define __ERR__ __OUTPUT_FORMATER__("ERROR")
243 #define __TODO__ __OUTPUT_FORMATER__("TBD")
245 #endif // GENAPI_GENAPIUTILITIES_DEF_H_
helpers for pragma linkage
T INTEGRAL_CAST(int64_t ll)
This verifies at runtime if there was no loss of data if an int64_t was downcast to type T (e....
Td INTEGRAL_CAST2(Ts s)
This verifies at runtime if there was no loss of data if an type Ts (e.g. int64t) was downcast to typ...
GCBASE_API void GetLastErrorMessage(gcstring &Message)
A string class which is a clone of std::string.
Portable string vector implementation.
GCBASE_API void Tokenize(const gcstring &str, gcstring_vector &tokens, const gcstring &delimiters=" ")
splits str input string into a list of tokens using the delimiter
central versioning counters
GCBASE_API gcstring UrlEncode(const GENICAM_NAMESPACE::gcstring &Input)
Converts \ to / and replaces all unsafe characters by their xx equivalent.
GCBASE_API void SetGenICamCacheFolder(const gcstring &path)
Stores the path of the GenICam cache folder.
GCBASE_API gcstring GetGenICamLogConfig(void)
Retrieve the path of the GenICam logging properties file.
GCBASE_API gcstring GetValueOfEnvironmentVariable(const gcstring &VariableName)
Retrieve the value of an environment variable.
GCBASE_API void SetGenICamCLProtocolFolder(const gcstring &path)
Stores the path of the CLProtocol folder.
GCBASE_API gcstring GetGenICamCacheFolder(void)
Retrieve the path of the GenICam cache folder.
GCBASE_API GENICAM_NAMESPACE::gcstring UrlDecode(const GENICAM_NAMESPACE::gcstring &Input)
Replaces xx escapes by their char equivalent.
GCBASE_API bool HasValidLength(const gcstring &FileName)
Returns the truth value for the proposition: The given file name has the valid length.
GCBASE_API void GetFiles(const gcstring &FileTemplate, gcstring_vector &FileNames, const bool DirectoriesOnly=false)
Gets a list of files or directories matching a given FileTemplate.
GCBASE_API void GetCandidateCacheFilePaths(gcstring_vector &CacheFileNames, const gcstring &CacheFileDirectory)
Platform-dependent type definitions.
GCBASE_API bool GetCacheFileDirectory(gcstring &CacheFileDirectory)
Returns the directory where cache files are located.
GCBASE_API void ReplaceEnvironmentVariables(gcstring &Buffer, bool ReplaceBlankBy20=false)
Replaces in a string and replace ' ' with %20.
#define RUNTIME_EXCEPTION
Fires a runtime exception, e.g. throw RUNTIME_EXCEPTION("buh!")
GCBASE_API void SetGenICamLogConfig(const gcstring &path)
Stores the path of the GenICam logging properties file.
GCBASE_API bool HasValidExtension(const gcstring &FileName)
Returns the truth value for the proposition: The given file has the valid file extension.
GCBASE_API gcstring GetGenICamCLProtocolFolder(void)
Retrieve the path of the CLProtocol folder.
GCBASE_API bool DoesEnvironmentVariableExist(const gcstring &VariableName)
Returns true if an environment variable exists.
GCBASE_API gcstring GetModulePathFromFunction(void *pFunction)
true = only subdirectories (ex . and ..) are retrieved; false = only files are retrieved
Portable string implementation.
rc_genicam_api
Author(s): Heiko Hirschmueller
autogenerated on Wed Dec 4 2024 03:10:11