UA Server SDK C++ Bundle  1.4.1.271
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
UaHistoryEvent Class Reference

Wrapper class for the UA stack structure OpcUa_HistoryEvent. More...

#include <uahistoryevent.h>

Public Member Functions

 UaHistoryEvent ()
 Constructs an instance of the class UaHistoryEvent with empty default values.
 
 UaHistoryEvent (const UaHistoryEvent &other)
 Constructs an instance of the class UaHistoryEvent with values from another UaHistoryEvent object. More...
 
 UaHistoryEvent (const OpcUa_HistoryEvent &other)
 Constructs an instance of the class UaHistoryEvent with values from another OpcUa_HistoryEvent structure. More...
 
 UaHistoryEvent (const UaHistoryEventFieldLists &events)
 Constructs an instance of the class UaHistoryEvent with values provided in the constructor.
 
 UaHistoryEvent (const UaExtensionObject &extensionObject)
 Constructs an instance of the class UaHistoryEvent initialized with value from a UaExtensionObject. More...
 
 UaHistoryEvent (const OpcUa_ExtensionObject &extensionObject)
 Constructs an instance of the class UaHistoryEvent initialized with value from an OpcUa_ExtensionObject structure. More...
 
 ~UaHistoryEvent ()
 Destroys the UaHistoryEvent object.
 
void clear ()
 Clear the data of the UaHistoryEvent. More...
 
bool operator== (const UaHistoryEvent &other) const
 Compare two UaHistoryEvent if they are similar. More...
 
bool operator!= (const UaHistoryEvent &other) const
 Returns true if the other UaHistoryEvent is not equal to this. More...
 
UaHistoryEventoperator= (const UaHistoryEvent &other)
 Assignment operator. More...
 
OpcUa_HistoryEvent * copy () const
 Copy UaHistoryEvent data to a newly allocated OpcUa_HistoryEvent. More...
 
void copyTo (OpcUa_HistoryEvent *pDst) const
 Copy UaHistoryEvent data to an existing OpcUa_HistoryEvent structure. More...
 
void attach (OpcUa_HistoryEvent *pValue)
 Attaches the data of the parameter pValue. More...
 
OpcUa_HistoryEvent * detach (OpcUa_HistoryEvent *pDst)
 Detaches the internal HistoryEvent structure from this class. More...
 

Static Public Member Functions

static OpcUa_HistoryEvent * clone (const OpcUa_HistoryEvent &source)
 Copy OpcUa_HistoryEvent data to a newly allocated OpcUa_HistoryEvent. More...
 
static void cloneTo (const OpcUa_HistoryEvent &source, OpcUa_HistoryEvent &copy)
 Copy OpcUa_HistoryEvent data to an existing OpcUa_HistoryEvent structure. More...
 

Detailed Description

Wrapper class for the UA stack structure OpcUa_HistoryEvent.

This class encapsulates the native OpcUa_HistoryEvent structure and handles memory allocation and cleanup for you. UaHistoryEvent uses implicit sharing to avoid needless copying and to boost the performance. Only if you modify a shared HistoryEvent it creates a copy for that (copy-on-write). So assigning another UaHistoryEvent or passing it as parameter needs constant time and is nearly as fast as assigning a pointer.

Constructor & Destructor Documentation

UaHistoryEvent::UaHistoryEvent ( const UaHistoryEvent other)

Constructs an instance of the class UaHistoryEvent with values from another UaHistoryEvent object.

Parameters
otherthe other UaHistoryEvent used to initialize the object
UaHistoryEvent::UaHistoryEvent ( const OpcUa_HistoryEvent &  other)

Constructs an instance of the class UaHistoryEvent with values from another OpcUa_HistoryEvent structure.

Parameters
otherthe other OpcUa_HistoryEvent used to initialize the object
UaHistoryEvent::UaHistoryEvent ( const UaExtensionObject extensionObject)

Constructs an instance of the class UaHistoryEvent initialized with value from a UaExtensionObject.

Parameters
extensionObjectthe extension object containing the HistoryEvent
UaHistoryEvent::UaHistoryEvent ( const OpcUa_ExtensionObject &  extensionObject)

Constructs an instance of the class UaHistoryEvent initialized with value from an OpcUa_ExtensionObject structure.

Parameters
extensionObjectthe extension object containing the HistoryEvent

Member Function Documentation

void UaHistoryEvent::attach ( OpcUa_HistoryEvent *  pValue)

Attaches the data of the parameter pValue.

Don't clear the data of pValue afterwards manually, because UaHistoryEvent is responsible for it now.

Parameters
[in]pValueParameter to attach to.
void UaHistoryEvent::clear ( )

Clear the data of the UaHistoryEvent.

OpcUa_HistoryEvent * UaHistoryEvent::clone ( const OpcUa_HistoryEvent &  source)
static

Copy OpcUa_HistoryEvent data to a newly allocated OpcUa_HistoryEvent.

Parameters
sourceSource to clone.
Returns
new copy.
void UaHistoryEvent::cloneTo ( const OpcUa_HistoryEvent &  source,
OpcUa_HistoryEvent &  copy 
)
static

Copy OpcUa_HistoryEvent data to an existing OpcUa_HistoryEvent structure.

Parameters
sourcethe source of the clone operation.
copythe destination of the clone operation.
OpcUa_HistoryEvent * UaHistoryEvent::copy ( ) const

Copy UaHistoryEvent data to a newly allocated OpcUa_HistoryEvent.

Returns
data to a newly allocated OpcUa_HistoryEvent.
void UaHistoryEvent::copyTo ( OpcUa_HistoryEvent *  pDst) const

Copy UaHistoryEvent data to an existing OpcUa_HistoryEvent structure.

Parameters
pDstthe destination of this copy operation.
OpcUa_HistoryEvent * UaHistoryEvent::detach ( OpcUa_HistoryEvent *  pDst)

Detaches the internal HistoryEvent structure from this class.

This way you take over the control of releasing the HistoryEvent data. If more than one reference exists, the data is copied to pDst instead of being detached.

Returns
If the function succeeds, pDst is returned, otherwise 0 is returned.
Parameters
[out]pDstPointer to OpcUa_HistoryEvent structure that receives the HistoryEvent data.
bool UaHistoryEvent::operator!= ( const UaHistoryEvent other) const

Returns true if the other UaHistoryEvent is not equal to this.

See Also
operator==
Parameters
otherthe UaHistoryEvent to compare.
Returns
true if other is not equal to this.
UaHistoryEvent & UaHistoryEvent::operator= ( const UaHistoryEvent other)

Assignment operator.

Parameters
otherthe UaHistoryEvent to assign.
Returns
Assignment operator.
bool UaHistoryEvent::operator== ( const UaHistoryEvent other) const

Compare two UaHistoryEvent if they are similar.

Parameters
otherthe UaHistoryEvent to compare.
Returns
true if similar, false if not.

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