AJA NTV2 SDK
17.1.3.1410
NTV2 SDK 17.1.3.1410
|
Functions | |
bool | starts_with (const std::string &str, const std::string &needle) |
bool | starts_with (const std::string &str, const char needle) |
bool | starts_with (const std::wstring &wstr, const std::wstring &needle) |
bool | starts_with (const std::wstring &wstr, const wchar_t needle) |
bool | ends_with (const std::string &str, const std::string &needle) |
bool | ends_with (const std::string &str, const char needle) |
bool | ends_with (const std::wstring &wstr, const std::wstring &needle) |
bool | ends_with (const std::wstring &wstr, const wchar_t needle) |
std::string & | replace (std::string &str, const std::string &from, const std::string &to) |
int | stoi (const std::string &str, std::size_t *idx, int base) |
long | stol (const std::string &str, std::size_t *idx, int base) |
unsigned long | stoul (const std::string &str, std::size_t *idx, int base) |
unsigned long long | stoull (const std::string &str, std::size_t *idx, int base) |
float | stof (const std::string &str, std::size_t *idx) |
double | stod (const std::string &str, std::size_t *idx) |
long double | stold (const std::string &str, std::size_t *idx) |
std::string | to_string (bool val) |
std::string | to_string (int val) |
std::string | to_string (long val) |
std::string | to_string (long long val) |
std::string | to_string (unsigned val) |
std::string | to_string (unsigned long val) |
std::string | to_string (unsigned long long val) |
std::string | to_string (float val) |
std::string | to_string (double val) |
std::string | to_string (long double val) |
bool | string_to_wstring (const std::string &str, std::wstring &wstr) |
bool | wstring_to_string (const std::wstring &wstr, std::string &str) |
size_t | local_min (const size_t &a, const size_t &b) |
bool | string_to_cstring (const std::string &str, char *c_str, size_t c_str_size) |
void | split (const std::string &str, const char delim, std::vector< std::string > &elems) |
void | split (const std::wstring &str, const wchar_t delim, std::vector< std::wstring > &elems) |
std::vector< std::string > | split (const std::string &str, const char delim) |
std::vector< std::wstring > | split (const std::wstring &str, const wchar_t delim) |
std::vector< std::string > | split (const std::string &inStr, const std::string &inDelim) |
std::vector< std::wstring > | split (const std::wstring &inStr, const std::wstring &inDelim) |
std::string & | lower (std::string &str) |
std::string & | upper (std::string &str) |
std::string & | lstrip (std::string &str, const std::string &ws) |
std::string & | rstrip (std::string &str, const std::string &ws) |
std::string & | strip (std::string &str, const std::string &ws) |
std::string | join (const std::vector< std::string > &parts, const std::string &delim) |
std::string | join (const std::set< std::string > &parts, const std::string &delim) |
char * | safer_strncpy (char *target, const char *source, size_t num, size_t maxSize) |
bool | is_hex_digit (const char inChr) |
bool | is_decimal_digit (const char inChr) |
bool | is_alpha_numeric (const char inChr) |
bool | is_legal_decimal_number (const std::string &inStr, const size_t inMaxLength) |
uint64_t | is_legal_hex_serial_number (const std::string &inStr) |
bool | is_alpha_numeric (const std::string &inStr) |
template<typename T , typename... Args> | |
std::unique_ptr< T > | make_unique (Args &&... args) |
AJA_EXPORT int | reveal_file_in_file_manager (const std::string &filePath) |
Variables | |
static std::string | WHITESPACE = " \t\n\r" |
AJA_EXPORT bool aja::ends_with | ( | const std::string & | str, |
const char | needle | ||
) |
Determine if str
ends with specified character.
[in] | str | The string to check |
[in] | needle | The character to look for at the end of str |
true
if str ends with the specified string, otherwise false
. Definition at line 91 of file common.cpp.
AJA_EXPORT bool aja::ends_with | ( | const std::string & | str, |
const std::string & | needle | ||
) |
Determine if str
ends with specified string.
[in] | str | The string to check |
[in] | needle | The substring to look for at the end of str |
true
if str ends with the specified string, otherwise false
. Definition at line 83 of file common.cpp.
AJA_EXPORT bool aja::ends_with | ( | const std::wstring & | wstr, |
const std::wstring & | needle | ||
) |
Determine if wstr
ends with specified string.
[in] | wstr | The wide string to check |
[in] | needle | The substring to look for at the end of wstr |
true
if wstr ends with the specified string, otherwise false
. Definition at line 96 of file common.cpp.
AJA_EXPORT bool aja::ends_with | ( | const std::wstring & | wstr, |
const wchar_t | needle | ||
) |
Determine if wstr
ends with specified character.
[in] | wstr | The wide string to check |
[in] | needle | The wide character to look for at the end of wstr |
true
if wstr ends with the specified string, otherwise false
. Definition at line 104 of file common.cpp.
AJA_EXPORT bool aja::is_alpha_numeric | ( | const char | inChr | ) |
[in] | inChr | The character of interest. |
Definition at line 521 of file common.cpp.
AJA_EXPORT bool aja::is_alpha_numeric | ( | const std::string & | inStr | ) |
[in] | inStr | The character string of interest. |
Definition at line 556 of file common.cpp.
AJA_EXPORT bool aja::is_decimal_digit | ( | const char | inChr | ) |
[in] | inChr | The character of interest. |
Definition at line 516 of file common.cpp.
AJA_EXPORT bool aja::is_hex_digit | ( | const char | inChr | ) |
[in] | inChr | The character of interest. |
Definition at line 511 of file common.cpp.
AJA_EXPORT bool aja::is_legal_decimal_number | ( | const std::string & | inStr, |
const size_t | inMaxLength = 2 |
||
) |
[in] | inStr | The character string of interest. |
[in] | inMaxLength | The maximum number of decimal digits allowed. Defaults to 2. |
Definition at line 526 of file common.cpp.
AJA_EXPORT uint64_t aja::is_legal_hex_serial_number | ( | const std::string & | inStr | ) |
[in] | inStr | The character string of interest. |
Definition at line 536 of file common.cpp.
AJA_EXPORT std::string aja::join | ( | const std::set< std::string > & | parts, |
const std::string & | delim = " " |
||
) |
Join a set of strings separated by a string delimiter
[in] | parts | The set of strings to join together |
[in] | delim | The string delimiter that will separate the strings |
Definition at line 480 of file common.cpp.
AJA_EXPORT std::string aja::join | ( | const std::vector< std::string > & | parts, |
const std::string & | delim = " " |
||
) |
Join a vector of strings separated by a string delimiter
[in] | parts | The vector of strings to join together |
[in] | delim | The string delimiter that will separate the strings |
Definition at line 468 of file common.cpp.
|
inline |
Definition at line 322 of file common.cpp.
AJA_EXPORT std::string & aja::lower | ( | std::string & | str | ) |
Converts the passed string to lowercase
[in,out] | str | The string to make lowercase |
Definition at line 436 of file common.cpp.
AJA_EXPORT std::string & aja::lstrip | ( | std::string & | str, |
const std::string & | ws = aja::WHITESPACE |
||
) |
Strips the leading whitespace characters from the string
[in,out] | str | The string to strip leading characters from |
[in] | ws | The whitespace characters to strip |
Definition at line 448 of file common.cpp.
std::unique_ptr<T> aja::make_unique | ( | Args &&... | args | ) |
Definition at line 10 of file make_unique_shim.h.
AJA_EXPORT std::string & aja::replace | ( | std::string & | str, |
const std::string & | from, | ||
const std::string & | to | ||
) |
Replaces all occurrences of a substring within a string with a new string
[in,out] | str | The string to modify |
[in] | from | The substring to look for |
[in] | to | The string to replace the substring with |
Definition at line 110 of file common.cpp.
AJA_EXPORT int aja::reveal_file_in_file_manager | ( | const std::string & | filePath | ) |
AJA_EXPORT std::string & aja::rstrip | ( | std::string & | str, |
const std::string & | ws = aja::WHITESPACE |
||
) |
Strips the trailing whitespace characters from the string
[in,out] | str | The string to strip trailing characters from |
[in] | ws | The whitespace characters to strip |
Definition at line 454 of file common.cpp.
AJA_EXPORT char * aja::safer_strncpy | ( | char * | target, |
const char * | source, | ||
size_t | num, | ||
size_t | maxSize | ||
) |
Like strncpy() but always adds a null-character at last index of target string
[in,out] | target | Pointer to the destination array where the content is to be copied. |
[in] | source | C string to be copied. |
[in] | num | Maximum number of characters to be copied from source. |
[in] | maxSize | Maximum size of the destination array pointed to by target. |
Definition at line 492 of file common.cpp.
AJA_EXPORT std::vector< std::string > aja::split | ( | const std::string & | inStr, |
const std::string & | inDelim | ||
) |
Splits a string into substrings at a string delimiter
[in] | inStr | The string to split into parts |
[in] | inDelim | The delimiter string to split the string at |
Definition at line 398 of file common.cpp.
AJA_EXPORT std::vector< std::string > aja::split | ( | const std::string & | str, |
const char | delim | ||
) |
Splits a string into substrings at a character delimiter
[in] | str | The string to split into parts |
[in] | delim | The character delimiter to split the string at |
Definition at line 384 of file common.cpp.
AJA_EXPORT void aja::split | ( | const std::string & | str, |
const char | delim, | ||
std::vector< std::string > & | elems | ||
) |
Splits a string into substrings at a character delimiter
[in] | str | The string to split into parts |
[in] | delim | The character delimiter to split the string at |
[out] | elems | A vector of strings that contains all the substrings |
Definition at line 350 of file common.cpp.
AJA_EXPORT std::vector< std::wstring > aja::split | ( | const std::wstring & | inStr, |
const std::wstring & | inDelim | ||
) |
Splits a wstring into substrings at a string delimiter
[in] | inStr | The wstring to split into parts |
[in] | inDelim | The delimiter wstring to split the string at |
Definition at line 417 of file common.cpp.
AJA_EXPORT std::vector< std::wstring > aja::split | ( | const std::wstring & | str, |
const wchar_t | delim | ||
) |
Splits a wstring into substrings at a character delimiter
[in] | str | The wstring to split into parts |
[in] | delim | The wide character delimiter to split the wstring at |
Definition at line 391 of file common.cpp.
AJA_EXPORT void aja::split | ( | const std::wstring & | str, |
const wchar_t | delim, | ||
std::vector< std::wstring > & | elems | ||
) |
Splits a wstring into substrings at a character delimiter
[in] | str | The wstring to split into parts |
[in] | delim | The wide character delimiter to split the wstring at |
[out] | elems | A vector of wstrings that contains all the substrings |
Definition at line 367 of file common.cpp.
AJA_EXPORT bool aja::starts_with | ( | const std::string & | str, |
const char | needle | ||
) |
Determine if str
starts with specified character.
[in] | str | The string to check |
[in] | needle | The character to look for at the start of str |
true
if str starts with the specified string, otherwise false
. Definition at line 65 of file common.cpp.
AJA_EXPORT bool aja::starts_with | ( | const std::string & | str, |
const std::string & | needle | ||
) |
Determine if str
starts with specified string.
[in] | str | The string to check |
[in] | needle | The substring to look for at the start of str |
true
if str starts with the specified string, otherwise false
. Definition at line 61 of file common.cpp.
AJA_EXPORT bool aja::starts_with | ( | const std::wstring & | wstr, |
const std::wstring & | needle | ||
) |
Determine if wstr
starts with specified string.
[in] | wstr | The wide string to check |
[in] | needle | The substring to look for at the start of wstr |
true
if wstr starts with the specified string, otherwise false
. Definition at line 71 of file common.cpp.
AJA_EXPORT bool aja::starts_with | ( | const std::wstring & | wstr, |
const wchar_t | needle | ||
) |
Determine if wstr
starts with specified character.
[in] | wstr | The wide string to check |
[in] | needle | The wide character to look for at the start of wstr |
true
if wstr starts with the specified string, otherwise false
. Definition at line 75 of file common.cpp.
AJA_EXPORT double aja::stod | ( | const std::string & | str, |
std::size_t * | idx = 0 |
||
) |
Convert string to double
[in] | str | The string to get the double value of |
[in,out] | idx | Pointer to an object of type size_t, whose value is set by the function to the position of the next character in str after the numerical value. This parameter can also be a null pointer, in which case it is not used. |
Definition at line 164 of file common.cpp.
AJA_EXPORT float aja::stof | ( | const std::string & | str, |
std::size_t * | idx = 0 |
||
) |
Convert string to float
[in] | str | The string to get the float value of |
[in,out] | idx | Pointer to an object of type size_t, whose value is set by the function to the position of the next character in str after the numerical value. This parameter can also be a null pointer, in which case it is not used. |
Definition at line 159 of file common.cpp.
AJA_EXPORT int aja::stoi | ( | const std::string & | str, |
std::size_t * | idx = 0 , |
||
int | base = 10 |
||
) |
Convert string to integer
[in] | str | The string to get the int value of |
[in,out] | idx | Pointer to an object of type size_t, whose value is set by the function to the position of the next character in str after the numerical value. This parameter can also be a null pointer, in which case it is not used. |
[in] | base | Numerical base that determines the valid characters and their interpretation. If this is 0, the base is determined by the format (like strtol). |
Definition at line 122 of file common.cpp.
AJA_EXPORT long aja::stol | ( | const std::string & | str, |
std::size_t * | idx = 0 , |
||
int | base = 10 |
||
) |
Convert string to long
[in] | str | The string to get the long value of |
[in,out] | idx | Pointer to an object of type size_t, whose value is set by the function to the position of the next character in str after the numerical value. This parameter can also be a null pointer, in which case it is not used. |
[in] | base | Numerical base that determines the valid characters and their interpretation. If this is 0, the base is determined by the format (like strtol). |
Definition at line 127 of file common.cpp.
AJA_EXPORT long double aja::stold | ( | const std::string & | str, |
std::size_t * | idx = 0 |
||
) |
Convert string to long double
[in] | str | The string to get the long double value of |
[in,out] | idx | Pointer to an object of type size_t, whose value is set by the function to the position of the next character in str after the numerical value. This parameter can also be a null pointer, in which case it is not used. |
Definition at line 175 of file common.cpp.
AJA_EXPORT unsigned long aja::stoul | ( | const std::string & | str, |
std::size_t * | idx = 0 , |
||
int | base = 10 |
||
) |
Convert string to long long
[in] | str | The string to get the long long value of |
[in,out] | idx | Pointer to an object of type size_t, whose value is set by the function to the position of the next character in str after the numerical value. This parameter can also be a null pointer, in which case it is not used. |
[in] | base | Numerical base that determines the valid characters and their interpretation. If this is 0, the base is determined by the format (like strtol). |
[in] | str | The string to get the unsigned long value of |
[in,out] | idx | Pointer to an object of type size_t, whose value is set by the function to the position of the next character in str after the numerical value. This parameter can also be a null pointer, in which case it is not used. |
[in] | base | Numerical base that determines the valid characters and their interpretation. If this is 0, the base is determined by the format (like strtol). |
Definition at line 143 of file common.cpp.
AJA_EXPORT unsigned long long aja::stoull | ( | const std::string & | str, |
std::size_t * | idx = 0 , |
||
int | base = 10 |
||
) |
Convert string to unsigned long long
[in] | str | The string to get the unsigned long long value of |
[in,out] | idx | Pointer to an object of type size_t, whose value is set by the function to the position of the next character in str after the numerical value. This parameter can also be a null pointer, in which case it is not used. |
[in] | base | Numerical base that determines the valid characters and their interpretation. If this is 0, the base is determined by the format (like strtol). |
Definition at line 154 of file common.cpp.
AJA_EXPORT bool aja::string_to_cstring | ( | const std::string & | str, |
char * | c_str, | ||
size_t | c_str_size | ||
) |
Convert string to cstring
[in] | str | The string to convert |
[out] | c_str | The char buffer to use as a c string |
[in] | c_str_size | The size of the passed in c_str buffer in bytes |
Definition at line 336 of file common.cpp.
AJA_EXPORT bool aja::string_to_wstring | ( | const std::string & | str, |
std::wstring & | wstr | ||
) |
Convert string to wstring
[in] | str | The string to convert |
[out] | wstr | The wstring to convert to |
Definition at line 248 of file common.cpp.
AJA_EXPORT std::string & aja::strip | ( | std::string & | str, |
const std::string & | ws = aja::WHITESPACE |
||
) |
Strips the leading & trailing whitespace characters from the string
[in,out] | str | The string to strip leading & trailing characters from |
[in] | ws | The whitespace characters to strip |
Definition at line 461 of file common.cpp.
AJA_EXPORT std::string aja::to_string | ( | bool | val | ) |
Convert numerical value to string
[in] | val | The numerical value to convert |
Definition at line 180 of file common.cpp.
AJA_EXPORT std::string aja::to_string | ( | double | val | ) |
Definition at line 230 of file common.cpp.
AJA_EXPORT std::string aja::to_string | ( | float | val | ) |
Definition at line 221 of file common.cpp.
AJA_EXPORT std::string aja::to_string | ( | int | val | ) |
Definition at line 185 of file common.cpp.
AJA_EXPORT std::string aja::to_string | ( | long double | val | ) |
Definition at line 239 of file common.cpp.
AJA_EXPORT std::string aja::to_string | ( | long long | val | ) |
Definition at line 197 of file common.cpp.
AJA_EXPORT std::string aja::to_string | ( | long | val | ) |
Definition at line 191 of file common.cpp.
AJA_EXPORT std::string aja::to_string | ( | unsigned long long | val | ) |
Definition at line 215 of file common.cpp.
AJA_EXPORT std::string aja::to_string | ( | unsigned long | val | ) |
Definition at line 209 of file common.cpp.
AJA_EXPORT std::string aja::to_string | ( | unsigned | val | ) |
Definition at line 203 of file common.cpp.
AJA_EXPORT std::string & aja::upper | ( | std::string & | str | ) |
Converts the passed string to uppercase
[in,out] | str | The string to make uppercase |
Definition at line 442 of file common.cpp.
AJA_EXPORT bool aja::wstring_to_string | ( | const std::wstring & | wstr, |
std::string & | str | ||
) |
Convert wstring to string
[in] | wstr | The wstring to convert |
[out] | str | The string to convert to |
Definition at line 285 of file common.cpp.