improved Object referring
This commit is contained in:
parent
7c08fbc530
commit
680b7717fc
@ -10,4 +10,6 @@ namespace hgl
|
|||||||
};
|
};
|
||||||
|
|
||||||
#define HGL_SOURCE_CODE_LOCATION __FILE__,__FUNCTION__,__LINE__
|
#define HGL_SOURCE_CODE_LOCATION __FILE__,__FUNCTION__,__LINE__
|
||||||
|
|
||||||
|
#define HGL_SCL_HERE SourceCodeLocation(HGL_SOURCE_CODE_LOCATION)
|
||||||
}//namespace hgl
|
}//namespace hgl
|
||||||
|
@ -2,17 +2,29 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include<hgl/type/object/ObjectBaseInfo.h>
|
#include<hgl/type/object/ObjectBaseInfo.h>
|
||||||
#include<hgl/type/SortedSet.h>
|
#include<hgl/type/List.h>
|
||||||
#include<tsl/robin_set.h>
|
//#include<tsl/robin_map.h>
|
||||||
|
|
||||||
namespace hgl
|
namespace hgl
|
||||||
{
|
{
|
||||||
|
struct ObjectReferringRecord
|
||||||
|
{
|
||||||
|
ObjectSimpleInfo osi;
|
||||||
|
|
||||||
|
size_t refer_serial; ///<引用序号
|
||||||
|
|
||||||
|
SourceCodeLocation scl;
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 对象引用关系
|
* 对象引用关系
|
||||||
*/
|
*/
|
||||||
struct ObjectRelation
|
struct ObjectRelation
|
||||||
{
|
{
|
||||||
tsl::robin_set<ObjectSimpleInfo> follow_me; ///<引用自己的对象
|
List<ObjectReferringRecord> referring_me; ///<引用自己的对象
|
||||||
tsl::robin_set<ObjectSimpleInfo> me_follow; ///<自己引用的对象
|
List<ObjectReferringRecord> me_referring; ///<自己引用的对象
|
||||||
|
|
||||||
|
//tsl::robin_map< size_t, /*refer_serial*/
|
||||||
|
// ObjectReferringRecord *> referring_me_map; ///<引用自己的对象
|
||||||
};//struct ObjectRelation
|
};//struct ObjectRelation
|
||||||
}//namespace hgl
|
}//namespace hgl
|
||||||
|
Loading…
x
Reference in New Issue
Block a user