Example #1
0
File: Space.cpp Project: GMIS/GMIS
void CSpace::CreateDefaultProerty(ePipeline& Pipe){
	Pipe.PushInt(0);
	Pipe.PushString(_T(""));
	ePipeline Empty;
	Pipe.PushPipe(Empty);
	//目前只有这些,其它后续再添加
}
Example #2
0
File: Space.cpp Project: GMIS/GMIS
int32 GetAllChildList(int64 ParentID, ePipeline& ChildList,int64 NotIncludeChildID /*=0*/){
    assert(ParentID >0);
	ChildList.Clear();

	char TableName[30];
	int64toa(ParentID,TableName);
	if(!GetWorldDB().tableExists(TableName)){
		return 0;
	}

	//ChildList.SetID(ParentID);

    CppSQLite3Buffer SQL;
	SQL.format("select %s,%s,%s,%s from \"%s\"",
		     ITEM_ID,
		     ITEM_NAME,
			 ITEM_TYPE,
			 ITEM_FINGERPRINT,
		     TableName
	);

	CppSQLite3Query Result = GetWorldDB().execQuery(SQL);
	
	while(!Result.eof()){
		int64      ChildID     = Result.getInt64Field(0);
		
		if (ChildID !=NotIncludeChildID)
		{
			AnsiString s    = Result.getStringField(1,"");
			
			tstring Name = UTF8toWS(s);
			Name = GetFileNoPathName(Name);
			Name = GetFileName(Name);
			
			int32      Type        = Result.getIntField(2);
			AnsiString FingerPrint = Result.getStringField(3,"");

			//ChildList.PushInt64(ChildID);
			ChildList.PushString(Name);
			ChildList.PushInt(Type);
			ChildList.PushString(FingerPrint);

		}
		Result.nextRow();
	}
	return ChildList.Size()/3;
}
Example #3
0
File: Space.cpp Project: GMIS/GMIS
void CSpace::CreateDefaultOwner(ePipeline& Pipe)
{
    tstring  Name = _T("Unkown");
	tstring  Cryptograhp = _T("");
	SPACE_RIGHT  Right = NO_RIGHT;
    tstring  Email = _T("Unkown");
    tstring  Memo = _T("Unkown");
   
    eBLOB* Validata = new eBLOB();   
	
    Pipe.PushString(Name);
    Pipe.PushInt(Right);
    Pipe.PushString(Cryptograhp);
    Pipe.PushString(Email);
    Pipe.PushString(Memo);  
    Pipe.Push_Directly(Validata);
};