//============================================================ // <T>销毁csv头部。</T> //============================================================ FCsvHeads::~FCsvHeads(){ FDictionary<FCsvHead*>::TIteratorC it = _pHeads->IteratorC(); while(it.Next()){ FCsvHead* pHead = it.Value(); MO_DELETE(pHead); } MO_DELETE(_pHeads); }
//============================================================ // <T>销毁尾部项。</T> //============================================================ FCsvFooters::~FCsvFooters(){ FDictionary<FCsvFooter*>::TIteratorC it = _pFooters->IteratorC(); while(it.Next()){ FCsvFooter* pFooter = it.Value(); MO_DELETE(pFooter); } MO_DELETE(_pFooters); }
//============================================================ FNetMessageMachine::~FNetMessageMachine(){ _pConnection->Disconnect(); MO_DELETE(_pConnection); // 删除所有处理器集合 if(!_pHanldess->IsEmpty()){ TVectorIteratorC<FNetMessageHandles*> iterator = _pHanldess->IteratorC(); while(iterator.Next()){ FNetMessageHandles* pHandles = *iterator; MO_DELETE(pHandles); } } MO_DELETE(_pHanldess); };
//============================================================ // <T>加载动态库。</T> // // @param hInstance 实例句柄 // @param reason 加载类型 // @param pReserved 保留字 // @return 类名 //============================================================ TInt32 main(TInt argumentsCount, TChar** pArguments){ #ifdef __TEST__2 // 调试参数 //TString sourceFileName = TC("D:/Resource/xiong/xiong.fbx"); //TString targetFileName = TC("D:/Microbject/MoTypeScript/Script/res/model/xiong/xiong.model"); //TString targetConfigName = TC("D:/Microbject/MoTypeScript/Script/res/model/xiong/xiong.xml"); TString sourceFileName = TC("D:/MoProject/Resource/demo/model/fd-pvw-展示/fd-sc.car.01-场景.汽车.01/md-001-汽车.奥迪/model.fbx"); TString targetFileName = TC("D:/MoProject/Asset/demo/model/pvw.sc.car.01.001.model"); #else // 获取参数 if(argumentsCount != 3){ return -1; } TString sourceFileName = pArguments[1]; TString targetFileName = pArguments[2]; #endif // __TEST__ // 设置语言 setlocale(LC_ALL, "chs"); // 初始化处理 MoInitialize(); MO_STATIC_DEBUG(TC("Source file: [%s]"), (TCharC*)sourceFileName); MO_STATIC_DEBUG(TC("Target file: [%s]"), (TCharC*)targetFileName); // 打开场景 FModelScene* pScene = RModelManager::SafeInstance().OpenScene(sourceFileName); // 存储资源 FFbxResModel* pModel = MO_CREATE(FFbxResModel); pScene->Store(pModel); pModel->SaveFile(targetFileName); // 释放处理 MO_DELETE(pScene); MoRelease(); // getchar(); return 0; }
//============================================================ TBool FNetMessageMachine::MessageUnregister(TInt code){ FNetMessageHandles* pHandles = _pHanldess->Get(code); if(NULL == pHandles){ return EFalse; } _pHanldess->Set(code, NULL); MO_DELETE(pHandles); return ETrue; }
//============================================================ // <T>析构消息统计机。</T> //============================================================ FNetMessageStatisticsMachine::~FNetMessageStatisticsMachine(){ TInt size = _statistics.Size(); for(TInt n = 0; n < size; n++){ FNetMessageStatistics* pStatistics = _statistics[n]; if(NULL != pStatistics){ MO_DELETE(pStatistics); } } };
//============================================================ // <T>存储数据文件。</T> // // @param pFileName 文件名称 // @return 处理结果 //============================================================ TResult FFbxResModel::SaveDataFile(TCharC* pFileName){ MO_ASSERT_POINTER(pFileName); FByteFile* pFile = MO_CREATE(FByteFile); pFile->EnsureSize(1024 * 1024); Serialize(pFile); pFile->SaveFile(pFileName); MO_DELETE(pFile); return ESuccess; }
//============================================================ // <T>存储配置文件。</T> // // @param pFileName 文件名称 // @return 处理结果 //============================================================ TResult FFbxResModel::SaveConfigFile(TCharC* pFileName){ MO_ASSERT_POINTER(pFileName); FXmlDocument* pDocument = MO_CREATE(FXmlDocument); FXmlNode* pRoot = pDocument->Root(); SaveConfig(pRoot); pDocument->SaveFile(pFileName); MO_DELETE(pDocument); return ESuccess; }
//============================================================ FNetMessageConsole::~FNetMessageConsole(){ // 删除所有链接 if(!_pConnections->IsEmpty()){ TListIteratorC<FNetMessageConnection*> iterator = _pConnections->IteratorC(); while(iterator.Next()){ FNetMessageConnection* pConnection = *iterator; MO_DELETE(pConnection); } } MO_DELETE(_pConnections); // 删除所有处理器集合 if(!_pHanldess->IsEmpty()){ TVectorIteratorC<FNetMessageHandles*> iterator = _pHanldess->IteratorC(); while(iterator.Next()){ FNetMessageHandles* pHandles = *iterator; MO_DELETE(pHandles); } } MO_DELETE(_pHanldess); };
//============================================================ // <T>析构FBX场景。</T> //============================================================ FFbxResModel::~FFbxResModel() { MO_DELETE(_pMeshs); }
//============================================================ // <T>析构资源3D模型。</T> //============================================================ FRs3dModel::~FRs3dModel(){ MO_DELETE(_pSkeleton); MO_DELETE(_pAnimation); }
//============================================================ // <T>析构监视器服务。</T> //============================================================ FMonitorService::~FMonitorService(){ MO_DELETE(_pMachine); }
//============================================================ // <T>析构实体3D几何体。</T> //============================================================ FModel3dGeometry::~FModel3dGeometry(){ MO_DELETE(_pBones); }
//============================================================ // <T>析构实体3D场景控制台。</T> //============================================================ FGameSceneConsole::~FGameSceneConsole(){ MO_DELETE(_pScenes); }
//============================================================ // <T>析构可绘制对象层。</T> //============================================================ FDisplayLayer::~FDisplayLayer(){ MO_DELETE(_pParticleController); }
//============================================================ // <T>析构资源控制台。</T> //============================================================ FAssetConsole::~FAssetConsole(){ MO_DELETE(_pSpaces); }
//============================================================ // <T>析构链接对象。</T> //============================================================ FNetBufferedQueueConnection::~FNetBufferedQueueConnection(){ MO_DELETE(_pInputQueue); MO_DELETE(_pOutputQueue); }
//============================================================ // <T>析构异步处理线程。</T> //============================================================ FProcessorThread::~FProcessorThread(){ MO_DELETE(_pLooper); }
//============================================================ // <T>析构渲染管道控制台。</T> //============================================================ FPipelineConsole::~FPipelineConsole(){ MO_DELETE(_pFactory); }
//============================================================ // <T>ÊÍ·ÅÏ̲߳¶×½Æ÷¡£</T> //============================================================ FThreadCatcher::~FThreadCatcher(){ MO_DELETE(_pCatchers); }
//============================================================ // <T>析构网络链接监听线程实例。</T> //============================================================ FNetEpollTransferServerThread::~FNetEpollTransferServerThread(){ MO_DELETE(_pServerSocket); MO_DELETE(_pCatcher); }
//============================================================ // <T>析构消息处理回调器集合。</T> //============================================================ FNetRouterHandles::~FNetRouterHandles(){ MO_DELETE(_pProcessors); };
//============================================================ // <T>析构模板环境。</T> //============================================================ FTemplateContext::~FTemplateContext(){ MO_DELETE(_pSource); }
//============================================================ // <T>析构字体。</T> //============================================================ FFontConsole::~FFontConsole(){ MO_DELETE(_pFonts); }
//============================================================ // <T>析构地图资源。</T> //============================================================ FGroundResource::~FGroundResource(){ MO_DELETE(_pOutputStream); }
//============================================================ // <T>析构实体3D模型。</T> //============================================================ FTemplate3d::~FTemplate3d(){ MO_DELETE(_pDynamicModel); MO_DELETE(_pAnimation); MO_DELETE(_pTemplateRenderables); }
//============================================================ // <T>析构渲染相机。</T> //============================================================ FRenderView::~FRenderView(){ MO_DELETE(_pRenderables); MO_DELETE(_pRenderTargets); }
//============================================================ // <T>析构渲染技术。</T> //============================================================ FTechnique::~FTechnique(){ MO_DELETE(_pEffects); MO_DELETE(_pProgram); }
//============================================================ // <T>析构渲染窗口控制台。</T> //============================================================ FRenderWindowConsole::~FRenderWindowConsole(){ MO_DELETE(_pWindows); }
//============================================================ MProperties32::~MProperties32(){ MO_DELETE(_pNames); MO_DELETE(_pValues); }