word MakeIDByIndex(word pid,int index) { char buf[512]={0}; string str=pid.getword(); if(str.empty()) sprintf(buf,"%d",index); else sprintf(buf,"%s.%d",pid.getword(),index); return buf; }
int GetIndexByID(word id) { string str=id.getword(); if(str.empty()) return -1; int pos=0; if((pos=str.rfind(IDSEPARATOR))<0) return atoi(id.getword()); string sub=str.substr(pos+1); return atoi(sub.c_str()); }
word GetParentID(word id) { string str=id.getword(); if(str.empty()) return id; int pos=0; if((pos=str.rfind(IDSEPARATOR))<0) return id; string sub=str.substr(0,pos); return sub; }
bool CNNM2ECC::DeleteEccEntity(word id) { return DeleteEntity(id.getword()); }