![]() |
Developer Application Interface (ARC API) v4.5.8
ARC, Inc. GenIV Application Interface
|
#include <CArcBase.h>
Public Member Functions | |
virtual | ~CArcBase (void) |
Static Public Member Functions | |
static const std::string | version (void) |
static void | zeroMemory (void *pDest, std::size_t uiSize) |
static void | copyMemory (void *pDest, void *pSrc, std::size_t uiSize) |
template<typename T > | |
static std::tuple< T *, T * > | copyAndIncrement (void *pDest, void *pSrc, const std::size_t uiSize) |
template<typename ErrCode > requires std::is_integral_v<ErrCode> | |
static const std::string | getSystemErrorMessage (ErrCode iErrCode) |
static const std::string | getSystemErrorMessage (void) |
static std::uint32_t | getSystemError (void) noexcept |
static pStringList_t | splitString (const std::string &sString, const char &zDelim=' ') |
static std::string | formatString (const char *pszFmt,...) |
static const std::filesystem::path | incrementFileName (const std::filesystem::path &tFilePath="", const std::int32_t iStartValue=-1) |
static std::string | convertWideToAnsi (const wchar_t wzString[]) noexcept |
static std::string | convertWideToAnsi (const std::wstring &wsString) |
static std::wstring | convertAnsiToWide (const char *pszString) |
static std::string | cmdToString (const std::uint32_t uiCmd) |
template<typename T > | |
static std::string | iterToString (T *begin, T *end, const char zSeperator=' ') |
static std::string | setDots (const std::string &sText, const std::size_t uiMaxLength, const char szDot='.') |
static std::string | trim (const std::string &sText) noexcept |
static const std::chrono::time_point< std::chrono::high_resolution_clock > | startCodeTime (void) noexcept |
template<typename T > | |
static constexpr auto | endCodeTime (const std::chrono::time_point< std::chrono::high_resolution_clock > tStartTimePoint) noexcept |
Protected Member Functions | |
CArcBase (void)=default | |
CArcBase (const CArcBase &)=delete | |
CArcBase (CArcBase &&)=delete | |
CArcBase & | operator= (const CArcBase &)=delete |
CArcBase & | operator= (CArcBase &&)=delete |
Static Protected Attributes | |
static const std::string | m_sVersion |
Standard ARC device base class that makes a set of useful methods available to all subclasses. Class methods include throwing formatted exceptions, ascii to string command conversion, error uiCode formatting and character conversion ( unicode to ascii and vice versa ).
Definition at line 236 of file CArcBase.h.
|
virtual |
Destructor
|
protecteddefault |
Default constructor
|
protecteddelete |
Delete copy constructor
|
protecteddelete |
Delete move constructor
|
static |
Returns a textual representation of the library version and compile date and time.
|
static |
Zero out the specified buffer.
pDest | - Pointer to the buffer to zero. |
uiSize | - The size of the buffer ( in bytes ). |
std::invalid_argument | if arguments are invalid. |
|
static |
Copies the source buffer into the destination buffer.
pDest | - Pointer to the destination buffer to copy into. |
pSrc | - Pointer to the source buffer to copy out of. |
uiSize | - The size of the buffers ( in bytes ). |
std::invalid_argument | if arguments are invalid. |
|
inlinestatic |
Copies the source buffer into the destination buffer. The pointers are incremented.
pDest | - Pointer to the destination buffer to copy into. |
pSrc | - Pointer to the source buffer to copy out of. |
uiSize | - The size of the buffers ( in bytes ). |
std::invalid_argument | if arguments are invalid. |
Definition at line 269 of file CArcBase.h.
|
inlinestatic |
Returns a string that represents the specified system error uiCode.
uiCode/iCode | - The system specific error uiCode ( GetLastError() on Windows, errno on Linux ). |
std::ios_base::failure |
Definition at line 306 of file CArcBase.h.
|
static |
Returns a string that describes the last system error as returned from GetLastError() on Windows and errno on Linux.
std::ios_base::failure |
|
inlinestaticnoexcept |
Returns the current system error code.
Definition at line 381 of file CArcBase.h.
|
static |
Splits a string based on the specified deliminator.
sString | - The string to split. |
zDelim | - The character used to split the string ( default = ' ' ). |
std::regex_error |
|
static |
Formats a std::string using printf-style formatting. Acceptable format string specifiers:
Acceptable format string specifiers: %u -> unsigned integer %d -> integer %f -> double %l -> long %j -> unsigned long %J -> unsigned long long %s -> char * string %e -> system message (as returned by errno or GetLastError) %b -> bool %x/X -> 32-bit lower/upper case hexadecimal integer. %p -> 64-bit upper case hexadecimal integer ( pointer )
pszFmt | - A printf-style format string. See above for specifiers. |
... | - Arguments to fill in format string specifiers. |
std::ios_base::failure |
|
static |
Modifies the specified filename to contain an increment value string ("_#). The increment value starts at zero by default. To reset the increment value back to zero, pass in the default values. @param tFilePath - The un-modified filename to modify with an increment value (default: "" ).
iStartValue | - The increment start value or -1 to reset back to zero (default: -1). |
std::runtime_error | and any error thrown by the std::filesystem methods ( parent_path, stem, extension, /=, += ). |
|
staticnoexcept |
Converts a unicode character array to an ansi string.
wzString | - The unicode character array to convert. |
|
static |
Converts a unicode string to an ansi string.
wsString | - The unicode string to convert. |
std::ios_base::failure |
|
static |
Converts an ansi string to a unicode string.
pszString | - The ansi string to convert. |
std::ios_base::failure |
|
static |
Converts a device or controller ascii command to a string represented by changing each each byte to its ascii letter equivalent. This is useful for logging human readable versions of a command. For example, 0x54444C would be converted to "TDL". If the command fails to be converted, then the hexadecimal value is returned as a string. For example, 0x212223 would be returned as "0x212223" and not "!*#".
uiCmd | - A device or controller ascii command. |
std::ios_base::failure |
|
inlinestatic |
Moves through the specified iterator positions and places each value into a return string that is seperated by the specified zSeperator.
Example: std::initializer_list<std::uint32_t> list = { 1, 2, 3, 4 }; produces the following output: "1 2 3 4 "
begin | - Pointer to iterator to the first element. |
end | - Pointer to iterator to the last element. |
zSeperator | - Seperator character ( default = ' ' ). |
std::invalid_argument | |
std::ios_base::failure |
Definition at line 485 of file CArcBase.h.
|
static |
Appends dots to the end of the specified string to show a connection to a component.
sText | - The text to append the dots too. |
uiMaxLength | - The maximum length of the returned string. |
szDot | - The dot character (default = '.'). |
std::ios_base::failure | |
std::length_error |
|
staticnoexcept |
Trims the leading and trailing whitespace from the text.
sText | - The text to trim leading and trailing whitespace from. |
|
staticnoexcept |
Reads the current time point using the std::high_resolution_clock for timing a piece of code. This is the start time to be called first.
|
inlinestaticconstexprnoexcept |
Reads the current time point using the std::high_resolution_clock and subtracts the specified start time point for timing a piece of code. This is the end time to be called second.
tStartTimePoint | - The start time point returned by startCodeTime() method. |
Definition at line 539 of file CArcBase.h.
Delete copy assignment constructor
Delete move assignment constructor
|
staticprotected |
version() text holder
Definition at line 566 of file CArcBase.h.