コード例 #1
0
MStatus sgBDataCmd_key::startExport( MString pathFolder )
{
	MStatus status;

	m_filePaths.clear();
	for( unsigned int i=0; i< m_pathArrExport.length(); i++ )
	{
		MFnDagNode fnNode( m_pathArrExport[i], &status );
		if( !status ) continue;
		MString targetName = fnNode.partialPathName();
		targetName.substitute( ":", "_" );
		targetName.substitute( "|", "_" );
		m_filePaths.append( pathFolder + "\\" + targetName + ".sgKeyData" );
	}

	m_objectKeyDatasExport.setLength( m_pathArrExport.length() );

	for( unsigned int i=0; i< m_pathArrExport.length(); i++ )
	{
		setObjectKeyDataDefault( m_objectKeyDatasExport[i], m_pathArrExport[i], m_exportByMatrix );

		unsigned int unit = MTime().unit();
		MString  nameTarget = MFnDagNode( m_pathArrExport[i] ).fullPathName();

		std::ofstream outFile( m_filePaths[i].asChar(), ios::binary );

		writeString( nameTarget, outFile );
		writeUnsignedInt( unit, outFile );
		writeStringArray( m_objectKeyDatasExport[i].namesAttribute, outFile );

		outFile.close();
	}
	return MS::kSuccess;
}
コード例 #2
0
ファイル: columnFamily.c プロジェクト: yuandaxing/c-cassandra
int serializeCF(columnFamily *cf, buffer *buff)
{
	if(!cf || !buff) return -1;

	enum cfType type;

	if(getCFType(cf, &type) < 0) return -1;

	if(writeUnsignedInt(cf->markedForDelete, buff) < 0 ||
			writeUnsignedInt(cf->localDelete, buff) < 0)
		return -1;
	if(type == standard){
		return serializeColumnSet((columnSet *)cf->columnorSuper, buff);
	}else{
		return -1;
	}
}
コード例 #3
0
 cGenericBuffer& operator<< (unsigned int Data)    {writeUnsignedInt(Data); return *this;}