| 속성 | 유형 | 값 |
|---|---|---|
| attr1 | int | 5 |
| attr2 | OMBoolean | true |
| attr3 | OMString | Shalom" |
코드를 생성할 때 이 값을 사용하면 스펙 파일 A.h에서 다음 명령문이 생성됩니다.
//-------------------------------------------------
// A.h
//-------------------------------------------------
class A {
//// User explicit entries ////
protected:
//## attribute attr3
static OMString attr3;
//## attribute attr1
static int attr1;
//## attribute attr2
static OMBoolean attr2;
...
};
구현 파일 A.cpp에서는 다음 초기화 코드가 생성됩니다.
#include "A.h"
//-------------------------------------------------
// A.cpp
//-------------------------------------------------
// Static class member attribute
OMString A::attr3 = "Shalom";
// Static class member attribute
int A::attr1 = 5;
// Static class member attribute
OMBoolean A::attr2 = true;
A::A() {
};