normativeTypesCPP
Public Member Functions | Static Public Member Functions | Static Public Attributes | Friends | List of all members
epics::nt::NTEnum Class Reference

Convenience Class for NTEnum. More...

#include <ntenum.h>

Public Member Functions

 POINTER_DEFINITIONS (NTEnum)
 
bool isValid ()
 
 ~NTEnum ()
 
bool attachTimeStamp (epics::pvData::PVTimeStamp &pvTimeStamp) const
 
bool attachAlarm (epics::pvData::PVAlarm &pvAlarm) const
 
epics::pvData::PVStructurePtr getPVStructure () const
 
epics::pvData::PVStringPtr getDescriptor () const
 
epics::pvData::PVStructurePtr getTimeStamp () const
 
epics::pvData::PVStructurePtr getAlarm () const
 
epics::pvData::PVStructurePtr getValue () const
 

Static Public Member Functions

static shared_pointer wrap (epics::pvData::PVStructurePtr const &pvStructure)
 
static shared_pointer wrapUnsafe (epics::pvData::PVStructurePtr const &pvStructure)
 
static bool is_a (epics::pvData::StructureConstPtr const &structure)
 
static bool is_a (epics::pvData::PVStructurePtr const &pvStructure)
 
static bool isCompatible (epics::pvData::StructureConstPtr const &structure)
 
static bool isCompatible (epics::pvData::PVStructurePtr const &pvStructure)
 
static NTEnumBuilderPtr createBuilder ()
 

Static Public Attributes

static const std::string URI
 

Friends

class detail::NTEnumBuilder
 

Detailed Description

Convenience Class for NTEnum.

Author
dgh

Definition at line 117 of file ntenum.h.

Constructor & Destructor Documentation

◆ ~NTEnum()

epics::nt::NTEnum::~NTEnum ( )
inline

Destructor.

Definition at line 216 of file ntenum.h.

Member Function Documentation

◆ attachAlarm()

bool epics::nt::NTEnum::attachAlarm ( epics::pvData::PVAlarm &  pvAlarm) const

Attaches a PVAlarm to the wrapped PVStructure. Does nothing if no alarm field.

Parameters
pvAlarmthe PVAlarm that will be attached.
Returns
true if the operation was successfull (i.e. this instance has an alarm field), otherwise false.

Definition at line 166 of file ntenum.cpp.

◆ attachTimeStamp()

bool epics::nt::NTEnum::attachTimeStamp ( epics::pvData::PVTimeStamp &  pvTimeStamp) const

Attaches a PVTimeStamp to the wrapped PVStructure. Does nothing if no timeStamp field.

Parameters
pvTimeStampthe PVTimeStamp that will be attached.
Returns
true if the operation was successfull (i.e. this instance has a timeStamp field), otherwise false.

Definition at line 157 of file ntenum.cpp.

◆ createBuilder()

NTEnumBuilderPtr epics::nt::NTEnum::createBuilder ( )
static

Creates an NTEnum builder instance.

Returns
builder instance.

Definition at line 152 of file ntenum.cpp.

◆ getAlarm()

PVStructurePtr epics::nt::NTEnum::getAlarm ( ) const

Returns the alarm field.

Returns
the alarm field or or null if no such field.

Definition at line 190 of file ntenum.cpp.

◆ getDescriptor()

PVStringPtr epics::nt::NTEnum::getDescriptor ( ) const

Returns the descriptor field.

Returns
the descriptor field or null if no such field.

Definition at line 180 of file ntenum.cpp.

◆ getPVStructure()

PVStructurePtr epics::nt::NTEnum::getPVStructure ( ) const

Returns the PVStructure wrapped by this instance.

Returns
the PVStructure wrapped by this instance.

Definition at line 175 of file ntenum.cpp.

◆ getTimeStamp()

PVStructurePtr epics::nt::NTEnum::getTimeStamp ( ) const

Returns the timeStamp field.

Returns
the timStamp field or or null if no such field.

Definition at line 185 of file ntenum.cpp.

◆ getValue()

PVStructurePtr epics::nt::NTEnum::getValue ( ) const

Get the value field.

Returns
the value field.

Definition at line 195 of file ntenum.cpp.

◆ is_a() [1/2]

static bool epics::nt::NTEnum::is_a ( epics::pvData::StructureConstPtr const &  structure)
static

Returns whether the specified Structure reports to be a compatible NTEnum.

Checks if the specified Structure reports compatibility with this version of NTEnum 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
structurethe Structure to test.
Returns
(false,true) if the specified Structure (is not, is) a compatible NTEnum.

◆ is_a() [2/2]

static bool epics::nt::NTEnum::is_a ( epics::pvData::PVStructurePtr const &  pvStructure)
static

Returns whether the specified PVStructure reports to be a compatible NTEnum.

Checks if the specified PVStructure reports compatibility with this version of NTEnum 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
pvStructurethe PVStructure to test
Returns
(false,true) if the specified PVStructure (is not, is) a compatible NTEnum

◆ isCompatible() [1/2]

static bool epics::nt::NTEnum::isCompatible ( epics::pvData::StructureConstPtr const &  structure)
static

Returns whether the specified Structure is compatible with NTEnum.

Checks if the specified Structure is compatible with this version of NTEnum through the introspection interface.

Parameters
structureThe Structure to test
Returns
(false,true) if the specified Structure (is not, is) a compatible NTEnum

◆ isCompatible() [2/2]

static bool epics::nt::NTEnum::isCompatible ( epics::pvData::PVStructurePtr const &  pvStructure)
static

Returns whether the specified PVStructure is compatible with NTEnum.

Checks if the specified PVStructure is compatible with this version of NTEnum through the introspection interface.

Parameters
pvStructurethe PVStructure to test
Returns
(false,true) if the specified PVStructure (is not, is) a compatible NTEnum

◆ isValid()

bool epics::nt::NTEnum::isValid ( )

Returns whether the wrapped PVStructure is valid with respect to this version of NTEnum.

Unlike isCompatible(), isValid() may perform checks on the value data as well as the introspection data.

Returns
(false,true) if the wrapped PVStructure (is not, is) a valid NTEnum

Definition at line 147 of file ntenum.cpp.

◆ POINTER_DEFINITIONS()

epics::nt::NTEnum::POINTER_DEFINITIONS ( NTEnum  )

◆ wrap()

NTEnum::shared_pointer epics::nt::NTEnum::wrap ( epics::pvData::PVStructurePtr const &  pvStructure)
static

Creates an NTEnum wrapping the specified PVStructure, regardless of the latter's compatibility.

No checks are made as to whether the specified PVStructure is compatible with NTEnum or is non-null.

Parameters
pvStructurethe PVStructure to be wrapped
Returns
NTEnum instance wrapping pvStructure

Definition at line 103 of file ntenum.cpp.

◆ wrapUnsafe()

NTEnum::shared_pointer epics::nt::NTEnum::wrapUnsafe ( epics::pvData::PVStructurePtr const &  pvStructure)
static

Creates an NTEnum wrapping the specified PVStructure, regardless of the latter's compatibility.

No checks are made as to whether the specified PVStructure is compatible with NTEnum or is non-null.

Parameters
pvStructurethe PVStructure to be wrapped
Returns
NTEnum instance wrapping pvStructure

Definition at line 109 of file ntenum.cpp.

References epics::nt::Result::is(), and epics::nt::Result::maybeHas().

Friends And Related Function Documentation

◆ detail::NTEnumBuilder

friend class detail::NTEnumBuilder
friend

Definition at line 269 of file ntenum.h.

Member Data Documentation

◆ URI

const std::string epics::nt::NTEnum::URI
static

Definition at line 122 of file ntenum.h.


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