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

Convenience Class for NTAttribute. More...

#include <ntattribute.h>

Public Member Functions

 POINTER_DEFINITIONS (NTAttribute)
 
bool isValid ()
 
 ~NTAttribute ()
 
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::PVStringPtr getName () const
 
epics::pvData::PVUnionPtr getValue () const
 
epics::pvData::PVStringArrayPtr getTags () 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 NTAttributeBuilderPtr createBuilder ()
 

Static Public Attributes

static const std::string URI
 

Friends

class detail::NTAttributeBuilder
 

Detailed Description

Convenience Class for NTAttribute.

Author
dgh

Definition at line 124 of file ntattribute.h.

Constructor & Destructor Documentation

◆ ~NTAttribute()

epics::nt::NTAttribute::~NTAttribute ( )
inline

Destructor.

Definition at line 225 of file ntattribute.h.

Member Function Documentation

◆ attachAlarm()

bool epics::nt::NTAttribute::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 177 of file ntattribute.cpp.

◆ attachTimeStamp()

bool epics::nt::NTAttribute::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 168 of file ntattribute.cpp.

◆ createBuilder()

NTAttributeBuilderPtr epics::nt::NTAttribute::createBuilder ( )
static

Creates an NTAttribute builder instance.

Returns
builder instance.

Definition at line 163 of file ntattribute.cpp.

◆ getAlarm()

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

Returns the alarm field.

Returns
the alarm field or null if no such field.

Definition at line 201 of file ntattribute.cpp.

◆ getDescriptor()

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

Returns the descriptor field.

Returns
the descriptor field or null if no such field.

Definition at line 191 of file ntattribute.cpp.

◆ getName()

PVStringPtr epics::nt::NTAttribute::getName ( ) const

Returns the name field.

Returns
the name field.

Definition at line 207 of file ntattribute.cpp.

◆ getPVStructure()

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

Returns the PVStructure wrapped by this instance.

Returns
the PVStructure wrapped by this instance.

Definition at line 186 of file ntattribute.cpp.

◆ getTags()

PVStringArrayPtr epics::nt::NTAttribute::getTags ( ) const

Returns the tags field.

Returns
the tags field or null if no such field.

Definition at line 217 of file ntattribute.cpp.

◆ getTimeStamp()

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

Returns the timeStamp field.

Returns
the timStamp field or null if no such field.

Definition at line 196 of file ntattribute.cpp.

◆ getValue()

PVUnionPtr epics::nt::NTAttribute::getValue ( ) const

Returns the value field.

Returns
the value field.

Definition at line 212 of file ntattribute.cpp.

◆ is_a() [1/2]

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

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

Checks if the specified Structure reports compatibility with this version of NTAttribute 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 NTAttribute

◆ is_a() [2/2]

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

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

Checks if the specified PVStructure reports compatibility with this version of NTAttribute 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 NTAttribute

◆ isCompatible() [1/2]

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

Returns whether the specified Structure is compatible with NTAttribute.

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

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

◆ isCompatible() [2/2]

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

Returns whether the specified PVStructure is compatible with NTAttribute.

Checks if the specified tructure is compatible with this version of NTAttribute through the introspection interface.

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

◆ isValid()

bool epics::nt::NTAttribute::isValid ( )

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

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 NTAttribute

Definition at line 158 of file ntattribute.cpp.

◆ POINTER_DEFINITIONS()

epics::nt::NTAttribute::POINTER_DEFINITIONS ( NTAttribute  )

◆ wrap()

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

Creates an NTAttribute wrapping the specified PVStructure if the latter is compatible.

Checks the supplied PVStructure is compatible with NTAttribute and if so returns an NTAttribute which wraps it. This method will return null if the structure is is not compatible or is null.

Parameters
pvStructurethe PVStructure to be wrapped
Returns
NTAttribute instance wrapping pvStructure on success, null otherwise

Definition at line 112 of file ntattribute.cpp.

◆ wrapUnsafe()

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

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

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

Parameters
pvStructurethe PVStructure to be wrapped
Returns
NTAttribute instance wrapping pvStructure

Definition at line 118 of file ntattribute.cpp.

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

Friends And Related Function Documentation

◆ detail::NTAttributeBuilder

friend class detail::NTAttributeBuilder
friend

Definition at line 290 of file ntattribute.h.

Member Data Documentation

◆ URI

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

Definition at line 129 of file ntattribute.h.


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