|
| RscVariant (void) |
| The default constructor creates an empty instance of RscVariant. More...
|
|
| RscVariant (RscType type) |
| Creates an empty but typed instance of RscVariant. More...
|
|
| RscVariant (const String &value) |
| Creates a new instance of RscVariant with a value of type String. More...
|
|
| RscVariant (const char *value) |
| Creates a new instance of RscVariant with a value of type String. More...
|
|
| RscVariant (const char8u *value) |
| Creates a new instance of RscVariant with a value of type String. More...
|
|
| RscVariant (const char16 *input, size_t length) |
| Creates a new instance of RscVariant with a value of type String. More...
|
|
template<int M> |
| RscVariant (const RscString< M > &value) |
| Creates a new instance of RscVariant with a value of type String. More...
|
|
template<int M> |
| RscVariant (const RscSecureString< M > &value) |
| Creates a new instance of RscVariant with a value of type String. More...
|
|
template<int M> |
| RscVariant (const char value[M]) |
| Creates a new instance of RscVariant with a value of type String. More...
|
|
template<int M> |
| RscVariant (char value[M]) |
|
template<class T > |
| RscVariant (const T &value) |
| Creates a new instance of RscVariant with an initial value. More...
|
|
| RscVariant (const RscVariant &arg) |
| The copy constructor. More...
|
|
| RscVariant (RscVariant &&arg) noexcept |
| The move constructor. More...
|
|
| ~RscVariant (void) |
| Default destructor.
|
|
RscVariant & | operator= (const RscVariant &arg) |
| The assign operator. More...
|
|
RscVariant & | operator= (RscVariant &&arg) noexcept |
| The move-assign operator. More...
|
|
RscVariant & | operator= (const String &value) |
| Assign operator for type String. More...
|
|
RscVariant & | operator= (const char *value) |
| Assign operator for type char* . More...
|
|
RscVariant & | operator= (const char8u *value) |
| Assign operator for type char8u* . More...
|
|
template<class T > |
RscVariant & | operator= (const T &value) |
|
template<int M> |
RscVariant & | operator= (const RscString< M > &value) |
|
template<int M> |
RscVariant & | operator= (const RscSecureString< M > &value) |
|
bool | operator== (const RscVariant &arg) const |
| Compares this instance to arg on equality More...
|
|
bool | operator!= (const RscVariant &arg) const |
| Compares this instance to arg on inequality More...
|
|
template<class T > |
RscVariant< N > & | operator= (const T &value) |
| Assign operator for values of arbitrary type. More...
|
|
template<int M> |
RscVariant< N > & | operator= (const RscString< M > &value) |
| Assign operator for values of type RscString. More...
|
|
template<int M> |
RscVariant< N > & | operator= (const RscSecureString< M > &value) |
| Assign operator for values of type SecureString. More...
|
|
| RscVariantBase (RscType type=RscType::None) |
| The default constructor creates an empty instance of RscVariantBase. More...
|
|
| RscVariantBase (RscType type, byte *pBuffer) |
| Creates a typed instance of RscVariant which refers to an external buffer. More...
|
|
| RscVariantBase (RscType type, char *pBuffer, size_t bufferSize) |
| Creates a typed instance of RscVariant which refers to an external buffer. More...
|
|
| RscVariantBase (const RscStringBase &data) |
| Creates a typed instance of RscVariant which refers to an external buffer. More...
|
|
| RscVariantBase (const RscArrayInfo &arrayInfo) |
| Creates a typed instance of RscVariant which represents an array. More...
|
|
| RscVariantBase (const RscStructInfo &structInfo) |
| Creates a typed instance of RscVariant which represents a struct. More...
|
|
| RscVariantBase (const RscVariantBase &arg) |
| The copy constructor. More...
|
|
| RscVariantBase (RscVariantBase &&arg) noexcept |
| The move constructor. More...
|
|
RscVariantBase & | operator= (const RscVariantBase &arg) |
| The assign operator. More...
|
|
RscVariantBase & | operator= (RscVariantBase &&arg) noexcept |
| The move-assign operator. More...
|
|
| ~RscVariantBase (void) |
| The default destructor.
|
|
RscVariantBase & | operator= (const String &value) |
| Assign operator for type String. More...
|
|
RscVariantBase & | operator= (const char *value) |
| Assign operator for type char* . More...
|
|
RscVariantBase & | operator= (const char8u *value) |
| Assign operator for type char8u* . More...
|
|
template<class T > |
RscVariantBase & | operator= (const T &value) |
| Assign operator for values of arbitrary type. More...
|
|
template<int N> |
RscVariantBase & | operator= (const RscString< N > &value) |
| Assign operator for values of type RscString. More...
|
|
template<int N> |
RscVariantBase & | operator= (const RscSecureString< N > &value) |
| Assign operator for values of type SecureString. More...
|
|
void | SetType (RscType value) |
| Forces the internal RscType to be set to another RscType. More...
|
|
RscType | GetType (void) const |
| Gets the RscType of the contained element More...
|
|
RscType | GetValueType (void) const |
| Gets the raw value type as RscType of the contained element. More...
|
|
bool | IsComplexType (void) const |
| Determines if this instance represents a complex type, i.e. an array or a struct. More...
|
|
bool | IsArray (void) const |
| Determines if this instance represents an array. More...
|
|
bool | IsStruct (void) const |
| Determines if this instance represents a struct. More...
|
|
bool | IsFormattable (void) const |
| Determines if this instance is convertible to String using the ToString() operation. More...
|
|
size_t | GetDataSize (void) const |
| Gets the data size of the contained element. More...
|
|
size_t | GetMaxStringSize (void) const |
| Gets the maximal length of strings which are provided by this instance. More...
|
|
size_t | GetBufferSize (void) const |
| Gets the buffer size of this instance. More...
|
|
RscType | GetArrayElementType (void) const |
| Gets the RscType of the array elements, if this instance represents an array. More...
|
|
size_t | GetArraySize (void) const |
| Gets the array size, if this instance represents an array. More...
|
|
size_t | GetArrayDimensions (void) const |
| Gets the count of array dimensions (1 for simple array, 2 for array of array etc.), if this instance represents an array. More...
|
|
size_t | GetArrayFieldCount (void) const |
| Gets the field count of the struct elements, if this instance represents an array of structs. More...
|
|
size_t | GetFieldCount (void) const |
| Gets the field count, if this instance represents a struct. More...
|
|
byte * | GetDataAddress (void) |
| Gets a writable raw pointer to the internal data buffer. More...
|
|
const byte * | GetDataAddress (void) const |
|
const char * | GetChars (void) const |
| Gets a readable pointer to internal string buffer. More...
|
|
void | Assign (const char *input, RscType rscType=RscType::String) |
| Assigns an UTF8 string to this instance. More...
|
|
void | Assign (const char *input, size_t length, RscType rscType=RscType::String) |
| Assigns an UTF8 string to this instance. More...
|
|
void | Assign (const char16 *input, size_t length) |
| Assigns an UTF16 string to this instance. More...
|
|
void | Assign (const String &value) |
| Assigns the given value of type String . More...
|
|
void | CopyTo (String &value) const |
| Copies the content of this variant to a string. More...
|
|
String | ToString (void) const |
| Converts this instance to String if the variant type has a reasonable string representation. More...
|
|
void | Clear (bool clearBuffer=false) |
| Clears the type and all other infos of this instance. More...
|
|
bool | Equals (const RscVariantBase &arg) const |
| Checks if this instance is equal to arg . More...
|
|
void | Read (RscReader &reader, bool omitTag) |
| Reads this instance from RSC. More...
|
|
void | Write (RscWriter &writer, bool omitTag) const |
| Writes this instance to RSC. More...
|
|
bool | HasArrayInfo (void) const |
| Determines if the array info of this instance was set yet. More...
|
|
void | SetArrayInfo (const RscArrayInfo &arrayInfo) |
| Set the array info of this instance. More...
|
|
void | SetArrayInfo (size_t size, RscType elementType=RscType::None, size_t dimensions=1, size_t fieldCount=0) |
| Sets the array info of this instance. More...
|
|
RscArrayInfo & | GetArrayInfo (void) |
| Gets the array info of this instance. More...
|
|
const RscArrayInfo & | GetArrayInfo (void) const |
|
bool | HasStructInfo (void) const |
| Determines if the struct info of this instance was set yet. More...
|
|
void | SetStructInfo (size_t fieldCount) |
| Sets the struct info of this instance. More...
|
|
RscStructInfo & | GetStructInfo (void) |
| Gets the struct info of this instance. More...
|
|
const RscStructInfo & | GetStructInfo (void) const |
|
bool | HasReadElementFunction (void) const |
| Determines if this instance provides an element read function. More...
|
|
ReadElementFunction | GetReadElementFunction (void) const |
| Gets the element read function if available. More...
|
|
void | SetReadElementFunction (ReadElementFunction &function) |
| Sets the element read function. More...
|
|
bool | HasWriteElementFunction (void) const |
| Determines if this instance provides an element write function. More...
|
|
WriteElementFunction | GetWriteElementFunction (void) const |
| Gets the element write function if available. More...
|
|
void | SetWriteElementFunction (WriteElementFunction &function) const |
| Sets the element write function. More...
|
|
void | ResetComplexTypeInfo (void) |
| Clears reader, writer and read/write element functions.
|
|
template<int N> |
void | Assign (char value[N]) |
| Assigns the given value of type T . More...
|
|
template<int N> |
void | Assign (const char value[N]) |
|
template<int N> |
void | Assign (const RscString< N > &value) |
| Assigns the given value of type RscString . More...
|
|
template<int N> |
void | Assign (const RscSecureString< N > &value) |
| Assigns the given value of type SecureString . More...
|
|
template<class T > |
void | Assign (const T &value) |
| Assigns the given value of type T . More...
|
|
template<class T > |
void | CopyTo (T &value) const |
| Copies the value of this instance to the out parameter value . More...
|
|
template<class T > |
T | GetValue (void) const |
| Converts this value to the given type T . More...
|
|
template<class T > |
T * | GetValueAddress (void) |
| Gets the address of the contained value as type T *. More...
|
|
template<class T > |
const T * | GetValueAddress (void) const |
| Gets the address of the contained value as type const T *. More...
|
|
template<int N = 0>
class Arp::Base::Rsc::Commons::RscVariant< N >
Rsc class for variant data types like primitive data type, strings or information about arrays or structs. ArrayInformation and StructInformation are used in combination with RscArrayReader, RscArrayWriter, RscStructReader and RscStructWriter
- Template Parameters
-
N | The maximum count of characters for strings. If this value is zero, strings are not supported. |
The following types are supported by RscVariant: