Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

class Geo::GeoVariant

Variant class for storing name/value pairs in a map, where the value is a subset of common value types.

The variant is an immutable object, akin to C# style strings.

Classes

NameDescription
Geo::GeoVariant::LinkData

GUID class for representing links.

Geo::GeoVariant::UrlData

String class for representing URLs (e.g. file paths).

Functions

NameDescription
FromStringRepresentation(Type, const char *)

Create a new GeoVariant from the string representation.

GeoVariant(const GeoVariant &)

Copy constructor (we can't use the compiler-generated one as we may need to copy the heap data if this is a Url GeoVariant).

GeoVariant(Type)

Construct a GeoVariant of a given type, with a default value.

GeoVariant(const LinkData &)

Construct a GeoVariant of the given type, with the specified value.

GeoVariant(const UrlData &)

Construct a GeoVariant of the given type, with the specified value.

GeoVariant(const Geo::Matrix &)

Construct a GeoVariant of the given type, with the specified value.

GeoVariant(const v128 &)

Construct a GeoVariant of the given type, with the specified value.

GeoVariant(const GeoString< char > &)

Construct a GeoVariant of the given type, with the specified value.

GeoVariant(const char *)

Construct a GeoVariant of the given type, with the specified value.

GeoVariant(bool)

Construct a GeoVariant of the given type, with the specified value.

GeoVariant(float)

Construct a GeoVariant of the given type, with the specified value.

GeoVariant(u64)

Construct a GeoVariant of the given type, with the specified value.

GeoVariant(s64)

Construct a GeoVariant of the given type, with the specified value.

GeoVariant(u32)

Construct a GeoVariant of the given type, with the specified value.

GeoVariant(s32)

Construct a GeoVariant of the given type, with the specified value.

GeoVariant(s16)

Construct a GeoVariant of the given type, with the specified value.

GeoVariant(u16)

Construct a GeoVariant of the given type, with the specified value.

GeoVariant(GeoGuid)

Construct a GeoVariant of the given type, with the specified value.

GetStringRepresentation()

Convert the value to a string, for use when serialising or presenting in a dialog.

GetType()

Returns the type of this GeoVariant.

Load(IGeoInputStream &)

Binary serialisation functions.

operator!=(const GeoVariant &)

Comparison operators.

operator=(const GeoVariant &)

Assignment.

operator==(const GeoVariant &)

Comparison operators.

Save(IGeoStream &)

Binary serialisation functions.

ToBool()

Conversion to the underlying type.

ToCString()

Conversion to the underlying type.

ToFloat()

Conversion to the underlying type.

ToGuid()

Conversion to the underlying type.

ToInteger()

Conversion to the underlying type.

ToInteger64()

Conversion to the underlying type.

ToLink()

Conversion to the underlying type.

ToMatrix()

Conversion to the underlying type.

ToShort()

Conversion to the underlying type.

ToUnsignedInteger()

Conversion to the underlying type.

ToUnsignedInteger64()

Conversion to the underlying type.

ToUnsignedShort()

Conversion to the underlying type.

ToUrl()

Conversion to the underlying type.

ToVector()

Conversion to the underlying type.

Enums

NameDescription
Type

The possible data types that the GeoVariant can hold.

Variables

NameDescription
const GeoVariant InvalidStatic

A single const invalid GeoVariant.


Anchor
a322217a9a70971f81ea5b24f5744c3bb
a322217a9a70971f81ea5b24f5744c3bb

static GeoVariant Geo::GeoVariant::FromStringRepresentation

...

public: GeoVariant FromStringRepresentation
(
    Type type,
    const char * value
)

...

Create a new GeoVariant from the string representation.

The function requires the type it will create and the new value. The conversion functions are not checked, so failure to convert will result in a GeoVariant of the correct type and a default value.


Anchor
afca69f12c0ce40f2fb034bbda2795401
afca69f12c0ce40f2fb034bbda2795401

Geo::GeoVariant::GeoVariant

...

public: GeoVariant
(
    const GeoVariant & rhs
)

...

Copy constructor (we can't use the compiler-generated one as we may need to copy the heap data if this is a Url GeoVariant).


Anchor
a6db479e5439286cd5ba8386d4fa61437
a6db479e5439286cd5ba8386d4fa61437

Geo::GeoVariant::GeoVariant

...

public: GeoVariant
(
    Type t
)

...

Construct a GeoVariant of a given type, with a default value.


Anchor
a546b4d7d83bbcd639ef25bb44afe2447
a546b4d7d83bbcd639ef25bb44afe2447

Geo::GeoVariant::GeoVariant

...

public: GeoVariant
(
    const LinkData & x
)

...

Construct a GeoVariant of the given type, with the specified value.

The various string representations are all internally converted to the utf8 String enum, truncation to 64 characters is silent and will not cause it to fail.


Anchor
a2ad9f6200f50d54b9c818931320cde6d
a2ad9f6200f50d54b9c818931320cde6d

Geo::GeoVariant::GeoVariant

...

public: GeoVariant
(
    const UrlData & x
)

...

Construct a GeoVariant of the given type, with the specified value.

The various string representations are all internally converted to the utf8 String enum, truncation to 64 characters is silent and will not cause it to fail.


Anchor
aea767c578673cdb1a1c5e9e15479787d
aea767c578673cdb1a1c5e9e15479787d

Geo::GeoVariant::GeoVariant

...

public: GeoVariant
(
    const Geo::Matrix & x
)

...

Construct a GeoVariant of the given type, with the specified value.

The various string representations are all internally converted to the utf8 String enum, truncation to 64 characters is silent and will not cause it to fail.


Anchor
a3a4604b3fc0a76932c7c3eca4f418596
a3a4604b3fc0a76932c7c3eca4f418596

Geo::GeoVariant::GeoVariant

...

public: GeoVariant
(
    const v128 & x
)

...

Construct a GeoVariant of the given type, with the specified value.

The various string representations are all internally converted to the utf8 String enum, truncation to 64 characters is silent and will not cause it to fail.


Anchor
afa73b1623397af136a04571c4c382bee
afa73b1623397af136a04571c4c382bee

Geo::GeoVariant::GeoVariant

...

public: GeoVariant
(
    const GeoString< char > & x
)

...

Construct a GeoVariant of the given type, with the specified value.

The various string representations are all internally converted to the utf8 String enum, truncation to 64 characters is silent and will not cause it to fail.


Anchor
abe43c5e816eb7f780d0ebacb730e5113
abe43c5e816eb7f780d0ebacb730e5113

Geo::GeoVariant::GeoVariant

...

public: GeoVariant
(
    const char * x
)

...

Construct a GeoVariant of the given type, with the specified value.

The various string representations are all internally converted to the utf8 String enum, truncation to 64 characters is silent and will not cause it to fail.


Anchor
a9750bf657c6af51291aa442e00c7ba7e
a9750bf657c6af51291aa442e00c7ba7e

Geo::GeoVariant::GeoVariant

...

public: GeoVariant
(
    bool x
)

...

Construct a GeoVariant of the given type, with the specified value.

The various string representations are all internally converted to the utf8 String enum, truncation to 64 characters is silent and will not cause it to fail.


Anchor
a8f027b460640756aec70828995b61ec3
a8f027b460640756aec70828995b61ec3

Geo::GeoVariant::GeoVariant

...

public: GeoVariant
(
    float x
)

...

Construct a GeoVariant of the given type, with the specified value.

The various string representations are all internally converted to the utf8 String enum, truncation to 64 characters is silent and will not cause it to fail.


Anchor
ad4bfb22f18e9df96a61635d186760462
ad4bfb22f18e9df96a61635d186760462

Geo::GeoVariant::GeoVariant

...

public: GeoVariant
(
    u64 x
)

...

Construct a GeoVariant of the given type, with the specified value.

The various string representations are all internally converted to the utf8 String enum, truncation to 64 characters is silent and will not cause it to fail.


Anchor
a006f7b40f9c9442beabbc58da62ce3d0
a006f7b40f9c9442beabbc58da62ce3d0

Geo::GeoVariant::GeoVariant

...

public: GeoVariant
(
    s64 x
)

...

Construct a GeoVariant of the given type, with the specified value.

The various string representations are all internally converted to the utf8 String enum, truncation to 64 characters is silent and will not cause it to fail.


Anchor
a9087a685d5b10a2042ca9bda12fb9c8f
a9087a685d5b10a2042ca9bda12fb9c8f

Geo::GeoVariant::GeoVariant

...

public: GeoVariant
(
    u32 x
)

...

Construct a GeoVariant of the given type, with the specified value.

The various string representations are all internally converted to the utf8 String enum, truncation to 64 characters is silent and will not cause it to fail.


Anchor
a2e9e93214d58dac5ca4a49ab09e7a3d6
a2e9e93214d58dac5ca4a49ab09e7a3d6

Geo::GeoVariant::GeoVariant

...

public: GeoVariant
(
    s32 x
)

...

Construct a GeoVariant of the given type, with the specified value.

The various string representations are all internally converted to the utf8 String enum, truncation to 64 characters is silent and will not cause it to fail.


Anchor
aa682f9e6d3dd196bca03a36efef357e9
aa682f9e6d3dd196bca03a36efef357e9

Geo::GeoVariant::GeoVariant

...

public: GeoVariant
(
    s16 x
)

...

Construct a GeoVariant of the given type, with the specified value.

The various string representations are all internally converted to the utf8 String enum, truncation to 64 characters is silent and will not cause it to fail.


Anchor
a20decb1440852ee7d52a00f9f3378e7a
a20decb1440852ee7d52a00f9f3378e7a

Geo::GeoVariant::GeoVariant

...

public: GeoVariant
(
    u16 x
)

...

Construct a GeoVariant of the given type, with the specified value.

The various string representations are all internally converted to the utf8 String enum, truncation to 64 characters is silent and will not cause it to fail.


Anchor
a8bb334281d34c835e93a104ea65810db
a8bb334281d34c835e93a104ea65810db

Geo::GeoVariant::GeoVariant

...

public: GeoVariant
(
    GeoGuid x
)

...

Construct a GeoVariant of the given type, with the specified value.

The various string representations are all internally converted to the utf8 String enum, truncation to 64 characters is silent and will not cause it to fail.


Anchor
a5dea6bddf91cd6855961d3e447d3e5cd
a5dea6bddf91cd6855961d3e447d3e5cd

GeoString<char> Geo::GeoVariant::GetStringRepresentation

...

public: GeoString< char > GetStringRepresentation() const

...

Convert the value to a string, for use when serialising or presenting in a dialog.


Anchor
ada1111098a300f322c5471ea9d7c0e36
ada1111098a300f322c5471ea9d7c0e36

Type Geo::GeoVariant::GetType

...

public: Type GetType() const

...

Returns the type of this GeoVariant.


Anchor
ad5c8cf573f6feafe8826daa056b80d3d
ad5c8cf573f6feafe8826daa056b80d3d

bool Geo::GeoVariant::Load

...

public: bool Load
(
    IGeoInputStream & stream
)

...

Binary serialisation functions.


Anchor
a70fd7501ed8077400c8d5f45036ac8e7
a70fd7501ed8077400c8d5f45036ac8e7

bool Geo::GeoVariant::operator!=

...

public: bool operator!=
(
    const GeoVariant & rhs
) const

...

Comparison operators.


Anchor
a8ab47efb994c7f267718bab5cf2aed4f
a8ab47efb994c7f267718bab5cf2aed4f

GeoVariant& Geo::GeoVariant::operator=

...

public: GeoVariant & operator=
(
    const GeoVariant & rhs
)

...

Assignment.


Anchor
a77da501ffca7f2c1e7c8861a39a30a11
a77da501ffca7f2c1e7c8861a39a30a11

bool Geo::GeoVariant::operator==

...

public: bool operator==
(
    const GeoVariant & rhs
) const

...

Comparison operators.


Anchor
a1fd5ad362987082ea67cd963b8edb4dd
a1fd5ad362987082ea67cd963b8edb4dd

bool Geo::GeoVariant::Save

...

public: bool Save
(
    IGeoStream & stream
) const

...

Binary serialisation functions.


Anchor
a3977bbb4a1a80d58f6593a7c74efc973
a3977bbb4a1a80d58f6593a7c74efc973

bool Geo::GeoVariant::ToBool

...

public: bool ToBool() const

...

Conversion to the underlying type.

Converting a GeoVariant containing type A to a different type will result in a default value. It will not follow C++ conversion rules (so if you ask for an Integer, and it contains a Short, you will get a 0 result).


Anchor
ae63103d8557f4fa86caf95240320b23d
ae63103d8557f4fa86caf95240320b23d

const char* Geo::GeoVariant::ToCString

...

public: const char * ToCString() const

...

Conversion to the underlying type.

Converting a GeoVariant containing type A to a different type will result in a default value. It will not follow C++ conversion rules (so if you ask for an Integer, and it contains a Short, you will get a 0 result).


Anchor
a6bf5dbe3dd38a381bf4e558fb8236767
a6bf5dbe3dd38a381bf4e558fb8236767

float Geo::GeoVariant::ToFloat

...

public: float ToFloat() const

...

Conversion to the underlying type.

Converting a GeoVariant containing type A to a different type will result in a default value. It will not follow C++ conversion rules (so if you ask for an Integer, and it contains a Short, you will get a 0 result).


Anchor
a498fe4bb0cd48200aa47a3447a440ad3
a498fe4bb0cd48200aa47a3447a440ad3

GeoGuid Geo::GeoVariant::ToGuid

...

public: GeoGuid ToGuid() const

...

Conversion to the underlying type.

Converting a GeoVariant containing type A to a different type will result in a default value. It will not follow C++ conversion rules (so if you ask for an Integer, and it contains a Short, you will get a 0 result).


Anchor
a02c123b5335b02b55b0765c3453d1afa
a02c123b5335b02b55b0765c3453d1afa

s32 Geo::GeoVariant::ToInteger

...

public: s32 ToInteger() const

...

Conversion to the underlying type.

Converting a GeoVariant containing type A to a different type will result in a default value. It will not follow C++ conversion rules (so if you ask for an Integer, and it contains a Short, you will get a 0 result).


Anchor
a69167128b355feee045c3d8cd8dff717
a69167128b355feee045c3d8cd8dff717

s64 Geo::GeoVariant::ToInteger64

...

public: s64 ToInteger64() const

...

Conversion to the underlying type.

Converting a GeoVariant containing type A to a different type will result in a default value. It will not follow C++ conversion rules (so if you ask for an Integer, and it contains a Short, you will get a 0 result).


Anchor
a7f89951a2ee9b44bcbf80cd9b18d7611
a7f89951a2ee9b44bcbf80cd9b18d7611

...

public: LinkData ToLink() const

...

Conversion to the underlying type.

Converting a GeoVariant containing type A to a different type will result in a default value. It will not follow C++ conversion rules (so if you ask for an Integer, and it contains a Short, you will get a 0 result).


Anchor
a73cca9ed6d666871b43c5c0674e144d2
a73cca9ed6d666871b43c5c0674e144d2

Geo::Matrix Geo::GeoVariant::ToMatrix

...

public: Geo::Matrix ToMatrix() const

...

Conversion to the underlying type.

Converting a GeoVariant containing type A to a different type will result in a default value. It will not follow C++ conversion rules (so if you ask for an Integer, and it contains a Short, you will get a 0 result).


Anchor
aaf1c3aaa52ac0674580482723ec412e5
aaf1c3aaa52ac0674580482723ec412e5

s16 Geo::GeoVariant::ToShort

...

public: s16 ToShort() const

...

Conversion to the underlying type.

Converting a GeoVariant containing type A to a different type will result in a default value. It will not follow C++ conversion rules (so if you ask for an Integer, and it contains a Short, you will get a 0 result).


Anchor
a3b476184a1ba463ecee0ba8576906c21
a3b476184a1ba463ecee0ba8576906c21

u32 Geo::GeoVariant::ToUnsignedInteger

...

public: u32 ToUnsignedInteger() const

...

Conversion to the underlying type.

Converting a GeoVariant containing type A to a different type will result in a default value. It will not follow C++ conversion rules (so if you ask for an Integer, and it contains a Short, you will get a 0 result).


Anchor
a864f6e63b0a6854518e8177436aeb64b
a864f6e63b0a6854518e8177436aeb64b

u64 Geo::GeoVariant::ToUnsignedInteger64

...

public: u64 ToUnsignedInteger64() const

...

Conversion to the underlying type.

Converting a GeoVariant containing type A to a different type will result in a default value. It will not follow C++ conversion rules (so if you ask for an Integer, and it contains a Short, you will get a 0 result).


Anchor
af7ebc22d43e8e7adc8f3074fae6c682a
af7ebc22d43e8e7adc8f3074fae6c682a

u16 Geo::GeoVariant::ToUnsignedShort

...

public: u16 ToUnsignedShort() const

...

Conversion to the underlying type.

Converting a GeoVariant containing type A to a different type will result in a default value. It will not follow C++ conversion rules (so if you ask for an Integer, and it contains a Short, you will get a 0 result).


Anchor
a5757eef45437a7a6c07d6b16baedb7cb
a5757eef45437a7a6c07d6b16baedb7cb

UrlData Geo::GeoVariant::ToUrl

...

public: UrlData ToUrl() const

...

Conversion to the underlying type.

Converting a GeoVariant containing type A to a different type will result in a default value. It will not follow C++ conversion rules (so if you ask for an Integer, and it contains a Short, you will get a 0 result).


Anchor
a3a09845aec169de267315ca6c56e6297
a3a09845aec169de267315ca6c56e6297

v128 Geo::GeoVariant::ToVector

...

public: v128 ToVector() const

...

Conversion to the underlying type.

Converting a GeoVariant containing type A to a different type will result in a default value. It will not follow C++ conversion rules (so if you ask for an Integer, and it contains a Short, you will get a 0 result).


Anchor
a62bfd8cbe2badf6fc68158b79ed3058f
a62bfd8cbe2badf6fc68158b79ed3058f

Type

...

public: enum Type
{
    Invalid = -1,
    Bool,
    Short,
    UnsignedShort,
    Integer,
    UnsignedInteger,
    Integer64,
    UnsignedInteger64,
    Float,
    Guid,
    String,
    Vector,
    Matrix,
    Url,
    Link
}

...

The possible data types that the GeoVariant can hold.

enumerators
Invalid
Bool
Short
UnsignedShort
Integer
UnsignedInteger
Integer64
UnsignedInteger64
Float
Guid
String
Vector
Matrix
Url
Link