Spinnaker SDK C++
4.2.0.21
 
 

 
Loading...
Searching...
No Matches
GCUtilities Utility

Functions

template<typename Td , typename Ts >
Td INTEGRAL_CAST2 (Ts s)
 This verifies at runtime if there was no loss of data if an type Ts (e.g.
 
template<typename 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.g.
 
SPINNAKER_API bool DoesEnvironmentVariableExist (const Spinnaker::GenICam::gcstring &VariableName)
 Returns true if an environment variable exists.
 
SPINNAKER_API gcstring GetValueOfEnvironmentVariable (const gcstring &VariableName)
 Retrieve the value of an environment variable.
 
SPINNAKER_API bool GetValueOfEnvironmentVariable (const gcstring &VariableName, gcstring &VariableContent)
 Retrieve the value of an environment variable.
 
SPINNAKER_API gcstring UrlEncode (const gcstring &Input)
 Converts \ to / and replaces all unsave characters by their xx equivalent.
 
SPINNAKER_API gcstring UrlDecode (const gcstring &Input)
 Replaces xx escapes by their char equivalent.
 
SPINNAKER_API void ReplaceEnvironmentVariables (gcstring &Buffer, bool ReplaceBlankBy20=false)
 Replaces in a string and replace ' ' with %20.
 
SPINNAKER_API gcstring GetGenICamCacheFolder (void)
 Retrieve the path of the GenICam cache folder The path to the cache folder can be stored by calling SetGenICamCacheFolder().
 
SPINNAKER_API gcstring GetGenICamLogConfig (void)
 Retrieve the path of the GenICam logging properties file.
 
SPINNAKER_API gcstring GetGenICamCLProtocolFolder (void)
 Retrieve the path of the CLProtocol folder The path to the CLProtocol folder can be stored by calling SetGenICamCLProtocolFolder().
 
SPINNAKER_API void SetGenICamCacheFolder (const gcstring &path)
 Stores the path of the GenICam cache folder.
 
SPINNAKER_API void SetGenICamLogConfig (const gcstring &path)
 Stores the path of the GenICam logging properties file.
 
SPINNAKER_API void SetGenICamCLProtocolFolder (const gcstring &path)
 Stores the path of the CLProtocol folder.
 
SPINNAKER_API void Tokenize (const gcstring &str, gcstring_vector &tokens, const gcstring &delimiters=" ")
 splits str input string into a list of tokens using the delimiter
 
SPINNAKER_API void GetFiles (const gcstring &FileTemplate, gcstring_vector &FileNames, const bool DirectoriesOnly=false)
 Gets a list of files or directories matching a given FileTemplate.
 
SPINNAKER_API gcstring GetModulePathFromFunction (void *pFunction)
 Gets the full path to the module (DLL/SO) containing the given pFunction; empty string if not found.
 

Detailed Description

Function Documentation

◆ DoesEnvironmentVariableExist()

SPINNAKER_API bool DoesEnvironmentVariableExist ( const Spinnaker::GenICam::gcstring VariableName)

Returns true if an environment variable exists.

◆ GetFiles()

SPINNAKER_API void GetFiles ( const gcstring FileTemplate,
gcstring_vector &  FileNames,
const bool  DirectoriesOnly = false 
)

Gets a list of files or directories matching a given FileTemplate.

Parameters
FileNames

‍The file template. Can contain environment variables.

DirectoriesOnly

‍A list of files matching the file template

◆ GetGenICamCacheFolder()

SPINNAKER_API gcstring GetGenICamCacheFolder ( void  )

Retrieve the path of the GenICam cache folder The path to the cache folder can be stored by calling SetGenICamCacheFolder().

If GetGenICamCacheFolder() is called before SetGenICamCacheFolder(), it will return the value of environment variable GENICAM_CACHE_Vx_y. If this environment variable does not exist, an exception will be thrown.

◆ GetGenICamCLProtocolFolder()

SPINNAKER_API gcstring GetGenICamCLProtocolFolder ( void  )

Retrieve the path of the CLProtocol folder The path to the CLProtocol folder can be stored by calling SetGenICamCLProtocolFolder().

If GetGenICamCLProtocolFolder() is called before SetGenICamCLProtocolFolder(), it will return the value of environment variable GENICAM_CLPROTOCOL. If this environment variable does not exist, an exception will be thrown.

◆ GetGenICamLogConfig()

SPINNAKER_API gcstring GetGenICamLogConfig ( void  )

Retrieve the path of the GenICam logging properties file.

The path to the logging properties file can be stored by calling SetGenICamLogConfig(). If GetGenICamLogConfig() is called before SetGenICamLogConfig(), it will return the value of environment variable GENICAM_LOG_CONFIG_Vx_y. If this environment variable does not exist, an exception will be thrown.

◆ GetModulePathFromFunction()

SPINNAKER_API gcstring GetModulePathFromFunction ( void *  pFunction)

Gets the full path to the module (DLL/SO) containing the given pFunction; empty string if not found.

‍true = only subdirectories (ex . and ..) are retrieved; false = only files are retrieved

◆ GetValueOfEnvironmentVariable() [1/2]

SPINNAKER_API gcstring GetValueOfEnvironmentVariable ( const gcstring VariableName)

Retrieve the value of an environment variable.

Exceptions
runtime_exceptionif not found

◆ GetValueOfEnvironmentVariable() [2/2]

SPINNAKER_API bool GetValueOfEnvironmentVariable ( const gcstring VariableName,
gcstring VariableContent 
)

Retrieve the value of an environment variable.

Returns
true if environment variable was found, otherwise false

◆ INTEGRAL_CAST()

template<typename T >
T INTEGRAL_CAST ( int64_t  ll)
inline

This verifies at runtime if there was no loss of data if an int64_t was downcast to type T (e.g.

int32_t)

◆ INTEGRAL_CAST2()

template<typename Td , typename Ts >
Td INTEGRAL_CAST2 ( Ts  s)
inline

This verifies at runtime if there was no loss of data if an type Ts (e.g.

int64t) was downcast to type Td (e.g. int32_t)

◆ ReplaceEnvironmentVariables()

SPINNAKER_API void ReplaceEnvironmentVariables ( gcstring Buffer,
bool  ReplaceBlankBy20 = false 
)

Replaces in a string and replace ' ' with %20.

◆ SetGenICamCacheFolder()

SPINNAKER_API void SetGenICamCacheFolder ( const gcstring path)

Stores the path of the GenICam cache folder.

◆ SetGenICamCLProtocolFolder()

SPINNAKER_API void SetGenICamCLProtocolFolder ( const gcstring path)

Stores the path of the CLProtocol folder.

◆ SetGenICamLogConfig()

SPINNAKER_API void SetGenICamLogConfig ( const gcstring path)

Stores the path of the GenICam logging properties file.

◆ Tokenize()

SPINNAKER_API void Tokenize ( const gcstring str,
gcstring_vector &  tokens,
const gcstring delimiters = " " 
)

splits str input string into a list of tokens using the delimiter

Parameters
strstring to be split
tokensresult of the splitting operation
delimitersdelimiters for the splitting

◆ UrlDecode()

SPINNAKER_API gcstring UrlDecode ( const gcstring Input)

Replaces xx escapes by their char equivalent.

◆ UrlEncode()

SPINNAKER_API gcstring UrlEncode ( const gcstring Input)

Converts \ to / and replaces all unsave characters by their xx equivalent.