Convenience Class for NTURI.
More...
#include "nturi.h"
Convenience Class for NTURI.
- Author
- dgh
Definition at line 136 of file nturi.h.
epics::nt::NTURI::~NTURI |
( |
| ) |
|
|
inline |
Destructor.
Definition at line 236 of file nturi.h.
Creates an NTURI builder instance.
- Returns
- builder instance.
Definition at line 193 of file nturi.cpp.
std::tr1::shared_ptr< detail::NTURIBuilder > NTURIBuilderPtr
Returns the authority field.
- Returns
- the authority field or null if no such field.
Definition at line 210 of file nturi.cpp.
212 return pvNTURI->getSubField<
PVString>(
"authority");
PVString is special case, since it implements SerializableArray.
Returns the path field.
- Returns
- the path field.
Definition at line 215 of file nturi.cpp.
217 return pvNTURI->getSubField<
PVString>(
"path");
PVString is special case, since it implements SerializableArray.
Returns the PVStructure wrapped by this instance.
- Returns
- the PVStructure wrapped by this instance.
Definition at line 199 of file nturi.cpp.
Returns the query field.
- Returns
- the query field or null if no such field.
Definition at line 220 of file nturi.cpp.
Data interface for a structure,.
PVFieldPtr epics::nt::NTURI::getQueryField |
( |
std::string const & |
name | ) |
const |
Returns the subfield of the query field with the specified name.
- Parameters
-
name | the name of the subfield. |
- Returns
- the the subfield of the query field or null if the field does not exist.
Definition at line 230 of file nturi.cpp.
232 return pvNTURI->getSubField(
"query." + name);
template<typename PVT >
std::tr1::shared_ptr<PVT> epics::nt::NTURI::getQueryField |
( |
std::string const & |
name | ) |
const |
|
inline |
Returns the subfield of the query field (parameter) with the specified name and of a specified expected type (for example, PVString).
- Template Parameters
-
PVT | the expected type of the subfield which should be be PVString, PVInt pr PVDouble. |
- Parameters
-
name | the subfield of the query field or null if the field does not exist or is not of the expected type. |
- Returns
- The PVT field.
Definition at line 293 of file nturi.h.
297 return std::tr1::dynamic_pointer_cast<PVT>(pvField);
299 return std::tr1::shared_ptr<PVT>();
std::tr1::shared_ptr< PVField > PVFieldPtr
epics::pvData::PVFieldPtr getQueryField(std::string const &name) const
StringArray const & epics::nt::NTURI::getQueryNames |
( |
| ) |
const |
Returns the names of the query fields for the URI. For each name, calling getQueryField should return the query field, which should not be null.
- Returns
- The query field names.
Definition at line 225 of file nturi.cpp.
227 return pvNTURI->getSubField<
PVStructure>(
"query")->getStructure()->getFieldNames();
Data interface for a structure,.
Returns the scheme field.
- Returns
- the scheme field.
Definition at line 205 of file nturi.cpp.
207 return pvNTURI->getSubField<
PVString>(
"scheme");
PVString is special case, since it implements SerializableArray.
Returns whether the specified Structure reports to be a compatible NTScalar.
Checks if the specified Structure reports compatibility with this version of NTScalar through its type ID, including checking version numbers. The return value does not depend on whether the structure is actually compatible in terms of its introspection type.
- Parameters
-
structure | the Structure to test |
- Returns
- (false,true) if (is not, is) a compatible NTScalar
Definition at line 141 of file nturi.cpp.
static const std::string URI
static bool is_a(const std::string &u1, const std::string &u2)
Returns whether the specified PVStructure reports to be a compatible NTURI.
Checks if the specified PVStructure reports compatibility with this version of NTURI through its type ID, including checking version numbers. The return value does not depend on whether the structure is actually compatible in terms of its introspection type.
- Parameters
-
pvStructure | the PVStructure to test. |
- Returns
- (false,true) if the specified PVStructure (is not, is) a compatible NTURI.
Definition at line 146 of file nturi.cpp.
148 return is_a(pvStructure->getStructure());
static bool is_a(epics::pvData::StructureConstPtr const &structure)
Returns whether the specified Structure is compatible with NTURI.
Checks if the specified Structure is compatible with this version of NTURI through the introspection interface.
- Parameters
-
structure | the Structure to test |
- Returns
- (false,true) if the specified Structure (is not, is) a compatible NTURI
Definition at line 151 of file nturi.cpp.
160 .has<Scalar>(
"scheme")
162 .maybeHas<Scalar>(
"authority")
169 StringArray::const_iterator it;
171 for (it = names.begin(); it != names.end(); ++it)
This class implements introspection object for Scalar.
std::tr1::shared_ptr< const Structure > StructureConstPtr
This class implements introspection object for a structure.
This class implements introspection object for scalar array.
std::vector< std::string > StringArray
Returns whether the specified PVStructure is compatible with NTURI.
Checks if the specified PVStructure is compatible with this version of NTURI through the introspection interface.
- Parameters
-
pvStructure | the PVStructure to test |
- Returns
- (false,true) if the specified PVStructure (is not, is) a compatible NTURI
Definition at line 181 of file nturi.cpp.
183 if(!pvStructure)
return false;
static bool isCompatible(epics::pvData::StructureConstPtr const &structure)
bool epics::nt::NTURI::isValid |
( |
| ) |
|
Returns whether the wrapped PVStructure is a valid NTURI.
Unlike isCompatible(), isValid() may perform checks on the value data as well as the introspection data.
- Returns
- (false,true) if wrapped PVStructure (is not, is) a valid NTURI.
Definition at line 188 of file nturi.cpp.
epics::nt::NTURI::POINTER_DEFINITIONS |
( |
NTURI |
| ) |
|
Creates an NTURI wrapping the specified PVStructure if the latter is compatible.
Checks the supplied PVStructure is compatible with NTURI and if so returns an NTURI which wraps it. This method will return null if the structure is is not compatible or is null.
- Parameters
-
pvStructure | the PVStructure to be wrapped |
- Returns
- NTURI instance wrapping pvStructure on success, null otherwise
Definition at line 130 of file nturi.cpp.
static shared_pointer wrapUnsafe(epics::pvData::PVStructurePtr const &pvStructure)
static bool isCompatible(epics::pvData::StructureConstPtr const &structure)
Creates an NTScalar wrapping the specified PVStructure, regardless of the latter's compatibility.
No checks are made as to whether the specified PVStructure is compatible with NTScalar or is non-null.
- Parameters
-
pvStructure | the PVStructure to be wrapped |
- Returns
- NTScalar instance wrapping pvStructure
Definition at line 136 of file nturi.cpp.
138 return shared_pointer(
new NTURI(pvStructure));
const std::string epics::nt::NTURI::URI |
|
static |
The documentation for this class was generated from the following files: