PLCnext API Documentation 25.0.2.69
Public Member Functions | Protected Member Functions | Friends | List of all members
Arp::Base::Rsc::Commons::RscStringBase Class Reference

This class is a base class of template class RscString. More...

#include <RscStringBase.hpp>

Inheritance diagram for Arp::Base::Rsc::Commons::RscStringBase:
Inheritance graph

Public Member Functions

 operator String (void) const
 Converts this object implicit to an instance of type String. More...
 
size_t GetLength (void) const
 Gets the length of this string. More...
 
const char * CStr (void) const
 Returns a const char pointer to the internal string buffer. More...
 
String ToString (void) const
 Converts this object to an instance of type String. More...
 
void Clear (void)
 Clears this instance resulting in an empty string.
 
void Assign (const char *pChars)
 Assigns the char buffer to this instance. More...
 
void Assign (const String &str)
 Assigns the String to this instance. More...
 
void Read (RscReader &reader)
 Reads this string from RSC. More...
 
void Write (RscWriter &writer) const
 Writes this string to RSC. More...
 

Protected Member Functions

 RscStringBase (RscType stringType)
 Constructs an empty RscStringBase instance. More...
 
 RscStringBase (const RscStringBase &arg)
 Default copy constructor. More...
 
 RscStringBase (RscStringBase &&arg) noexcept
 Default move constructor. More...
 
RscStringBaseoperator= (const RscStringBase &arg)=delete
 
RscStringBaseoperator= (RscStringBase &&arg) noexcept=delete
 
 ~RscStringBase (void)
 Default destructor.
 
void SetBufferInfo (char *pStringBuffer, size_t bufferSize, size_t strLength=0)
 Constructs an empty RscStringBase instance. More...
 
void SetBufferInfo (char *pStringBuffer, size_t bufferSize, const char *pChars)
 Constructs a RscStringBase instance. More...
 
void SetBufferInfo (char *pStringBuffer, size_t bufferSize, const String &str)
 Constructs a RscStringBase instance. More...
 
void Assign (const char *pChars, size_t count)
 Copies the char buffer to this instance with a given length. More...
 
void SetStringType (RscType value)
 Sets the string type of this instance. More...
 
RscType GetStringType (void) const
 Gets the string type of this instance. More...
 

Friends

class RscVariantBase
 

Detailed Description

This class is a base class of template class RscString.

This implementation avoids extensive inlining of RscString implementation, due to the fact, that all template code has to be inlined. This class is not intended for direct use.

Constructor & Destructor Documentation

◆ RscStringBase() [1/3]

Arp::Base::Rsc::Commons::RscStringBase::RscStringBase ( RscType  stringType)
explicitprotected

Constructs an empty RscStringBase instance.

Parameters
stringTypeThe type of the string, i.e. <see cref=RscString"/> or <see cref=RscSecureString"/>.

◆ RscStringBase() [2/3]

Arp::Base::Rsc::Commons::RscStringBase::RscStringBase ( const RscStringBase arg)
protecteddefault

Default copy constructor.

Parameters
argThe argument to copy.

◆ RscStringBase() [3/3]

Arp::Base::Rsc::Commons::RscStringBase::RscStringBase ( RscStringBase &&  arg)
protecteddefaultnoexcept

Default move constructor.

Parameters
argThe argument to move.

Member Function Documentation

◆ Assign() [1/3]

void Arp::Base::Rsc::Commons::RscStringBase::Assign ( const char *  pChars)

Assigns the char buffer to this instance.

Parameters
pCharsThe char buffer to assign to this instance.

◆ Assign() [2/3]

void Arp::Base::Rsc::Commons::RscStringBase::Assign ( const char *  pChars,
size_t  count 
)
protected

Copies the char buffer to this instance with a given length.

Parameters
pCharsThe char buffer to assign to this instance.
countThe number of chars to copy.

◆ Assign() [3/3]

void Arp::Base::Rsc::Commons::RscStringBase::Assign ( const String str)

Assigns the String to this instance.

Parameters
strThe String to assign to this instance.

◆ CStr()

const char * Arp::Base::Rsc::Commons::RscStringBase::CStr ( void  ) const

Returns a const char pointer to the internal string buffer.

Returns
A const char pointer to the internal string buffer.

◆ GetLength()

size_t Arp::Base::Rsc::Commons::RscStringBase::GetLength ( void  ) const

Gets the length of this string.

Returns
Thelength of this string.

◆ GetStringType()

RscType Arp::Base::Rsc::Commons::RscStringBase::GetStringType ( void  ) const
protected

Gets the string type of this instance.

Returns
The string type of this instance.

The type of the string, i.e. <see cref=RscString"/> or <see cref=RscSecureString"/>.

◆ operator String()

Arp::Base::Rsc::Commons::RscStringBase::operator String ( void  ) const

Converts this object implicit to an instance of type String.

Returns
A copy of this object as type String.

◆ Read()

void Arp::Base::Rsc::Commons::RscStringBase::Read ( RscReader reader)

Reads this string from RSC.

Parameters
readerThe RSC reader to read from.

◆ SetBufferInfo() [1/3]

void Arp::Base::Rsc::Commons::RscStringBase::SetBufferInfo ( char *  pStringBuffer,
size_t  stringBufferSize,
const char *  pChars 
)
protected

Constructs a RscStringBase instance.

Parameters
pStringBufferThe string buffer to use.
stringBufferSizeThe size of the string buffer.
pCharsThe initial string of this instance.

◆ SetBufferInfo() [2/3]

void Arp::Base::Rsc::Commons::RscStringBase::SetBufferInfo ( char *  pStringBuffer,
size_t  stringBufferSize,
const String str 
)
protected

Constructs a RscStringBase instance.

Parameters
pStringBufferThe string buffer to use.
stringBufferSizeThe size of the string buffer.
strThe initial string of this instance.

◆ SetBufferInfo() [3/3]

void Arp::Base::Rsc::Commons::RscStringBase::SetBufferInfo ( char *  pStringBuffer,
size_t  stringBufferSize,
size_t  strLength = 0 
)
protected

Constructs an empty RscStringBase instance.

Parameters
pStringBufferThe string buffer to use.
stringBufferSizeThe size of the string buffer.
strLengthThe length of the string inside buffer (if any?).

◆ SetStringType()

void Arp::Base::Rsc::Commons::RscStringBase::SetStringType ( RscType  value)
protected

Sets the string type of this instance.

Parameters
valueThe new string type of this instance.

The type of the string, i.e. <see cref=RscString"/> or <see cref=RscSecureString"/>.

◆ ToString()

String Arp::Base::Rsc::Commons::RscStringBase::ToString ( void  ) const

Converts this object to an instance of type String.

Returns
A copy of this object as type String.

◆ Write()

void Arp::Base::Rsc::Commons::RscStringBase::Write ( RscWriter writer) const

Writes this string to RSC.

Parameters
writerThe RSC writer to write to.

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