1 #ifndef OPENMW_ESM_VARIANT_H
2 #define OPENMW_ESM_VARIANT_H
23 class VariantDataBase;
42 Variant (
const std::string& value);
68 void write (std::ostream& stream)
const;
73 void setString (
const std::string& value);
85 std::ostream&
operator<<(std::ostream& stream,
const Variant& value);
87 bool operator== (
const Variant& left,
const Variant& right);
88 bool operator!= (
const Variant& left,
const Variant& right);
Variant & operator=(const Variant &variant)
Definition: variant.cpp:50
Definition: variant.hpp:37
VarType
Definition: variant.hpp:12
bool operator==(const CellId &left, const CellId &right)
Definition: cellid.cpp:29
Definition: esmreader.hpp:21
Definition: variant.hpp:36
void setType(VarType type)
Definition: variant.cpp:253
void setFloat(float value)
Will throw an exception, if type is not compatible with float.
Definition: variant.cpp:306
Variant()
Definition: variant.cpp:19
Definition: variant.hpp:15
Format
Definition: variant.hpp:32
Definition: variant.hpp:14
Definition: esmwriter.hpp:17
bool isEqual(const Variant &value) const
Definition: variant.cpp:314
~Variant()
Definition: variant.cpp:45
Definition: variantimp.hpp:10
std::ostream & operator<<(std::ostream &stream, const Variant &value)
Definition: variant.cpp:327
Definition: variant.hpp:18
Definition: variant.hpp:16
int getInteger() const
Definition: variant.cpp:82
Definition: variant.hpp:35
void setString(const std::string &value)
Will throw an exception, if type is not compatible with string.
Definition: variant.cpp:290
VarType getType() const
Definition: variant.cpp:69
Definition: variant.hpp:20
Definition: variant.hpp:25
Definition: variant.hpp:34
std::string getString() const
Will throw an exception, if value can not be represented as a string.
Definition: variant.cpp:74
float getFloat() const
Will throw an exception, if value can not be represented as a float value.
Definition: variant.cpp:90
Definition: variant.hpp:19
void read(ESMReader &esm, Format format)
Definition: variant.cpp:98
void write(ESMWriter &esm, Format format) const
Definition: variant.cpp:189
Definition: variant.hpp:17
void setInteger(int value)
Will throw an exception, if type is not compatible with integer.
Definition: variant.cpp:298
bool operator!=(const CellId &left, const CellId &right)
Definition: cellid.cpp:35
VariantDataBase * mData
Definition: variant.hpp:28
VarType mType
Definition: variant.hpp:27