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

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

#include <uabuildinfo.h>

Public Member Functions

 UaBuildInfo ()
 Constructs an instance of the class UaBuildInfo with empty default values.
 
 UaBuildInfo (const UaBuildInfo &other)
 Constructs an instance of the class UaBuildInfo with values from another UaBuildInfo object. More...
 
 UaBuildInfo (const OpcUa_BuildInfo &other)
 Constructs an instance of the class UaBuildInfo with values from another OpcUa_BuildInfo structure. More...
 
 UaBuildInfo (const UaString &productUri, const UaString &manufacturerName, const UaString &productName, const UaString &softwareVersion, const UaString &buildNumber, const UaDateTime &buildDate)
 Constructs an instance of the class UaBuildInfo with values provided in the constructor.
 
 UaBuildInfo (const UaExtensionObject &extensionObject)
 Constructs an instance of the class UaBuildInfo initialized with value from a UaExtensionObject. More...
 
 UaBuildInfo (const OpcUa_ExtensionObject &extensionObject)
 Constructs an instance of the class UaBuildInfo initialized with value from an OpcUa_ExtensionObject structure. More...
 
 ~UaBuildInfo ()
 Destroys the UaBuildInfo object.
 
void clear ()
 Clear the data of the UaBuildInfo. More...
 
bool operator== (const UaBuildInfo &other) const
 Compare two UaBuildInfo if they are similar. More...
 
bool operator!= (const UaBuildInfo &other) const
 Returns true if the other UaBuildInfo is not equal to this. More...
 
UaBuildInfooperator= (const UaBuildInfo &other)
 Assignment operator. More...
 
OpcUa_BuildInfo * copy () const
 Copy UaBuildInfo data to a newly allocated OpcUa_BuildInfo. More...
 
void copyTo (OpcUa_BuildInfo *pDst) const
 Copy UaBuildInfo data to an existing OpcUa_BuildInfo structure. More...
 
void attach (OpcUa_BuildInfo *pValue)
 Attaches the data of the parameter pValue. More...
 
OpcUa_BuildInfo * detach (OpcUa_BuildInfo *pDst)
 Detaches the internal BuildInfo structure from this class. More...
 

Static Public Member Functions

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

Detailed Description

Wrapper class for the UA stack structure OpcUa_BuildInfo.

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

Constructor & Destructor Documentation

UaBuildInfo::UaBuildInfo ( const UaBuildInfo other)

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

Parameters
otherthe other UaBuildInfo used to initialize the object
UaBuildInfo::UaBuildInfo ( const OpcUa_BuildInfo &  other)

Constructs an instance of the class UaBuildInfo with values from another OpcUa_BuildInfo structure.

Parameters
otherthe other OpcUa_BuildInfo used to initialize the object
UaBuildInfo::UaBuildInfo ( const UaExtensionObject extensionObject)

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

Parameters
extensionObjectthe extension object containing the BuildInfo
UaBuildInfo::UaBuildInfo ( const OpcUa_ExtensionObject &  extensionObject)

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

Parameters
extensionObjectthe extension object containing the BuildInfo

Member Function Documentation

void UaBuildInfo::attach ( OpcUa_BuildInfo *  pValue)

Attaches the data of the parameter pValue.

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

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

Clear the data of the UaBuildInfo.

OpcUa_BuildInfo * UaBuildInfo::clone ( const OpcUa_BuildInfo &  source)
static

Copy OpcUa_BuildInfo data to a newly allocated OpcUa_BuildInfo.

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

Copy OpcUa_BuildInfo data to an existing OpcUa_BuildInfo structure.

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

Copy UaBuildInfo data to a newly allocated OpcUa_BuildInfo.

Returns
data to a newly allocated OpcUa_BuildInfo.
void UaBuildInfo::copyTo ( OpcUa_BuildInfo *  pDst) const

Copy UaBuildInfo data to an existing OpcUa_BuildInfo structure.

Parameters
pDstthe destination of this copy operation.
OpcUa_BuildInfo * UaBuildInfo::detach ( OpcUa_BuildInfo *  pDst)

Detaches the internal BuildInfo structure from this class.

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

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

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

Assignment operator.

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

Compare two UaBuildInfo if they are similar.

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

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