te::core Namespace Reference

Namespaces

 plugin
 

Classes

class  AbstractPlugin
 The base class for plugins in TerraLib. More...
 
class  AbstractPluginEngine
 The base class for plugin engines. More...
 
class  CharEncoding
 A class for handling character enconding/decoding. More...
 
class  CppPlugin
 The base class for C++ plugins. More...
 
class  CppPluginEngine
 
class  CppPluginProxy
 A proxy class for C++ plugins. More...
 
struct  Exception
 Base exception class for TerraLib Core Runtime Library. More...
 
class  FileSystem
 A class for handling system files and paths using UTF-8 strings. More...
 
struct  HostApplication
 Describe the host system. More...
 
struct  Info
 Basic information about a module. More...
 
class  Library
 A class for handling shared libraries (DLLs, SO, DyLibs). More...
 
struct  LibraryEntry
 
struct  LibraryInvalidSearchPathException
 An exception indicating an error when adding a given path to the operational system search library path. More...
 
struct  LibraryLoadException
 An exception indicating an error when loading a shared library. More...
 
class  LibraryManager
 A singleton that can be used to observe the available libraries in the system. More...
 
struct  LibraryNameException
 An execption indicating an error when the library name is empty. More...
 
struct  LibraryResetSearchPathException
 An exception indicating an error when reseting the operational system search library path. More...
 
struct  LibrarySearchPathException
 An exception indicating the operational system search library path was not found. More...
 
struct  LibrarySymbolNotFoundException
 An exception indicating an error when searching for a given symbol in a shared library. More...
 
struct  LibraryUnloadException
 An exception indicating an error when releasing a shared library. More...
 
class  Logger
 
struct  PluginCyclicDependencyException
 An exception indicating an error when two or more plugins have cyclic dependecy. More...
 
struct  PluginEngineLoadException
 An exception indicating an error when loading a plugin. More...
 
class  PluginEngineManager
 A singleton that can be used to register plugin engines. More...
 
struct  PluginEngineUnloadException
 An exception indicating an error when releasing a given plugin. More...
 
struct  PluginHasDependentException
 An exception indicating an error when trying to shutdown a plugin with a dependent. More...
 
struct  PluginInfo
 Basic information about a plugin. More...
 
struct  PluginLoadException
 An exception indicating an error when loading a plugin. More...
 
class  PluginManager
 A singleton for managing plugins. More...
 
struct  PluginMissingDependencyException
 An exception indicating an error when a dependecy is missing. More...
 
struct  PluginShutdownException
 An exception indicating an error when shutting down a plugin. More...
 
struct  PluginStartupException
 An exception indicating an error when trying to start a plugin. More...
 
struct  PluginUnloadException
 An exception indicating an error when unloading a plugin. More...
 
struct  Provider
 Describe the module provider. More...
 
class  TerraLib
 An utility class to control the startup and cleanup of the TerraLib Platform and its resources. More...
 
class  Translator
 This singleton is designed to deal with multi-language text translation in TerraLib. More...
 
class  URI
 A class for representing an Uniform Resource Identifier (URI). More...
 
struct  URIException
 Base exception for DataRetrieverWCS. More...
 

Typedefs

typedef boost::function0< void > CleanupFnct
 
typedef std::pair< std::string, std::string > Parameter
 
typedef std::pair< std::string, std::string > Resource
 
typedef boost::function0< void > StartupFnct
 
typedef CppPlugin *(* te_get_plugin_fnct_t) (const PluginInfo &pinfo)
 The type of function for plugin's entry point. More...
 

Enumerations

enum  EncodingType {
  EncodingType::UTF8, EncodingType::CP1250, EncodingType::CP1251, EncodingType::CP1252,
  EncodingType::CP1253, EncodingType::CP1254, EncodingType::CP1257, EncodingType::LATIN1
}
 Supported character encodings. More...
 

Functions

char * Binary2Hex (const char *s, std::size_t size)
 Each char from the array of characters in binary format is converted into a pair of hex characters. The final string is NULL terminated. More...
 
void Binary2Hex (const char *s, std::size_t size, char *outBuff)
 Each char from the array of characters in binary format is converted into a pair of hex characters. The final string is NULL terminated. More...
 
void Char2Hex (unsigned char c, char *r)
 It converts the character to a hex representation. More...
 
TECOREEXPORT std::vector< PluginInfoDefaultPluginFinder ()
 
TECOREEXPORT std::map< std::string, std::string > Expand (const std::string &query_str)
 Split a query string into its components. More...
 
TECOREEXPORT std::string FindInTerraLibPath (const std::string &path)
 Returns the path relative to a directory or file in the context of TerraLib. More...
 
TECOREEXPORT std::string GetAppDataLocation ()
 It returns the writable folder location to store application data applied to all users. More...
 
TECOREEXPORT std::string GetAppLocalDataLocation ()
 It returns the writable folder location to store per user data. More...
 
unsigned char GetDecimalFromHexLCase (char hexValue)
 It returns the decimal value in a char from a given hex value (for example: 'a' => 10, '8' => 8). More...
 
unsigned char GetDecimalFromHexNotCS (unsigned char hexValue)
 It returns the decimal value in a char from a given hex value (for example: 'A' => 10, '8' => 8). More...
 
unsigned char GetDecimalFromHexUCase (char hexValue)
 It returns the decimal value in a char from a given hex value (for example: 'A' => 10, '8' => 8). More...
 
TECOREEXPORT std::string GetUserDirectory ()
 Returns the system user home dir path. More...
 
char * Hex2Binary (const char *hex)
 It converts each pair of hex characters from a NULL-terminated string of hex characters into a binary format. More...
 
void Hex2Binary (const char *hex, std::size_t hSize, char *outBuff)
 It converts each pair of hex characters from an input string of hex characters into a binary format. More...
 
char * Hex2Binary2 (const char *hex)
 It converts each pair of hex characters from a NULL-terminated string of hex characters into a binary format. More...
 
void Hex2Binary2 (const char *hex, std::size_t hSize, char *outBuff)
 It converts each pair of hex characters from an input string of hex characters into a binary format. More...
 
char Hex2Char (const char *hex)
 It converts the character from a hex representation to a byte. More...
 
unsigned char Hex2Char2 (const char *hex)
 It converts the character from a hex representation to a byte. More...
 
TECOREEXPORT PluginInfo JSONPluginInfoSerializer (const std::string &file_name)
 A plugin finder that search for plugins in some special directories defined by compile time macros. More...
 
TECOREEXPORT std::vector< PluginInfoPluginFinder (const std::vector< std::string > &dirs)
 
TECOREEXPORT std::string URIDecode (const std::string &srcUri)
 Decodes an encoded URI. The algorithm implementation is based on http://www.codeguru.com/cpp/cpp/algorithms/strings/article.php/c12759/URI-Encoding-and-Decoding.htm. More...
 
TECOREEXPORT std::string URIEncode (const std::string &srcUri)
 Encodes an decoded URI. The algorithm implementation is based on http://www.codeguru.com/cpp/cpp/algorithms/strings/article.php/c12759/URI-Encoding-and-Decoding.htm. More...
 

Typedef Documentation

typedef boost::function0<void> te::core::CleanupFnct

Definition at line 58 of file LibraryManager.h.

typedef std::pair< std::string, std::string > te::core::Parameter

Definition at line 62 of file LibraryInfo.h.

typedef std::pair< std::string, std::string > te::core::Resource

Definition at line 60 of file LibraryInfo.h.

typedef boost::function0<void> te::core::StartupFnct

Definition at line 51 of file LibraryManager.h.

typedef CppPlugin*(* te::core::te_get_plugin_fnct_t) (const PluginInfo &pinfo)

The type of function for plugin's entry point.

Definition at line 77 of file CppPlugin.h.

Enumeration Type Documentation

Supported character encodings.

Enumerator
UTF8 

UTF-8 encoding.

CP1250 

CP1250 encoding.

CP1251 

CP1251 encoding.

CP1252 

CP1252 encoding.

CP1253 

CP1253 encoding.

CP1254 

CP1254 encoding.

CP1257 

CP1257 encoding.

LATIN1 

Latin1 encoding (ISO8859-1).

Definition at line 50 of file CharEncoding.h.

Function Documentation

char* te::core::Binary2Hex ( const char *  s,
std::size_t  size 
)
inline

Each char from the array of characters in binary format is converted into a pair of hex characters. The final string is NULL terminated.

Parameters
sAn array of characters in binary format.
sizeThe size of the string of characters (not including the trailing '\0').
Note
The caller of this function will take the ownership of the returned pointer, so it must delete it. Use delete [] returned_pointer.
The returned buffer size is: 2 * size + 1.

Definition at line 602 of file HexUtils.h.

References Char2Hex().

void te::core::Binary2Hex ( const char *  s,
std::size_t  size,
char *  outBuff 
)
inline

Each char from the array of characters in binary format is converted into a pair of hex characters. The final string is NULL terminated.

Parameters
sAn array of characters in binary format.
sizeThe size of the string of characters (not including the trailing '\0').
outBuffA pointer to a pre-allocated buffer where to output the binary version. It must have at least 2*size+1 bytes.

Definition at line 623 of file HexUtils.h.

References Char2Hex().

void te::core::Char2Hex ( unsigned char  c,
char *  r 
)
inline

It converts the character to a hex representation.

Parameters
cThe byte to be transformed to hex representation.
rThe resulting hex encoding will be write in the r pointer.
Note
It is used by Binary2Hex function.

Definition at line 248 of file HexUtils.h.

Referenced by Binary2Hex().

TECOREEXPORT std::vector<PluginInfo> te::core::DefaultPluginFinder ( )

A plugin finder that search for plugins in some special directories defined by compile time macros.

TECOREEXPORT std::map<std::string, std::string> te::core::Expand ( const std::string &  query_str)

Split a query string into its components.

Parameters
query_strThe query string that will have the data extracted.
Exceptions
ExceptionAn exception can be thrown, if a parser error occurs during decomposition of the query string.
Returns
A container with the key-value pairs extracted from the query string.
TECOREEXPORT std::string te::core::FindInTerraLibPath ( const std::string &  path)

Returns the path relative to a directory or file in the context of TerraLib.

Parameters
pathA path to be searched in the TerraLib context.
Returns
A complete path to the file or directory if it is found, otherwise returns an empty string.
TECOREEXPORT std::string te::core::GetAppDataLocation ( )

It returns the writable folder location to store application data applied to all users.

Returns
The folder location to store application data applied to all users.
TECOREEXPORT std::string te::core::GetAppLocalDataLocation ( )

It returns the writable folder location to store per user data.

Returns
The folder location to store per user data.
unsigned char te::core::GetDecimalFromHexLCase ( char  hexValue)
inline

It returns the decimal value in a char from a given hex value (for example: 'a' => 10, '8' => 8).

Parameters
hexValueThe hex value we want to extract the decimal value.
Returns
The decimal value in a char from a given hex value (for example: 'a' => 10, '8' => 8).
Note
This version is lower case sensitive, i. e., 'a' will return 10 and 'A' will return a wrong value.

Definition at line 185 of file HexUtils.h.

unsigned char te::core::GetDecimalFromHexNotCS ( unsigned char  hexValue)
inline

It returns the decimal value in a char from a given hex value (for example: 'A' => 10, '8' => 8).

Parameters
hexValueThe hex value we want to extract the decimal value.
Returns
The decimal value in a char from a given hex value (for example: 'A' => 10, '8' => 8).
Note
This version is not case sensitive, i. e., 'A' and 'a' will return 10.

Definition at line 49 of file HexUtils.h.

Referenced by te::color::RGBAColor::setColor().

unsigned char te::core::GetDecimalFromHexUCase ( char  hexValue)
inline

It returns the decimal value in a char from a given hex value (for example: 'A' => 10, '8' => 8).

Parameters
hexValueThe hex value we want to extract the decimal value.
Returns
The decimal value in a char from a given hex value (for example: 'A' => 10, '8' => 8).
Note
This version is upper case sensitive, i. e., 'A' will return 10 and 'a' will return a wrong value.

Definition at line 119 of file HexUtils.h.

TECOREEXPORT std::string te::core::GetUserDirectory ( )

Returns the system user home dir path.

Returns
Returns the system user home dir path.
Note
An empty string will be returned on errors.

Referenced by te::rp::Matrix< TemplateElementType >::createNewDiskFile().

char* te::core::Hex2Binary ( const char *  hex)
inline

It converts each pair of hex characters from a NULL-terminated string of hex characters into a binary format.

This function can be used, for example, to decode the returned geometry from PostGIS.

Parameters
hexA NULL-terminated string of hexadecimal characters.
Returns
An array of binary characters in binary format.
Note
The size of the returned array is the half of the input array.
The caller of this function will take the ownership of the returned pointer, so it must delete it. Use delete [] returned_pointer.

Definition at line 469 of file HexUtils.h.

void te::core::Hex2Binary ( const char *  hex,
std::size_t  hSize,
char *  outBuff 
)
inline

It converts each pair of hex characters from an input string of hex characters into a binary format.

This version can be used for those who wants to pre-allocate the memory where the parsed version will be output.

Parameters
hexA string of hexadecimal characters.
hSizeThe number of bytes in the input string. Remember that it must be a multiple of 2.
outBuffA pointer to a pre-allocated buffer where to output the binary version. It must have at least hSize/2 bytes.
Note
The size of the input buffer (outBuff) must be at least the half of the input array.
The outBuff can be the same as the input buffer; in this case the input will be overwritten.

Definition at line 515 of file HexUtils.h.

char* te::core::Hex2Binary2 ( const char *  hex)
inline

It converts each pair of hex characters from a NULL-terminated string of hex characters into a binary format.

This function can be used, for example, to decode the returned geometry from PostGIS.

Parameters
hexA NULL-terminated string of hexadecimal characters.
Returns
An array of binary characters in binary format.
Note
The size of the returned array is the half of the input array.
The caller of this function will take the ownership of the returned pointer, so it must delete it. Use delete [] returned_pointer.
Warning
In our tests, this version was slower than the other equivalent.

Definition at line 557 of file HexUtils.h.

References Hex2Char2().

void te::core::Hex2Binary2 ( const char *  hex,
std::size_t  hSize,
char *  outBuff 
)
inline

It converts each pair of hex characters from an input string of hex characters into a binary format.

This version can be used for those who wants to pre-allocate the memory where the parsed version will be output.

Parameters
hexA string of hexadecimal characters.
hSizeThe number of bytes in the input string. Remember that it must be a multiple of 2.
outBuffA pointer to a pre-allocated buffer where to output the binary version. It must have at least hSize/2 bytes.
Note
The size of the input buffer (outBuff) must be at least the half of the input array.

Definition at line 583 of file HexUtils.h.

References Hex2Char2().

char te::core::Hex2Char ( const char *  hex)
inline

It converts the character from a hex representation to a byte.

Parameters
hAt least a pair of bytes to be transformed from a hex representation.
Note
It is used by Hex2Binary function.
Returns
A byte representation from a two bytes hex representation.

Definition at line 270 of file HexUtils.h.

unsigned char te::core::Hex2Char2 ( const char *  hex)
inline

It converts the character from a hex representation to a byte.

Parameters
hAt least a pair of bytes to be transformed from a hex representation.
Note
It is used by Hex2Binary function.
Returns
A byte representation from a two bytes hex representation.
Warning
In our tests, this version was slower than the other.

Definition at line 301 of file HexUtils.h.

Referenced by Hex2Binary2().

TECOREEXPORT PluginInfo te::core::JSONPluginInfoSerializer ( const std::string &  file_name)

A plugin finder that search for plugins in some special directories defined by compile time macros.

Exceptions
InvalidArgumentExceptionif the given file_name doesn't exist
TECOREEXPORT std::vector<PluginInfo> te::core::PluginFinder ( const std::vector< std::string > &  dirs)

A plugin finder that search for plugins in some special directories defined by configuration file.

TECOREEXPORT std::string te::core::URIDecode ( const std::string &  srcUri)

Decodes an encoded URI. The algorithm implementation is based on http://www.codeguru.com/cpp/cpp/algorithms/strings/article.php/c12759/URI-Encoding-and-Decoding.htm.

Parameters
srcUriURI to be decoded
Returns
A string with decoded URI.
TECOREEXPORT std::string te::core::URIEncode ( const std::string &  srcUri)

Encodes an decoded URI. The algorithm implementation is based on http://www.codeguru.com/cpp/cpp/algorithms/strings/article.php/c12759/URI-Encoding-and-Decoding.htm.

Parameters
srcUriURI to be encoded
Returns
A string with encoded URI.