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

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

#include <uaservicecounterdatatype.h>

Public Member Functions

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

Static Public Member Functions

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

Detailed Description

Wrapper class for the UA stack structure OpcUa_ServiceCounterDataType.

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

Constructor & Destructor Documentation

UaServiceCounterDataType::UaServiceCounterDataType ( const UaServiceCounterDataType other)

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

Parameters
otherthe other UaServiceCounterDataType used to initialize the object
UaServiceCounterDataType::UaServiceCounterDataType ( const OpcUa_ServiceCounterDataType &  other)

Constructs an instance of the class UaServiceCounterDataType with values from another OpcUa_ServiceCounterDataType structure.

Parameters
otherthe other OpcUa_ServiceCounterDataType used to initialize the object
UaServiceCounterDataType::UaServiceCounterDataType ( const UaExtensionObject extensionObject)

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

Parameters
extensionObjectthe extension object containing the ServiceCounterDataType
UaServiceCounterDataType::UaServiceCounterDataType ( const OpcUa_ExtensionObject &  extensionObject)

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

Parameters
extensionObjectthe extension object containing the ServiceCounterDataType

Member Function Documentation

void UaServiceCounterDataType::attach ( OpcUa_ServiceCounterDataType *  pValue)

Attaches the data of the parameter pValue.

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

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

Clear the data of the UaServiceCounterDataType.

OpcUa_ServiceCounterDataType * UaServiceCounterDataType::clone ( const OpcUa_ServiceCounterDataType &  source)
static

Copy OpcUa_ServiceCounterDataType data to a newly allocated OpcUa_ServiceCounterDataType.

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

Copy OpcUa_ServiceCounterDataType data to an existing OpcUa_ServiceCounterDataType structure.

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

Copy UaServiceCounterDataType data to a newly allocated OpcUa_ServiceCounterDataType.

Returns
data to a newly allocated OpcUa_ServiceCounterDataType.
void UaServiceCounterDataType::copyTo ( OpcUa_ServiceCounterDataType *  pDst) const

Copy UaServiceCounterDataType data to an existing OpcUa_ServiceCounterDataType structure.

Parameters
pDstthe destination of this copy operation.
OpcUa_ServiceCounterDataType * UaServiceCounterDataType::detach ( OpcUa_ServiceCounterDataType *  pDst)

Detaches the internal ServiceCounterDataType structure from this class.

This way you take over the control of releasing the ServiceCounterDataType 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_ServiceCounterDataType structure that receives the ServiceCounterDataType data.
bool UaServiceCounterDataType::operator!= ( const UaServiceCounterDataType other) const

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

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

Assignment operator.

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

Compare two UaServiceCounterDataType if they are similar.

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

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