Loading...
Searching...
No Matches
IAttributeExchangingObject.h
Go to the documentation of this file.
// Copyright (C) 2002-2012 Nikolaus Gebhardt
// This file is part of the "Irrlicht Engine".
// For conditions of distribution and use, see copyright notice in irrlicht.h
#ifndef __I_ATTRIBUTE_EXCHANGING_OBJECT_H_INCLUDED__
#define __I_ATTRIBUTE_EXCHANGING_OBJECT_H_INCLUDED__
#include "IReferenceCounted.h"
namespace irr
{
namespace io
{
class IAttributes;
enum E_ATTRIBUTE_READ_WRITE_FLAGS
{
EARWF_FOR_FILE = 0x00000001,
EARWF_FOR_EDITOR = 0x00000002,
EARWF_USE_RELATIVE_PATHS = 0x00000004
};
struct SAttributeReadWriteOptions
{
SAttributeReadWriteOptions()
: Flags(0), Filename(0)
{
}
s32 Flags;
const fschar_t* Filename;
};
class IAttributeExchangingObject : virtual public IReferenceCounted
{
public:
virtual void serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options=0) const {}
virtual void deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options=0) {}
};
} // end namespace io
} // end namespace irr
#endif
IReferenceCounted.h
irr::IReferenceCounted::IReferenceCounted
IReferenceCounted()
Constructor.
Definition IReferenceCounted.h:46
irr::io::IAttributeExchangingObject
An object which is able to serialize and deserialize its attributes into an attributes object.
Definition IAttributeExchangingObject.h:52
irr::io::IAttributeExchangingObject::deserializeAttributes
virtual void deserializeAttributes(io::IAttributes *in, io::SAttributeReadWriteOptions *options=0)
Reads attributes of the object.
Definition IAttributeExchangingObject.h:63
irr::io::IAttributeExchangingObject::serializeAttributes
virtual void serializeAttributes(io::IAttributes *out, io::SAttributeReadWriteOptions *options=0) const
Writes attributes of the object.
Definition IAttributeExchangingObject.h:58
irr::io::IAttributes
Provides a generic interface for attributes and their values and the possiblity to serialize them.
Definition IAttributes.h:42
irr::io
This namespace provides interfaces for input/output: Reading and writing files, accessing zip archive...
Definition EAttributes.h:11
irr::io::E_ATTRIBUTE_READ_WRITE_FLAGS
E_ATTRIBUTE_READ_WRITE_FLAGS
Enumeration flags passed through SAttributeReadWriteOptions to the IAttributeExchangingObject object.
Definition IAttributeExchangingObject.h:21
irr::io::EARWF_FOR_EDITOR
@ EARWF_FOR_EDITOR
Serialization/Deserializion is done for an editor property box.
Definition IAttributeExchangingObject.h:26
irr::io::EARWF_FOR_FILE
@ EARWF_FOR_FILE
Serialization/Deserializion is done for an xml file.
Definition IAttributeExchangingObject.h:23
irr::io::EARWF_USE_RELATIVE_PATHS
@ EARWF_USE_RELATIVE_PATHS
When writing filenames, relative paths should be used.
Definition IAttributeExchangingObject.h:29
irr
Everything in the Irrlicht Engine can be found in this namespace.
Definition aabbox3d.h:13
irr::fschar_t
char fschar_t
Type name for character type used by the file system.
Definition irrTypes.h:158
irr::s32
signed int s32
32 bit signed variable.
Definition irrTypes.h:66
irr::io::SAttributeReadWriteOptions
struct holding data describing options
Definition IAttributeExchangingObject.h:35
irr::io::SAttributeReadWriteOptions::Flags
s32 Flags
Combination of E_ATTRIBUTE_READ_WRITE_FLAGS or other, custom ones.
Definition IAttributeExchangingObject.h:43
irr::io::SAttributeReadWriteOptions::SAttributeReadWriteOptions
SAttributeReadWriteOptions()
Constructor.
Definition IAttributeExchangingObject.h:37
irr::io::SAttributeReadWriteOptions::Filename
const fschar_t * Filename
Optional filename.
Definition IAttributeExchangingObject.h:46
- Irrlicht Engine Documentation © 2003-2012 by Nikolaus Gebhardt. Generated on for Irrlicht 3D Engine by Doxygen 1.15.0