OpenMW
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Member Functions | Private Attributes | List of all members
ESM::VariantIntegerData Class Reference

#include <variantimp.hpp>

Inheritance diagram for ESM::VariantIntegerData:
Collaboration diagram for ESM::VariantIntegerData:

Public Member Functions

 VariantIntegerData (const VariantDataBase *data=0)
 
virtual VariantDataBaseclone () const
 
virtual int getInteger (bool default_=false) const
 
virtual float getFloat (bool default_=false) const
 
virtual void setInteger (int value)
 Will throw an exception, if type is not compatible with integer. More...
 
virtual void setFloat (float value)
 Will throw an exception, if type is not compatible with float. More...
 
virtual void read (ESMReader &esm, Variant::Format format, VarType type)
 If type is not supported by format, an exception is thrown via ESMReader::fail. More...
 
virtual void write (ESMWriter &esm, Variant::Format format, VarType type) const
 If type is not supported by format, an exception is thrown. More...
 
virtual bool isEqual (const VariantDataBase &value) const
 If the (C++) type of value does not match the type of *this, an exception is thrown. More...
 
- Public Member Functions inherited from ESM::VariantDataBase
virtual ~VariantDataBase ()
 
virtual std::string getString (bool default_=false) const
 
virtual void setString (const std::string &value)
 

Private Attributes

int mValue
 

Constructor & Destructor Documentation

ESM::VariantIntegerData::VariantIntegerData ( const VariantDataBase data = 0)

Calling the constructor with an incompatible data type will result in a silent default initialisation.

Here is the call graph for this function:

Member Function Documentation

ESM::VariantDataBase * ESM::VariantIntegerData::clone ( ) const
virtual

Implements ESM::VariantDataBase.

float ESM::VariantIntegerData::getFloat ( bool  default_ = false) const
virtual

Will throw an exception, if value can not be represented as a float value.

Parameters
default_Return a default value instead of throwing an exception.

Reimplemented from ESM::VariantDataBase.

int ESM::VariantIntegerData::getInteger ( bool  default_ = false) const
virtual

Will throw an exception, if value can not be represented as an integer (implicit casting of float values is permitted).

Parameters
default_Return a default value instead of throwing an exception.

Reimplemented from ESM::VariantDataBase.

bool ESM::VariantIntegerData::isEqual ( const VariantDataBase value) const
virtual

If the (C++) type of value does not match the type of *this, an exception is thrown.

Implements ESM::VariantDataBase.

void ESM::VariantIntegerData::read ( ESMReader esm,
Variant::Format  format,
VarType  type 
)
virtual

If type is not supported by format, an exception is thrown via ESMReader::fail.

Implements ESM::VariantDataBase.

Here is the call graph for this function:

void ESM::VariantIntegerData::setFloat ( float  value)
virtual

Will throw an exception, if type is not compatible with float.

Reimplemented from ESM::VariantDataBase.

void ESM::VariantIntegerData::setInteger ( int  value)
virtual

Will throw an exception, if type is not compatible with integer.

Reimplemented from ESM::VariantDataBase.

void ESM::VariantIntegerData::write ( ESMWriter esm,
Variant::Format  format,
VarType  type 
) const
virtual

If type is not supported by format, an exception is thrown.

Implements ESM::VariantDataBase.

Here is the call graph for this function:

Member Data Documentation

int ESM::VariantIntegerData::mValue
private

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