FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
daScript/include/daScript/ast/ast_typefactory.h at master · moneytech/daScript · GitHub
moneytech
/
daScript
Public
forked from
GaijinEntertainment/daScript
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
daScript
/
include
/
daScript
/
ast
/
ast_typefactory.h
Copy path
More file actions
More file actions
Latest commit
History
History
History
44 lines (40 loc) · 1.08 KB
Breadcrumbs
daScript
/
include
/
daScript
/
ast
/
ast_typefactory.h
Copy path
File metadata and controls
44 lines (40 loc) · 1.08 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
#
pragma
once
namespace
das
{
template
<
typename
TT
>
struct
TTemporary
{};
}
#
define
MAKE_TYPE_FACTORY
(
TYPE,CTYPE
) \
namespace
das
{ \
template
<> \
struct
typeFactory
<
CTYPE
> { \
static
TypeDeclPtr
make
(
const
ModuleLibrary & library ) { \
return
makeHandleType
(library,#
TYPE
); \
} \
}; \
template
<> \
struct
typeName
<
CTYPE
> { \
static
string
name
() {
return
#
TYPE
; } \
}; \
};
#
define
MAKE_EXTERNAL_TYPE_FACTORY
(
TYPE,CTYPE
) \
namespace
das
{ \
class
ModuleLibrary
; \
struct
TypeDecl
; \
typedef
smart_ptr<TypeDecl> TypeDeclPtr; \
template
<
typename
TT
>
struct
typeFactory
; \
template
<> \
struct
typeFactory
<
CTYPE
> { \
static
TypeDeclPtr
make
(
const
ModuleLibrary & library ); \
}; \
template
<
typename
TT
>
struct
typeName
; \
template
<> \
struct
typeName
<
CTYPE
> { \
static
string
name
() {
return
#
TYPE
; } \
}; \
};
#
define
IMPLEMENT_EXTERNAL_TYPE_FACTORY
(
TYPE,CTYPE
) \
namespace
das
{ \
TypeDeclPtr typeFactory<
CTYPE
>::make(
const
ModuleLibrary & library ) { \
return
makeHandleType
(library,#
TYPE
); \
} \
};
Back
|
FazBrowse Home
|
New Git URL