예제 #1
0
파일: util.cpp 프로젝트: SiteView/eccmeteor
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;
}
예제 #2
0
파일: util.cpp 프로젝트: SiteView/eccmeteor
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());

}
예제 #3
0
파일: util.cpp 프로젝트: SiteView/eccmeteor
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;

}
예제 #4
0
bool CNNM2ECC::DeleteEccEntity(word id)
{
	return DeleteEntity(id.getword());
}