#ifndef REFLEX_BUILD
#define REFLEX_BUILD
#endif
#include "Reflex/Kernel.h"
#include "Reflex/Scope.h"
#include "Reflex/internal/ScopeName.h"
#include "Reflex/PropertyList.h"
#include "Reflex/Type.h"
#include "Reflex/Base.h"
#include "Reflex/Member.h"
#include "Reflex/Object.h"
#include "Reflex/PropertyList.h"
#include "Reflex/MemberTemplate.h"
#include "Reflex/Any.h"
#include "Fundamental.h"
#include "Namespace.h"
#include "Typedef.h"
#include "Class.h"
#include <typeinfo>
Reflex::Instance::Instance() {
static bool initialized = false;
if (initialized) {
return;
}
initialized = true;
Namespace::GlobalScope();
TypeBase* tb = 0;
Type t = Type();
tb = new TypeBase( "char", sizeof( char ), FUNDAMENTAL, typeid( char ), Type(), REPRES_CHAR);
tb->Properties().AddProperty( "Description", "fundamental type" );
tb = new TypeBase( "signed char", sizeof( signed char ), FUNDAMENTAL, typeid( signed char ), Type(), REPRES_SIGNED_CHAR);
tb->Properties().AddProperty( "Description", "fundamental type" );
tb = new TypeBase( "short int", sizeof( short int ), FUNDAMENTAL, typeid( short int ), Type(), REPRES_SHORT_INT);
tb->Properties().AddProperty( "Description", "fundamental type" );
t = tb->ThisType();
new Typedef( "short", t, FUNDAMENTAL, t );
new Typedef( "signed short", t, FUNDAMENTAL, t );
new Typedef( "short signed", t, FUNDAMENTAL, t );
new Typedef( "signed short int", t, FUNDAMENTAL, t );
new Typedef( "short signed int", t, FUNDAMENTAL, t );
tb = new TypeBase( "int", sizeof( int ), FUNDAMENTAL, typeid( int ), Type(), REPRES_INT);
tb->Properties().AddProperty( "Description", "fundamental type" );
t = tb->ThisType();
new Typedef( "signed", t, FUNDAMENTAL, t );
new Typedef( "signed int", t, FUNDAMENTAL, t );
tb = new TypeBase( "long int", sizeof( long int ), FUNDAMENTAL, typeid( long int ), Type(), REPRES_LONG_INT);
tb->Properties().AddProperty( "Description", "fundamental type" );
t = tb->ThisType();
new Typedef( "long", t, FUNDAMENTAL, t );
new Typedef( "signed long", t, FUNDAMENTAL, t );
new Typedef( "long signed", t, FUNDAMENTAL, t );
new Typedef( "signed long int", t, FUNDAMENTAL, t );
new Typedef( "long signed int", t, FUNDAMENTAL, t );
tb = new TypeBase( "unsigned char", sizeof( unsigned char ), FUNDAMENTAL, typeid( unsigned char ), Type(), REPRES_UNSIGNED_CHAR);
tb->Properties().AddProperty( "Description", "fundamental type" );
tb = new TypeBase( "unsigned short int", sizeof( unsigned short int ), FUNDAMENTAL, typeid( unsigned short int ), Type(), REPRES_UNSIGNED_SHORT_INT);
tb->Properties().AddProperty( "Description", "fundamental type" );
t = tb->ThisType();
new Typedef( "unsigned short", t, FUNDAMENTAL, t );
new Typedef( "short unsigned int", t, FUNDAMENTAL, t );
tb = new TypeBase( "unsigned int", sizeof( unsigned int ), FUNDAMENTAL, typeid( unsigned int ), Type(), REPRES_UNSIGNED_INT);
tb->Properties().AddProperty( "Description", "fundamental type" );
t = tb->ThisType();
new Typedef( "unsigned", t, FUNDAMENTAL, t );
tb = new TypeBase( "unsigned long int", sizeof( unsigned long int ), FUNDAMENTAL, typeid( unsigned long int ), Type(), REPRES_UNSIGNED_LONG_INT);
tb->Properties().AddProperty( "Description", "fundamental type" );
t = tb->ThisType();
new Typedef( "unsigned long", t, FUNDAMENTAL, t );
new Typedef( "long unsigned", t, FUNDAMENTAL, t );
new Typedef( "long unsigned int", t, FUNDAMENTAL, t );
tb = new TypeBase( "bool", sizeof( bool ), FUNDAMENTAL, typeid( bool ), Type(), REPRES_BOOL);
tb->Properties().AddProperty( "Description", "fundamental type" );
tb = new TypeBase( "float", sizeof( float ), FUNDAMENTAL, typeid( float ), Type(), REPRES_FLOAT);
tb->Properties().AddProperty( "Description", "fundamental type" );
tb = new TypeBase( "double", sizeof( double ), FUNDAMENTAL, typeid( double ), Type(), REPRES_DOUBLE);
tb->Properties().AddProperty( "Description", "fundamental type" );
tb = new TypeBase( "long double", sizeof( long double ), FUNDAMENTAL, typeid( long double ), Type(), REPRES_LONG_DOUBLE);
tb->Properties().AddProperty( "Description", "fundamental type" );
tb = new TypeBase( "void", 0, FUNDAMENTAL, typeid( void ), Type(), REPRES_VOID);
tb->Properties().AddProperty( "Description", "fundamental type" );
#if defined(_WIN32) && !defined(__CINT__)
typedef __int64 longlong;
typedef unsigned __int64 ulonglong;
#else
typedef long long int longlong;
typedef unsigned long long int ulonglong;
#endif
tb = new TypeBase( "long long", sizeof( longlong ), FUNDAMENTAL, typeid( longlong ), Type(), REPRES_LONGLONG);
tb->Properties().AddProperty( "Description", "fundamental type" );
t = tb->ThisType();
new Typedef( "long long int", t, FUNDAMENTAL, t );
tb = new TypeBase( "unsigned long long", sizeof( ulonglong ), FUNDAMENTAL, typeid( ulonglong ), Type(), REPRES_ULONGLONG);
tb->Properties().AddProperty( "Description", "fundamental type" );
t = tb->ThisType();
new Typedef( "long long unsigned", t, FUNDAMENTAL, t );
new Typedef( "unsigned long long int", t, FUNDAMENTAL, t );
new Typedef( "long long unsigned int", t, FUNDAMENTAL, t );
}
void Reflex::Instance::Shutdown() {
MemberTemplateName::CleanUp();
TypeTemplateName::CleanUp();
TypeName::CleanUp();
ScopeName::CleanUp();
}
Reflex::Instance::~Instance() {
}
const Reflex::StdString_Cont_Type_t & Reflex::Dummy::StdStringCont() {
return Get< StdString_Cont_Type_t >();
}
const Reflex::Type_Cont_Type_t & Reflex::Dummy::TypeCont() {
return Get< Type_Cont_Type_t >();
}
const Reflex::Base_Cont_Type_t & Reflex::Dummy::BaseCont() {
return Get< Base_Cont_Type_t >();
}
const Reflex::Scope_Cont_Type_t & Reflex::Dummy::ScopeCont() {
return Get< Scope_Cont_Type_t >();
}
const Reflex::Object_Cont_Type_t & Reflex::Dummy::ObjectCont() {
return Get< Object_Cont_Type_t >();
}
const Reflex::Member_Cont_Type_t & Reflex::Dummy::MemberCont() {
return Get< Member_Cont_Type_t >();
}
const Reflex::TypeTemplate_Cont_Type_t & Reflex::Dummy::TypeTemplateCont() {
return Get< TypeTemplate_Cont_Type_t >();
}
const Reflex::MemberTemplate_Cont_Type_t & Reflex::Dummy::MemberTemplateCont() {
return Get< MemberTemplate_Cont_Type_t >();
}
Reflex::Any & Reflex::Dummy::Any() {
static Reflex::Any i;
if ( i ) i.Clear();
return i;
}
const Reflex::Object & Reflex::Dummy::Object() {
return Get< Reflex::Object >();
}
const Reflex::Type & Reflex::Dummy::Type() {
return Get< Reflex::Type >();
}
const Reflex::TypeTemplate & Reflex::Dummy::TypeTemplate() {
return Get< Reflex::TypeTemplate >();
}
const Reflex::Base & Reflex::Dummy::Base() {
return Get< Reflex::Base >();
}
const Reflex::PropertyList & Reflex::Dummy::PropertyList() {
return Get< Reflex::PropertyList >();
}
const Reflex::Member & Reflex::Dummy::Member() {
return Get< Reflex::Member >();
}
const Reflex::MemberTemplate & Reflex::Dummy::MemberTemplate() {
return Get< Reflex::MemberTemplate >();
}
const Reflex::Scope & Reflex::Dummy::Scope() {
return Get< Reflex::Scope >();
}
const std::string & Reflex::Argv0() {
static std::string str = "REFLEX";
return str;
}
namespace {
Reflex::Instance initialise;
}