コード例 #1
0
/**
 * \brief Perform data storage operation after selection
 * \param[in] operation is OPEN, SAVE or CLOSE
 * \req RS_06_03 - Perform data storage operation after selection
 *
 * Perform data storage operation after selection.
 * This is a data storage related function.
 */
USAGEMODE int DoDatastorageOperation(short operation)
{
    int nReturn = 0;

    if (sdataStorageInfo.m_Datastore == FILEMODE)
    {
        if (operation & SAVE)
        {
            nReturn = SaveDataFile(sdataStorageInfo.FSInfo->m_FilePath);
        }
        else if (operation & OPEN)
        {
            nReturn = LoadDataFile(sdataStorageInfo.FSInfo->m_FilePath);
        }
        else if (operation & CLOSE)
        {
            CloseDataFile();

            if (sdataStorageInfo.FSInfo != NULL)
            {
                delete sdataStorageInfo.FSInfo;
                sdataStorageInfo.FSInfo = NULL;
            }
        }
    }

    return nReturn;
}
コード例 #2
0
ファイル: FFbxResModel.cpp プロジェクト: favedit/MoCross3d
//============================================================
// <T>存储文件。</T>
//
// @param pFileName 文件名称
// @return 处理结果
//============================================================
TResult FFbxResModel::SaveFile(TCharC* pFileName){
   // 存储数据文件
   TString dataFileName = pFileName;
   SaveDataFile(dataFileName);
   if(dataFileName.EndsWith(TC(".model"))){
      // 存储配置文件
      //TString configFileName = dataFileName.LeftStrC(dataFileName.Length() - 6);
      //configFileName.Append((TCharC*)TC(".xml"));
      //SaveConfigFile(configFileName);
   }
   return ESuccess;
}