One-stop shop for parsing device specifications. (New in SDK 16.3) I do very little in the way of validating semantics. I simply do the parsing & provide the info needed to load & operate plugins.
More...
#include <ntv2nubaccess.h>
|
| static bool | ParseQueryParams (const NTV2Dictionary &inSrcDict, NTV2Dictionary &outQueryParams) |
| | Parses the string found in the given source dictionary's 'query' key (kConnectParamQuery), storing the key/value pairs of all parsed query parameters into "outQueryParams". Query parameter values are URL-decoded before storing in the "outQueryParams" dictionary. More...
|
| |
| static bool | MakeQueryString (const NTV2Dictionary &inSrcDict, std::string &outQueryStr, const bool inLeadQuestion=false) |
| | Converts the given "query" dictionary into a string suitable for appending onto the query portion a URL. More...
|
| |
One-stop shop for parsing device specifications. (New in SDK 16.3) I do very little in the way of validating semantics. I simply do the parsing & provide the info needed to load & operate plugins.
- Note
- Not thread-safe.
Definition at line 171 of file ntv2nubaccess.h.
◆ NTV2DeviceSpecParser()
| NTV2DeviceSpecParser::NTV2DeviceSpecParser |
( |
const std::string |
inSpec = "" | ) |
|
My constructor. If given device specification is non-empty, proceeds to Parse it.
Definition at line 281 of file ntv2nubaccess.cpp.
◆ DeviceID()
◆ DeviceIndex()
| UWord NTV2DeviceSpecParser::DeviceIndex |
( |
void |
| ) |
const |
◆ DeviceModel()
| std::string NTV2DeviceSpecParser::DeviceModel |
( |
void |
| ) |
const |
|
inline |
◆ DeviceSerial()
| std::string NTV2DeviceSpecParser::DeviceSerial |
( |
void |
| ) |
const |
|
inline |
◆ DeviceSpec()
| const std::string& NTV2DeviceSpecParser::DeviceSpec |
( |
void |
| ) |
const |
|
inline |
◆ Error()
| std::string NTV2DeviceSpecParser::Error |
( |
const size_t |
inIndex = 0 | ) |
const |
|
inline |
◆ ErrorCount()
| size_t NTV2DeviceSpecParser::ErrorCount |
( |
void |
| ) |
const |
|
inline |
◆ Errors()
◆ Failed()
| bool NTV2DeviceSpecParser::Failed |
( |
void |
| ) |
const |
|
inline |
- Returns
- True if empty device spec or parser had errors
Definition at line 181 of file ntv2nubaccess.h.
◆ HasDeviceSpec()
| bool NTV2DeviceSpecParser::HasDeviceSpec |
( |
void |
| ) |
const |
|
inline |
- Returns
- True if I have a device specification
Definition at line 179 of file ntv2nubaccess.h.
◆ HasErrors()
| bool NTV2DeviceSpecParser::HasErrors |
( |
void |
| ) |
const |
|
inline |
◆ HasQueryParams()
| bool NTV2DeviceSpecParser::HasQueryParams |
( |
void |
| ) |
const |
|
inline |
◆ HasResult()
| bool NTV2DeviceSpecParser::HasResult |
( |
const std::string & |
inKey | ) |
const |
|
inline |
◆ HasScheme()
| bool NTV2DeviceSpecParser::HasScheme |
( |
void |
| ) |
const |
|
inline |
- Returns
- True if parser results contain a scheme
Definition at line 182 of file ntv2nubaccess.h.
◆ Host()
| std::string NTV2DeviceSpecParser::Host |
( |
void |
| ) |
const |
|
inline |
- Returns
- The host portion of the URLspec, if present, otherwise empty
Definition at line 193 of file ntv2nubaccess.h.
◆ HostWithPort()
| string NTV2DeviceSpecParser::HostWithPort |
( |
void |
| ) |
const |
- Returns
- The host with port number (if present), otherwise empty
Definition at line 309 of file ntv2nubaccess.cpp.
◆ InfoString()
| string NTV2DeviceSpecParser::InfoString |
( |
void |
| ) |
const |
◆ IsLocalDevice()
| bool NTV2DeviceSpecParser::IsLocalDevice |
( |
void |
| ) |
const |
|
inline |
- Returns
- True if parser results indicate a local device
Definition at line 184 of file ntv2nubaccess.h.
◆ MakeDeviceSpec()
| string NTV2DeviceSpecParser::MakeDeviceSpec |
( |
const bool |
urlEncodeQuery | ) |
const |
◆ MakeQueryString() [1/2]
| string NTV2DeviceSpecParser::MakeQueryString |
( |
const bool |
urlEncode | ) |
const |
◆ MakeQueryString() [2/2]
| bool NTV2DeviceSpecParser::MakeQueryString |
( |
const NTV2Dictionary & |
inSrcDict, |
|
|
std::string & |
outQueryStr, |
|
|
const bool |
inLeadQuestion = false |
|
) |
| |
|
static |
Converts the given "query" dictionary into a string suitable for appending onto the query portion a URL.
- Parameters
-
| [in] | inSrcDict | The dictionary that provides the 'query' key/value pairs to convert. It's not an error if it's empty. |
| [out] | outQueryStr | Receives the string that contains the URL-encoded key/value pairs. This string will be empty if the source dictionary is empty. |
| [in] | inLeadQuestion | Optionally specifies if the returned query string should begin with '?'. Defaults to false (omitted). |
- Returns
- True if successful; otherwise false.
Definition at line 968 of file ntv2nubaccess.cpp.
◆ ParseQueryParams()
Parses the string found in the given source dictionary's 'query' key (kConnectParamQuery), storing the key/value pairs of all parsed query parameters into "outQueryParams". Query parameter values are URL-decoded before storing in the "outQueryParams" dictionary.
- Parameters
-
| [in] | inSrcDict | The dictionary that provides the 'query' string to be parsed. It is not an error if it has no 'query' key, or if the query string is empty. The query string need not start with '?'. |
| [out] | outQueryParams | Dictionary that receives the key/value pairs parsed from the source dictionary's 'query' string. This dictionary is NOT emptied prior to parsing, but will be changed with the parse results. |
- Returns
- True if successful; otherwise false.
Definition at line 932 of file ntv2nubaccess.cpp.
◆ Port()
| std::string NTV2DeviceSpecParser::Port |
( |
void |
| ) |
const |
|
inline |
- Returns
- The port number portion of the URLspec, if present, otherwise empty
Definition at line 194 of file ntv2nubaccess.h.
◆ Print()
| ostream & NTV2DeviceSpecParser::Print |
( |
std::ostream & |
oss, |
|
|
const bool |
inDumpResults = false |
|
) |
| const |
◆ PrintErrors()
| ostream & NTV2DeviceSpecParser::PrintErrors |
( |
std::ostream & |
oss | ) |
const |
◆ QueryParam()
| std::string NTV2DeviceSpecParser::QueryParam |
( |
const std::string & |
inKey | ) |
const |
|
inline |
- Returns
- Query parameter value for the given query parameter key (empty string if no such key)
Definition at line 204 of file ntv2nubaccess.h.
◆ QueryParams()
| const NTV2Dictionary& NTV2DeviceSpecParser::QueryParams |
( |
void |
| ) |
const |
|
inline |
◆ Reset()
| void NTV2DeviceSpecParser::Reset |
( |
const std::string |
inSpec = "" | ) |
|
Resets me, then parses the given device specification.
Definition at line 286 of file ntv2nubaccess.cpp.
◆ Resource()
| string NTV2DeviceSpecParser::Resource |
( |
const bool |
inStripLeadSlash = true | ) |
const |
- Returns
- The Result for the kConnectParamResource key
Definition at line 297 of file ntv2nubaccess.cpp.
◆ Result()
| std::string NTV2DeviceSpecParser::Result |
( |
const std::string & |
inKey | ) |
const |
|
inline |
- Returns
- The result value for the given key.
Definition at line 191 of file ntv2nubaccess.h.
◆ Results()
- Returns
- A copy of my parse results, a dictionary (of key/value pairs).
Definition at line 189 of file ntv2nubaccess.h.
◆ Scheme()
| std::string NTV2DeviceSpecParser::Scheme |
( |
void |
| ) |
const |
|
inline |
◆ Successful()
| bool NTV2DeviceSpecParser::Successful |
( |
void |
| ) |
const |
|
inline |
The documentation for this class was generated from the following files:
- /home/tcbuilder/buildAgent/work/df8e8cce5bebfd58/libajantv2/ajantv2/includes/ntv2nubaccess.h
- /home/tcbuilder/buildAgent/work/df8e8cce5bebfd58/libajantv2/ajantv2/src/ntv2nubaccess.cpp