|
neic-glass3
1.4.6
|
The neic-glass3 project namespace containing utility classes and functions. More...
Classes | |
| class | BaseClass |
| glass3::util::BaseClass class - encapsulates the most basic setup and configuration logic. More... | |
| class | Cache |
| glass3::util::Cache class - a thread safe in-memory cache More... | |
| class | Config |
| neic-glass3 configuration class using JSON formatting More... | |
| class | Date |
| time translation class More... | |
| class | Geo |
| geographic coordinate conversion class More... | |
| class | GlassID |
| glassutil id generation class More... | |
| class | GlassMath |
| glassutil logging class More... | |
| interface | iAssociator |
| The associator messaging interface, used in sending configuration and input data to neic-glass3, specifically the glasscore libraries. More... | |
| interface | iInput |
| The input data retrieval interface, used to provide input data to other parts of neic-glass3. More... | |
| interface | iOutput |
| The output message interface, used in sending data to output classes in neic-glass3. More... | |
| class | Logger |
| glassutil logging class More... | |
| class | Queue |
| glass3::util::Queue class More... | |
| class | Taper |
| glassutil taper class More... | |
| class | ThreadBaseClass |
| glass3::util::ThreadBaseClass class More... | |
| class | ThreadPool |
| glass3::util::ThreadPool class More... | |
Enumerations | |
| enum | ThreadState { Initialized = 0, Starting = 1, Started = 2, Stopping = -1, Stopped = -2 } |
| glass3::util::ThreadState enumeration More... | |
| enum | WorkState { Idle = 0, OK = 1, Error = -1 } |
| glass3::util::WorkState enumeration More... | |
Functions | |
| bool | getFirstFileNameByExtension (const std::string &path, const std::string &extension, std::string &fileName) |
| get the next file name in a directory More... | |
| bool | moveFileTo (std::string fileName, const std::string &dirName) |
| move a file from one directory to another More... | |
| bool | copyFileTo (std::string from, std::string to) |
| copy a file from one directory to another More... | |
| bool | deleteFileFrom (std::string fileName) |
| delete a file More... | |
| std::vector< std::string > | split (const std::string &sInput, char cDelimiter) |
| split a string into substrings More... | |
| std::string & | removeChars (std::string &sInput, const std::string &sRemoveChars) |
| remove all instances of characters from a string More... | |
| std::string | to_string_with_precision (const double doubleVal, const int precisionVal=2) |
| convert provided double to a string with desired precision More... | |
Variables | |
| char | envTZ [MAXENV] |
| A character array used to store the environment variable TZ. It will be stored after the first call to ConvertISO8601ToEpochTime() More... | |
The neic-glass3 project namespace containing utility classes and functions.
The neic-glass3 util namespace contains various base classes, class interfaces, and utility classes and functions used by other components of neic-glass3.
glass3::util::ThreadState enumeration
This enumeration defines the values used in tracking the state of a thread.
| Enumerator | |
|---|---|
| Initialized |
thread has been initialized |
| Starting |
thread is starting up |
| Started |
thread has been started |
| Stopping |
thread is shutting down |
| Stopped |
thread is shut down |
glass3::util::WorkState enumeration
This enumeration defines the values used in tracking the state of a work() call in ThreadBaseClass.
| Enumerator | |
|---|---|
| Idle |
There was no work to perform |
| OK |
The work was completed successfully |
| Error |
There was an error performing the work |
| bool glass3::util::copyFileTo | ( | std::string | from, |
| std::string | to | ||
| ) |
copy a file from one directory to another
Copy a given file to a given directory
| from | - A std::string containing the path and name of the file to copy |
| to | - A std::string containing the path and name of the destination file |
| bool glass3::util::deleteFileFrom | ( | std::string | fileName | ) |
delete a file
Delete a given file from the file system
| fileName | - A std::string containing the path and name of the file to delete |
| bool glass3::util::getFirstFileNameByExtension | ( | const std::string & | path, |
| const std::string & | extension, | ||
| std::string & | fileName | ||
| ) |
get the next file name in a directory
Gets the next file name that matches a given extension from a given directory
| path | - A std::string containing the directory to search for a file name |
| extension | - A std::string containing the extension to filter with. |
| fileName | - A std::string containing the file name that was found |
| bool glass3::util::moveFileTo | ( | std::string | fileName, |
| const std::string & | dirName | ||
| ) |
move a file from one directory to another
Move a given file to a given directory
| fileName | - A std::string containing the path and name of the file to move |
| dirName | - A std::string containing the directory to move the file to move |
| std::string & glass3::util::removeChars | ( | std::string & | sInput, |
| const std::string & | sRemoveChars | ||
| ) |
remove all instances of characters from a string
Remove all instances of the set of characters stored in chars from the given string. This is NOT removing a substring from a string.
| sInput | - A std::string containing the string to remove characters from |
| sRemoveChars | - A std::string containing the individual characters to remove. |
| std::vector< std::string > glass3::util::split | ( | const std::string & | sInput, |
| char | cDelimiter | ||
| ) |
split a string into substrings
Split a string into substrings using the provided delimiter, creating a std::vector to hold the results
| sInput | - A std::string containing the string to split |
| cDelimiter | - A char containing the the delimiter to split with. |
| std::string glass3::util::to_string_with_precision | ( | const double | doubleVal, |
| const int | precisionVal = 2 |
||
| ) |
convert provided double to a string with desired precision
Convert the provided double value into a string while truncateing it to the provided precision
| doubleVal | - A double containing the value to convert |
| precisionVal | - An int containing the desired precision to truncate to, default is 2. |
| char glass3::util::envTZ[MAXENV] |
A character array used to store the environment variable TZ. It will be stored after the first call to ConvertISO8601ToEpochTime()
1.8.11