Compare commits
2 Commits
2c6f87839c
...
f579718e0b
| Author | SHA1 | Date | |
|---|---|---|---|
| f579718e0b | |||
| 4ec87e0e2a |
@@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.0)
|
||||
cmake_policy(SET CMP0017 NEW) # need include() with .cmake
|
||||
project(pip)
|
||||
set(_PIP_MAJOR 1)
|
||||
set(_PIP_MINOR 18)
|
||||
set(_PIP_MINOR 19)
|
||||
set(_PIP_REVISION 0)
|
||||
set(_PIP_SUFFIX alpha)
|
||||
set(_PIP_COMPANY SHS)
|
||||
|
||||
@@ -197,6 +197,7 @@ public:
|
||||
const T at(const Key & key) const {return (*this)[key];}
|
||||
|
||||
PIMap<Key, T> & operator <<(const PIMap<Key, T> & other) {
|
||||
assert(&other != this);
|
||||
if (other.isEmpty()) return *this;
|
||||
if (other.size() == 1) {insert(other.pim_index[0].key, other.pim_content[0]); return *this;}
|
||||
if (other.size() == 2) {insert(other.pim_index[0].key, other.pim_content[0]); insert(other.pim_index[1].key, other.pim_content[1]); return *this;}
|
||||
|
||||
@@ -674,10 +674,10 @@ bool dumpApplicationToFile(const PIString & path) {
|
||||
|
||||
|
||||
|
||||
void PIObject::__MetaData::addScope(const PIString & s) {
|
||||
if (!scope_list.contains(s)) {
|
||||
void PIObject::__MetaData::addScope(const PIString & s, uint shash) {
|
||||
if (!scope_id.contains(shash)) {
|
||||
scope_list << s;
|
||||
scope_id << s.hash();
|
||||
scope_id << shash;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -195,12 +195,16 @@
|
||||
#endif
|
||||
#define __VVALUE(t, v) v.value< __PTYPE(t) >()
|
||||
|
||||
//printf("base_init %s id=%d (%d) pid=%d (%d) ...\n", #name, id, eh.eh_func.size(), pid, ehp.eh_func.size());
|
||||
//printf("base_init %s id=%d (%d) pid=%d (%d) ok\n", #name, id, eh.eh_func.size(), pid, ehp.eh_func.size());
|
||||
//printf("parent_init %s::%s id=%d (%d) pid=%d (%d) ...\n", __classNameS().dataAscii(), #name, id, eh.eh_func.size(), pid, ehp.eh_func.size());
|
||||
//printf("parent_init %s::%s id=%d (%d) pid=%d (%d) ok\n", __classNameS().dataAscii(), #name, id, eh.eh_func.size(), pid, ehp.eh_func.size());
|
||||
|
||||
#define PIOBJECT(name) \
|
||||
protected: \
|
||||
typedef name __PIObject__; \
|
||||
public: \
|
||||
static const PIString __classNameS() {return PIStringAscii(#name);} \
|
||||
static const PIString __classNameS() {static PIString ret = PIStringAscii(#name); return ret;} \
|
||||
static uint __classNameIDS() {static uint ret = PIStringAscii(#name).hash(); return ret;} \
|
||||
virtual const char * className() const {return #name;} \
|
||||
virtual uint classNameID() const {static uint ret = PIStringAscii(#name).hash(); return ret;} \
|
||||
@@ -220,7 +224,7 @@
|
||||
__MetaData & eh(__meta_data()[id]); \
|
||||
eh.eh_set << ehp.eh_set; \
|
||||
eh.eh_func << ehp.eh_func; \
|
||||
eh.addScope(__classNameS()); \
|
||||
eh.addScope(__classNameS(), id); \
|
||||
} \
|
||||
}; \
|
||||
__BaseInitializer__ __base_init__;
|
||||
@@ -239,8 +243,9 @@
|
||||
__MetaData & ehp(__meta_data()[pid]); \
|
||||
eh.eh_set << ehp.eh_set; \
|
||||
eh.eh_func << ehp.eh_func; \
|
||||
eh.scope_id = ehp.scope_id; \
|
||||
eh.scope_list = ehp.scope_list; \
|
||||
eh.addScope(__classNameS()); \
|
||||
eh.addScope(PIStringAscii(#name), pid); \
|
||||
} \
|
||||
}; \
|
||||
__ParentInitializer__ __parent_init__; \
|
||||
@@ -836,8 +841,8 @@ public:
|
||||
PIStringList names;
|
||||
};
|
||||
struct __MetaData {
|
||||
__MetaData() {scope_list << PIStringAscii("PIObject");}
|
||||
void addScope(const PIString & s);
|
||||
__MetaData() {scope_list << PIStringAscii("PIObject"); scope_id << PIStringAscii("PIObject").hash();}
|
||||
void addScope(const PIString & s, uint shash);
|
||||
PIStringList scope_list;
|
||||
PISet<uint> scope_id;
|
||||
PISet<const void * > eh_set;
|
||||
|
||||
Reference in New Issue
Block a user