-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathBaseType.cpp
More file actions
67 lines (53 loc) · 1.46 KB
/
BaseType.cpp
File metadata and controls
67 lines (53 loc) · 1.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
/*
=============================================================================
File: BaseType.cpp
Desc: Common base class.
=============================================================================
*/
#include <Base/Base_PCH.h>
#pragma hdrstop
#include <Base/Base.h>
#include <Base/Object/BaseType.h>
/*================================
CStruct
================================*/
/*static*/
mxClass CStruct::ms_staticTypeInfo(
mxEXTRACT_NAME(CStruct), mxNULL_TYPE_ID,
nil,
SClassDescription(),
mxClassLayout::dummy
);
/*================================
AObject
================================*/
/*static*/
mxClass AObject::ms_staticTypeInfo(
mxEXTRACT_NAME(AObject), mxNULL_TYPE_ID+1,
&CStruct::MetaClass(),
SClassDescription(),
mxClassLayout::dummy
);
AObject::~AObject()
{
}
namespace ObjectUtil
{
AObject* Create_Object_Instance( const mxClass& classInfo )
{
chkRET_NIL_IF_NOT( classInfo.IsConcrete() );
AObject* pNewInstance = classInfo.CreateInstance();
mxASSERT_PTR( pNewInstance );
return pNewInstance;
}
AObject* Create_Object_Instance( TypeIDArg classGuid )
{
const mxClass* pClass = TypeRegistry::Get().FindClassByGuid( classGuid );
chkRET_NIL_IF_NIL(pClass);
AObject* pNewInstance = Create_Object_Instance( *pClass );
return pNewInstance;
}
}//namespace ObjectUtil
//--------------------------------------------------------------//
// End Of File. //
//--------------------------------------------------------------//