![Logo](../../logo.png) |
Elm
2
ELM is a library providing generic data structures, OS-independent interface, plugins and XML.
|
21 #ifndef ELM_RTTI_TYPE_H_
22 #define ELM_RTTI_TYPE_H_
24 #include <elm/data/HashMap.h>
25 #include <elm/data/List.h>
27 #include <elm/string.h>
28 #include <elm/util/Initializer.h>
45 virtual const Type&
type(
void)
const = 0;
46 virtual int valueFor(
string text)
const = 0;
53 virtual const Type&
type(
void)
const = 0;
62 virtual int count(
void)
const = 0;
70 virtual const Type&
templ(
void)
const = 0;
78 virtual int index(
void)
const = 0;
91 inline string name(
void)
const {
return _name; }
95 virtual bool isVoid(
void)
const;
96 virtual bool isBool(
void)
const;
97 virtual bool isInt(
void)
const;
98 virtual bool isFloat(
void)
const;
100 virtual bool isPtr(
void)
const;
102 virtual bool isClass(
void)
const;
104 virtual bool isEnum(
void)
const;
126 virtual bool isPtr(
void)
const override;
128 const Type&
to(
void)
const {
return _to; }
virtual const PointerType & asPtr(void) const override
Definition: rtti.cpp:207
virtual const TemplateType * asTemplate(void) const
Definition: rtti.cpp:473
typename type_info< T >::out_t out
Definition: type_info.h:284
virtual ~InstanceType(void)
Definition: rtti.cpp:565
string name(void) const
Definition: Type.h:91
virtual bool isFloat(void) const
Definition: rtti.cpp:387
virtual ~Type(void)
Definition: rtti.cpp:332
virtual void * instantiate(void) const =0
virtual const PointerType & asPtr(void) const
Definition: rtti.cpp:423
virtual bool isInt(void) const
Definition: rtti.cpp:379
Definition: UniquePtr.h:27
HashMap< string, const Type * >::Iter TypeIter
Definition: Type.h:85
virtual bool isEnum(void) const
Definition: rtti.cpp:434
virtual const InstanceType * asInstance(void) const
Definition: rtti.cpp:482
virtual const ParamType * asParam(void) const
Definition: rtti.cpp:491
virtual int index(void) const =0
static const Type & param2
Definition: Type.h:112
virtual const Type & type(void) const =0
void initialize(void)
Definition: rtti.cpp:306
static const Type & param1
Definition: Type.h:112
io::Output & operator<<(io::Output &out, const Type &type)
Definition: rtti.cpp:1414
static const Type & param0
Definition: Type.h:112
virtual const AbstractClass & asClass(void) const
Definition: rtti.cpp:413
virtual ~ParamType(void)
Definition: rtti.cpp:504
static const Type & param3
Definition: Type.h:112
virtual ~Enumerable(void)
Definition: rtti.cpp:226
const Type & to(void) const
Definition: Type.h:128
virtual bool isSerial(void) const
Definition: rtti.cpp:453
Type(string name="")
Definition: rtti.cpp:299
virtual bool canCast(const Type *t) const
Definition: rtti.cpp:354
virtual ~Serializable(void)
Definition: rtti.cpp:259
virtual int count(void) const =0
Definition: Serializer.h:36
virtual const Serializable & asSerial(void) const
Definition: rtti.cpp:463
static const Type * get(string name)
Definition: rtti.cpp:316
virtual void serialize(serial2::Serializer &ser, const void *data) const =0
virtual bool isPtr(void) const override
Definition: rtti.cpp:203
virtual void unserialize(serial2::Unserializer &uns, void *data) const =0
const PointerType & pointer(void) const
Definition: rtti.cpp:338
virtual const List< const Type * > params(void) const =0
virtual ~TemplateType(void)
Definition: rtti.cpp:548
virtual bool isVoid(void) const
Definition: rtti.cpp:363
virtual cstring nameFor(int value) const =0
Definition: Unserializer.h:15
virtual const Type & type(void) const =0
Definition: Initializer.h:14
virtual const Type & templ(void) const =0
const Type & typeFor(const Type ¶m) const
Definition: rtti.cpp:587
bool operator!=(const Type &t) const
Definition: Type.h:116
virtual const Enumerable & asEnum(void) const
Definition: rtti.cpp:443
virtual bool isBool(void) const
Definition: rtti.cpp:371
virtual bool isClass(void) const
Definition: rtti.cpp:404
PointerType(const Type &to)
Definition: rtti.cpp:198
static TypeIter types(void)
Definition: rtti.cpp:325
virtual bool isPtr(void) const
Definition: rtti.cpp:395
virtual int valueFor(string text) const =0
bool operator==(const Type &t) const
Definition: Type.h:115