33 inline dgInt32 operator = (dgInt32 val);
36 dgUnsigned8 m_userFlag0;
37 dgUnsigned8 m_userFlag1;
38 dgUnsigned8 m_userFlag2;
51 dgRef(
const char *name);
52 dgRef(dgUnsigned32 idArg);
56 dgInt32 GetRefCount()
const;
58 DG_CLASS_ALLOCATOR(allocator)
60 virtual dgRef *CreateClone()
const;
62 bool GetUserFlag0()
const;
63 bool GetUserFlag1()
const;
64 void SetUserFlag0(
bool flags);
65 void SetUserFlag1(
bool flags);
69 virtual void Unkill();
71 const char *GetName()
const;
72 dgUnsigned32 GetNameID()
const;
73 inline void SetNameID(dgUnsigned32 newID);
74 virtual inline void SetName(
const char *name);
78 static dgUnsigned32 GetRttiType();
89 inline dgRefFlags::dgRefFlags() {
95 inline dgInt32 dgRefFlags::operator = (dgInt32 val) {
97 ptr = &(*(dgInt32 *)
this);
104 inline dgRef::dgRef() {
108 inline dgRef::dgRef(
const char *name) {
112 inline dgRef::dgRef(dgUnsigned32 idArg) {
116 inline dgRef::dgRef(
const dgRef &Clone) {
120 inline dgRef::~dgRef() {
123 inline dgRef *dgRef::AddRef() {
125 NEWTON_ASSERT(m_ref < ((1 << 24) - 1));
129 inline dgInt32 dgRef::Release() {
132 return dgInt32(m_ref);
138 inline dgRef *dgRef::CreateClone()
const {
144 inline bool dgRef::GetUserFlag0()
const {
145 return m_userFlag0 ? true :
false;
148 inline bool dgRef::GetUserFlag1()
const {
149 return m_userFlag1 ? true :
false;
153 inline void dgRef::SetUserFlag0(
bool flags) {
154 m_userFlag0 = dgUnsigned8(flags);
157 inline void dgRef::SetUserFlag1(
bool flags) {
158 m_userFlag1 = dgUnsigned8(flags);
162 inline bool dgRef::IsAlive()
const {
163 return m_alive ? true :
false;
166 inline void dgRef::Kill() {
170 inline void dgRef::Unkill() {
174 inline void dgRef::SetNameID(dgUnsigned32 newID) {
178 inline dgUnsigned32 dgRef::GetNameID()
const {
182 inline void dgRef::SetName(
const char *name) {
185 SetNameID(dgCRC(name));
189 inline const char *dgRef::GetName()
const {
190 return dgInverseCRC(GetNameID());
193 inline dgInt32 dgRef::GetRefCount()
const {
194 return dgInt32(m_ref);