C++ Based OPC UA Client/Server/PubSub SDK  1.7.6.537
UaPubSubConnectionDataType Class Reference

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

#include <uapubsubconnectiondatatype.h>

Public Member Functions

 UaPubSubConnectionDataType ()
 Constructs an instance of the class UaPubSubConnectionDataType with empty default values.
 
 UaPubSubConnectionDataType (const UaPubSubConnectionDataType &other)
 Constructs an instance of the class UaPubSubConnectionDataType with values from another UaPubSubConnectionDataType object. More...
 
 UaPubSubConnectionDataType (const OpcUa_PubSubConnectionDataType &other)
 Constructs an instance of the class UaPubSubConnectionDataType with values from another OpcUa_PubSubConnectionDataType structure. More...
 
 UaPubSubConnectionDataType (const UaString &name, OpcUa_Boolean enabled, const UaVariant &publisherId, const UaString &transportProfileUri, UaExtensionObject &address, const UaKeyValuePairs &connectionProperties, UaExtensionObject &transportSettings, const UaWriterGroupDataTypes &writerGroups, const UaReaderGroupDataTypes &readerGroups)
 Constructs an instance of the class UaPubSubConnectionDataType with values provided in the constructor.
 
 UaPubSubConnectionDataType (const UaExtensionObject &extensionObject)
 Constructs an instance of the class UaPubSubConnectionDataType initialized with value from a UaExtensionObject. More...
 
 UaPubSubConnectionDataType (const OpcUa_ExtensionObject &extensionObject)
 Constructs an instance of the class UaPubSubConnectionDataType initialized with value from an OpcUa_ExtensionObject structure. More...
 
 ~UaPubSubConnectionDataType ()
 Destroys the UaPubSubConnectionDataType object.
 
void clear ()
 Clear the data of the UaPubSubConnectionDataType. More...
 
bool operator== (const UaPubSubConnectionDataType &other) const
 Compare two UaPubSubConnectionDataType for equality. More...
 
bool operator!= (const UaPubSubConnectionDataType &other) const
 Compare two UaPubSubConnectionDataType for inequality. More...
 
UaPubSubConnectionDataTypeoperator= (const UaPubSubConnectionDataType &other)
 Assignment operator. More...
 
OpcUa_PubSubConnectionDataType * copy () const
 Copy UaPubSubConnectionDataType data to a newly allocated OpcUa_PubSubConnectionDataType. More...
 
void copyTo (OpcUa_PubSubConnectionDataType *pDst) const
 Copy UaPubSubConnectionDataType data to an existing OpcUa_PubSubConnectionDataType structure. More...
 
void attach (OpcUa_PubSubConnectionDataType *pValue)
 Attaches to an existing OpcUa_PubSubConnectionDataType structure. More...
 
OpcUa_PubSubConnectionDataType * detach (OpcUa_PubSubConnectionDataType *pDst)
 Detaches the internal PubSubConnectionDataType structure from this class. More...
 
UaString getName () const
 Returns the Name.
 
OpcUa_Boolean getEnabled () const
 Returns the Enabled.
 
UaVariant getPublisherId () const
 Returns the PublisherId.
 
UaString getTransportProfileUri () const
 Returns the TransportProfileUri.
 
UaExtensionObject getAddress () const
 Returns the Address.
 
void getConnectionProperties (UaKeyValuePairs &connectionProperties) const
 Returns the ConnectionProperties.
 
UaExtensionObject getTransportSettings () const
 Returns the TransportSettings.
 
void getWriterGroups (UaWriterGroupDataTypes &writerGroups) const
 Returns the WriterGroups.
 
void getReaderGroups (UaReaderGroupDataTypes &readerGroups) const
 Returns the ReaderGroups.
 
void setName (const UaString &name)
 Sets the Name.
 
void setEnabled (OpcUa_Boolean enabled)
 Sets the Enabled.
 
void setPublisherId (const UaVariant &publisherId)
 Sets the PublisherId.
 
void setTransportProfileUri (const UaString &transportProfileUri)
 Sets the TransportProfileUri.
 
void setAddress (UaExtensionObject &address)
 Sets the Address.
 
void setConnectionProperties (const UaKeyValuePairs &connectionProperties)
 Sets the ConnectionProperties.
 
void setTransportSettings (UaExtensionObject &transportSettings)
 Sets the TransportSettings.
 
void setWriterGroups (const UaWriterGroupDataTypes &writerGroups)
 Sets the WriterGroups.
 
void setReaderGroups (const UaReaderGroupDataTypes &readerGroups)
 Sets the ReaderGroups.
 

Static Public Member Functions

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

Detailed Description

Wrapper class for the UA stack structure OpcUa_PubSubConnectionDataType.

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

Constructor & Destructor Documentation

UaPubSubConnectionDataType::UaPubSubConnectionDataType ( const UaPubSubConnectionDataType other)

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

Parameters
otherthe other UaPubSubConnectionDataType used to initialize the object
UaPubSubConnectionDataType::UaPubSubConnectionDataType ( const OpcUa_PubSubConnectionDataType &  other)

Constructs an instance of the class UaPubSubConnectionDataType with values from another OpcUa_PubSubConnectionDataType structure.

Parameters
otherthe other OpcUa_PubSubConnectionDataType used to initialize the object
UaPubSubConnectionDataType::UaPubSubConnectionDataType ( const UaExtensionObject extensionObject)

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

Parameters
extensionObjectthe extension object containing the PubSubConnectionDataType
UaPubSubConnectionDataType::UaPubSubConnectionDataType ( const OpcUa_ExtensionObject extensionObject)

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

Parameters
extensionObjectthe extension object containing the PubSubConnectionDataType

Member Function Documentation

void UaPubSubConnectionDataType::attach ( OpcUa_PubSubConnectionDataType *  pValue)

Attaches to an existing OpcUa_PubSubConnectionDataType structure.

Don't manually free the attached structure afterwards, because UaPubSubConnectionDataType is responsible for it now.

Parameters
pValue[in] Parameter to attach to.
void UaPubSubConnectionDataType::clear ( )

Clear the data of the UaPubSubConnectionDataType.

OpcUa_PubSubConnectionDataType * UaPubSubConnectionDataType::clone ( const OpcUa_PubSubConnectionDataType &  source)
static

Copy OpcUa_PubSubConnectionDataType data to a newly allocated OpcUa_PubSubConnectionDataType.

Parameters
sourceSource to clone.
Returns
pointer to a newly allocated OpcUa_PubSubConnectionDataType.
void UaPubSubConnectionDataType::cloneTo ( const OpcUa_PubSubConnectionDataType &  source,
OpcUa_PubSubConnectionDataType &  copy 
)
static

Copy OpcUa_PubSubConnectionDataType data to an existing OpcUa_PubSubConnectionDataType structure.

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

Copy UaPubSubConnectionDataType data to a newly allocated OpcUa_PubSubConnectionDataType.

Returns
pointer to a newly allocated OpcUa_PubSubConnectionDataType.
void UaPubSubConnectionDataType::copyTo ( OpcUa_PubSubConnectionDataType *  pDst) const

Copy UaPubSubConnectionDataType data to an existing OpcUa_PubSubConnectionDataType structure.

Parameters
pDstthe destination of this copy operation.
OpcUa_PubSubConnectionDataType * UaPubSubConnectionDataType::detach ( OpcUa_PubSubConnectionDataType *  pDst)

Detaches the internal PubSubConnectionDataType structure from this class.

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

Parameters
pDst[out] Pointer to an OpcUa_PubSubConnectionDataType structure that receives the PubSubConnectionDataType data.
Returns
If the function succeeds, pDst is returned, otherwise 0 is returned.
bool UaPubSubConnectionDataType::operator!= ( const UaPubSubConnectionDataType other) const

Compare two UaPubSubConnectionDataType for inequality.

See also
operator==
Parameters
otherthe UaPubSubConnectionDataType to compare with.
Returns
true if not equal, false otherwise.
UaPubSubConnectionDataType & UaPubSubConnectionDataType::operator= ( const UaPubSubConnectionDataType other)

Assignment operator.

Parameters
otherthe UaPubSubConnectionDataType to assign.
Returns
reference to itself.
bool UaPubSubConnectionDataType::operator== ( const UaPubSubConnectionDataType other) const

Compare two UaPubSubConnectionDataType for equality.

Parameters
otherthe UaPubSubConnectionDataType to compare with.
Returns
true if equal, false if not.

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