normativeTypesCPP
Public Member Functions | List of all members
epics::nt::NTID Class Reference

Utility class for parsing a type ID that follows the NT type ID conventions. More...

#include <ntid.h>

Public Member Functions

 NTID (const std::string &id)
 
std::string getFullName ()
 
std::string getQualifiedName ()
 
std::string getNamespace ()
 
std::string getName ()
 
std::string getVersion ()
 
std::string getMajorVersionString ()
 
bool hasMajorVersion ()
 
int getMajorVersion ()
 
std::string getMinorVersionString ()
 
bool hasMinorVersion ()
 
int getMinorVersion ()
 

Detailed Description

Utility class for parsing a type ID that follows the NT type ID conventions.

An NT type ID will be of the from

epics:nt/<type-name>:<Major>.<Minor>

e.g.

epics:nt/NTNDArray:1.2
Author
dgh

Definition at line 28 of file ntid.h.

Constructor & Destructor Documentation

◆ NTID()

epics::nt::NTID::NTID ( const std::string &  id)

Creates an NTID from the specified type ID.

Parameters
idthe the ID to be parsed.
Returns
NTNDArray instance on success, null otherwise.

Definition at line 16 of file ntid.cpp.

Member Function Documentation

◆ getFullName()

std::string epics::nt::NTID::getFullName ( )

Returns the full name of the id, i.e. the original ID

For example above returns "epics:nt/NTNDArray:1.2".

Returns
the full name

Definition at line 45 of file ntid.cpp.

◆ getMajorVersion()

int epics::nt::NTID::getMajorVersion ( )

Returns the Major version as an integer.

For example above return 1.

Returns
the Major string

Definition at line 135 of file ntid.cpp.

References hasMajorVersion().

◆ getMajorVersionString()

std::string epics::nt::NTID::getMajorVersionString ( )

Returns the Major version as a string.

For example above return "1".

Returns
the Major string

Definition at line 100 of file ntid.cpp.

Referenced by getMinorVersionString(), and hasMajorVersion().

◆ getMinorVersion()

int epics::nt::NTID::getMinorVersion ( )

Returns the Minor version as an integer.

For example above return 1.

Returns
the Minor string

Definition at line 180 of file ntid.cpp.

References hasMinorVersion().

◆ getMinorVersionString()

std::string epics::nt::NTID::getMinorVersionString ( )

Returns the Major version as a string.

For example above return "1".

Returns
the Major string

Definition at line 143 of file ntid.cpp.

References getMajorVersionString().

Referenced by hasMinorVersion().

◆ getName()

std::string epics::nt::NTID::getName ( )

Returns the unqualified name, without namespace or version.

For example above return "NTNDArray".

Returns
the unqualified name

Definition at line 68 of file ntid.cpp.

◆ getNamespace()

std::string epics::nt::NTID::getNamespace ( )

Returns the namespace

For example above return "epics:nt".

Returns
the namespace

Definition at line 58 of file ntid.cpp.

◆ getQualifiedName()

std::string epics::nt::NTID::getQualifiedName ( )

Returns the fully qualified name including namespaces, but excluding version numbers.

For example above return "epics:nt/NTNDArray"

Returns
the fully qualified name

Definition at line 47 of file ntid.cpp.

◆ getVersion()

std::string epics::nt::NTID::getVersion ( )

Returns the version as a string.

For example above return "NTNDArray".

Returns
the the version string

Definition at line 90 of file ntid.cpp.

◆ hasMajorVersion()

bool epics::nt::NTID::hasMajorVersion ( )

Does the ID contain a major version and is it a number.

Returns
true if it contains a major version number

Definition at line 118 of file ntid.cpp.

References getMajorVersionString().

Referenced by getMajorVersion().

◆ hasMinorVersion()

bool epics::nt::NTID::hasMinorVersion ( )

Does the ID contain a minor version and is it a number.

Returns
true if it contains a minor version number

Definition at line 163 of file ntid.cpp.

References getMinorVersionString().

Referenced by getMinorVersion().


The documentation for this class was generated from the following files: