Develop and Download Open Source Software

Browse Subversion Repository

Contents of /trunk/npl/sm.c

Parent Directory Parent Directory | Revision Log Revision Log


Revision 103 - (show annotations) (download) (as text)
Fri Oct 13 23:48:21 2017 UTC (6 years, 5 months ago) by tamiya25
File MIME type: text/x-csrc
File size: 500 byte(s)
typeを普通の構造体型へ
1 #include "npl.h"
2
3 int npl_sm_init(npl_sm_t *sm)
4 {
5 NPL_assert(sm);
6
7 return 0;
8 }
9
10 npl_sm_t* npl_sm_new(void)
11 {
12 npl_sm_t *sm;
13
14 sm = NPL_SM(npl_object_alloc(npl_sm_type));
15 if (sm == NULL)
16 return NULL;
17 if (npl_sm_init(sm)) {
18 npl_object_destroy(NPL_OBJECT(sm));
19 return NULL;
20 }
21
22 return sm;
23 }
24
25 // sm クラスの型情報
26 npl_type_t _npl_sm_type = {
27 .ctype = NPL_CT_OBJECT,
28 .name = L"sm",
29 .parent = &_npl_object_type,
30 .size = sizeof(npl_sm_t),
31 };
32
33 npl_type_t *npl_sm_type = &_npl_sm_type;
34

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26