C++ Based OPC UA Client/Server/PubSub SDK  1.7.6.537

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

#include <ualocalizedtext.h>

Inherits OpcUa_LocalizedText.

Public Member Functions

 UaLocalizedText ()
 construction
 
 UaLocalizedText (const UaLocalizedText &other)
 construction More...
 
 UaLocalizedText (const OpcUa_LocalizedText &other)
 construction More...
 
 UaLocalizedText (const UaString &Locale, const UaString &Text)
 construction More...
 
 ~UaLocalizedText ()
 destruction
 
void clear ()
 Clear the data of the UaLocalizedText. More...
 
void detach ()
 Detach class from structure data. More...
 
UaLocalizedTextattach (const OpcUa_LocalizedText *pSrc)
 Attaches an existing OpcUa_LocalizedText structure. More...
 
OpcUa_Boolean isNull () const
 Checks if the localized text is null. More...
 
UaLocalizedTextoperator= (const UaLocalizedText &other)
 Assignment operator. More...
 
UaLocalizedTextoperator= (const OpcUa_LocalizedText &other)
 Assignment operator. More...
 
bool operator== (const UaLocalizedText &other) const
 Compare variables if they are similar. More...
 
bool operator!= (const UaLocalizedText &other) const
 Returns true if other is not equal to this. More...
 
 operator const OpcUa_LocalizedText * () const
 Return internal OpcUa_LocalizedText structure. More...
 
OpcUa_LocalizedTextcopy () const
 Copy UaLocalizedText data to a newly allocated OpcUa_LocalizedText. More...
 
void copyTo (OpcUa_LocalizedText *pDst) const
 Copy UaLocalizedText data to an existing OpcUa_LocalizedText structure. More...
 
UaString toString () const
 Converts the text part of the LocalizedText into a UaString. More...
 
UaString toFullString () const
 Converts the full LocalizedText into a UaString. More...
 
void setLocalizedText (const UaString &sLocale, const UaString &sText)
 Clears the current localized text and sets the locale part with the passed locale string and the text part with the passed text string. More...
 
void setLocalizedText (const UaString &sText)
 Clears the current localized text and sets the text part with the passed text string. More...
 
void setText (const UaString &sText)
 Overwrites the text part of the localized text with the passed text string. More...
 
void setLocale (const UaString &sLocale)
 Overwrites the locale part of the localized text with the passed locale string. More...
 
const OpcUa_Stringlocale () const
 Get the locale string. More...
 
const OpcUa_Stringtext () const
 Get the text string. More...
 

Static Public Member Functions

static bool compare (const OpcUa_LocalizedText &, const OpcUa_LocalizedText &)
 Compare two UaLocalizedText variables. More...
 
static OpcUa_LocalizedTextclone (const OpcUa_LocalizedText &source)
 Copy OpcUa_VariableAttributes data to a newly allocated OpcUa_VariableAttributes. More...
 
static void cloneTo (const OpcUa_LocalizedText &source, OpcUa_LocalizedText &copy)
 Copy OpcUa_VariableTypeAttributes data to an existing OpcUa_VariableTypeAttributes structure. More...
 

Friends

UABASE_EXPORT UaDataStream & operator<< (UaDataStream &, const UaLocalizedText &)
 Writes a LocalizedText to the stream. More...
 
UABASE_EXPORT UaDataStream & operator>> (UaDataStream &, UaLocalizedText &)
 Reads a LocalizedText from the stream. More...
 

Detailed Description

Wrapper class for the UA stack structure OpcUa_LocalizedText.

Constructor & Destructor Documentation

UaLocalizedText::UaLocalizedText ( const UaLocalizedText other)

construction

Parameters
otherthe UaLocalizedText.
UaLocalizedText::UaLocalizedText ( const OpcUa_LocalizedText other)

construction

Parameters
otherthe OpcUa_LocalizedText.
UaLocalizedText::UaLocalizedText ( const UaString sLocale,
const UaString sText 
)

construction

Parameters
sLocalethe country id (e.g. "en").
sTextthe text to write.

Member Function Documentation

UaLocalizedText & UaLocalizedText::attach ( const OpcUa_LocalizedText pSrc)

Attaches an existing OpcUa_LocalizedText structure.

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

Parameters
pSrc[in] Parameter to attach.
void UaLocalizedText::clear ( )

Clear the data of the UaLocalizedText.

OpcUa_LocalizedText * UaLocalizedText::clone ( const OpcUa_LocalizedText source)
static

Copy OpcUa_VariableAttributes data to a newly allocated OpcUa_VariableAttributes.

Parameters
sourceSource to clone.
Returns
new copy.
void UaLocalizedText::cloneTo ( const OpcUa_LocalizedText source,
OpcUa_LocalizedText copy 
)
static

Copy OpcUa_VariableTypeAttributes data to an existing OpcUa_VariableTypeAttributes structure.

Parameters
sourceSource OpcUa_VariableTypeAttributes to clone.
copyNew copy of source OpcUa_VariableTypeAttributes.
bool UaLocalizedText::compare ( const OpcUa_LocalizedText lText1,
const OpcUa_LocalizedText lText2 
)
static

Compare two UaLocalizedText variables.

Parameters
lText1a value as UaLocalizedText.
lText2a value as UaLocalizedText.
Returns
true if equal false if not.
OpcUa_LocalizedText * UaLocalizedText::copy ( ) const

Copy UaLocalizedText data to a newly allocated OpcUa_LocalizedText.

Returns
a newly allocated OpcUa_LocalizedText.
void UaLocalizedText::copyTo ( OpcUa_LocalizedText pDst) const

Copy UaLocalizedText data to an existing OpcUa_LocalizedText structure.

Parameters
pDstthe destination of this operation.
void UaLocalizedText::detach ( )

Detach class from structure data.

OpcUa_Boolean UaLocalizedText::isNull ( ) const

Checks if the localized text is null.

Returns
true if NULL false if not.
const OpcUa_String* UaLocalizedText::locale ( ) const
inline

Get the locale string.

Returns
the locale string.
UaLocalizedText::operator const OpcUa_LocalizedText * ( ) const

Return internal OpcUa_LocalizedText structure.

Returns
internal OpcUa_LocalizedText structure.
bool UaLocalizedText::operator!= ( const UaLocalizedText other) const

Returns true if other is not equal to this.

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

Assignment operator.

Parameters
otherthe UaLocalizedText to assign.
Returns
Assignment operator.
UaLocalizedText & UaLocalizedText::operator= ( const OpcUa_LocalizedText other)

Assignment operator.

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

Compare variables if they are similar.

Parameters
otherthe char to compare.
Returns
true if not similar false if similar.
void UaLocalizedText::setLocale ( const UaString sLocale)

Overwrites the locale part of the localized text with the passed locale string.

Parameters
sLocaleThe locale id (e.g. "en").
void UaLocalizedText::setLocalizedText ( const UaString sLocale,
const UaString sText 
)

Clears the current localized text and sets the locale part with the passed locale string and the text part with the passed text string.

Parameters
sLocaleThe locale id (e.g. "en").
sTextThe text to set.
void UaLocalizedText::setLocalizedText ( const UaString sText)

Clears the current localized text and sets the text part with the passed text string.

Parameters
sTextThe text to set.
void UaLocalizedText::setText ( const UaString sText)

Overwrites the text part of the localized text with the passed text string.

Parameters
sTextThe text to set.
const OpcUa_String* UaLocalizedText::text ( ) const
inline

Get the text string.

Returns
the text string.
UaString UaLocalizedText::toFullString ( ) const

Converts the full LocalizedText into a UaString.

The format of the string is
<locale>|<text>

with the fields

<locale>
The locale part of the LocalizedText.
<text>
The text part of the LocalizedText.
Returns
the converted string.
UaString UaLocalizedText::toString ( ) const

Converts the text part of the LocalizedText into a UaString.

Returns
the converted string.

Friends And Related Function Documentation

UABASE_EXPORT UaDataStream& operator<< ( UaDataStream &  ,
const UaLocalizedText  
)
friend

Writes a LocalizedText to the stream.

UABASE_EXPORT UaDataStream& operator>> ( UaDataStream &  ,
UaLocalizedText  
)
friend

Reads a LocalizedText from the stream.


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