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 );
129 #if defined(UNDER_RTSS) 130 GCBASE_API
bool DoesFileExist(
const gcstring &FilePath );
132 #endif // defined(UNDER_RTSS) 183 gcstring_vector& tokens,
190 gcstring_vector &FileNames,
191 const bool DirectoriesOnly =
false );
197 #define GENICAM_UNUSED(unused_var) ((void)(unused_var)) 199 #if !defined(GENICAM_DEPRECATED) 200 # if defined(__GNUC__) && (((__GNUC__ * 100) + __GNUC_MINOR__ ) >= 301) // is at least GCC 3.1 compiler? 201 # define GENICAM_DEPRECATED(FUNCTION) FUNCTION __attribute__ ((deprecated)) 202 # elif defined(_MSC_VER) && (_MSC_VER >= 1300) // is at least VC 2003 compiler? 203 # define GENICAM_DEPRECATED(FUNCTION) __declspec(deprecated) FUNCTION 205 # define GENICAM_DEPRECATED(FUNCTION) FUNCTION 206 # endif // compiler check 207 #endif // #if !defined(GENICAM_DEPRECATED) 219 #define _TO_STRING( __stN ) #__stN 220 #define EXPAND_TO_STRINGISE( __stN ) _TO_STRING( __stN ) 221 #define __LINE_STR__ EXPAND_TO_STRINGISE(__LINE__) 222 #define __LOCATION__ __FILE__ "(" __LINE_STR__ ")" 223 #define __OUTPUT_FORMATER__(_type) __LOCATION__ " : " _type " : " 226 #define __WARN__ __OUTPUT_FORMATER__("WARNING") 227 #define __ERR__ __OUTPUT_FORMATER__("ERROR") 228 #define __TODO__ __OUTPUT_FORMATER__("TBD") 230 #endif // GENAPI_GENAPIUTILITIES_DEF_H_ GCBASE_API void SetGenICamLogConfig(const gcstring &path)
Stores the path of the GenICam logging properties file.
GCBASE_API gcstring GetGenICamCacheFolder(void)
Retrieve the path of the GenICam cache folder.
GCBASE_API gcstring GetGenICamCLProtocolFolder(void)
Retrieve the path of the CLProtocol folder.
GCBASE_API GENICAM_NAMESPACE::gcstring UrlDecode(const GENICAM_NAMESPACE::gcstring &Input)
Replaces xx escapes by their char equivalent.
helpers for pragma linkage
Portable string vector implementation.
GCBASE_API gcstring GetGenICamLogConfig(void)
Retrieve the path of the GenICam logging properties file.
#define RUNTIME_EXCEPTION
Fires a runtime exception, e.g. throw RUNTIME_EXCEPTION("buh!")
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
GCBASE_API void SetGenICamCLProtocolFolder(const gcstring &path)
Stores the path of the CLProtocol folder.
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.
central versioning counters
GCBASE_API gcstring UrlEncode(const GENICAM_NAMESPACE::gcstring &Input)
Converts \ to / and replaces all unsafe characters by their xx equivalent.
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 gcstring GetValueOfEnvironmentVariable(const gcstring &VariableName)
Retrieve the value of an environment variable.
GCBASE_API void SetGenICamCacheFolder(const gcstring &path)
Stores the path of the GenICam cache folder.
GCBASE_API void ReplaceEnvironmentVariables(gcstring &Buffer, bool ReplaceBlankBy20=false)
Replaces in a string and replace ' ' with %20.
A string class which is a clone of std::string.
GCBASE_API bool DoesEnvironmentVariableExist(const gcstring &VariableName)
Returns true if an environment variable exists.
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...
Portable string implementation.
GCBASE_API gcstring GetModulePathFromFunction(void *pFunction)
true = only subdirectories (ex . and ..) are retrieved; false = only files are retrieved ...
Platform-dependent type definitions.