00001 // ///////////////////////////////////////////////////////////////////////////// 00002 // 00003 // Name: AssetProcessor.cpp 00004 // Author: Michael Bartsch (ZCCdark203) 00005 // 00006 // Desc : The AssetProcessor class is responsible for processing all 00007 // assets in a sub-directory of an AssetGroup. Behaviour for 00008 // specific assets is implemented by deriving from the 00009 // AssetProcessor class. 00010 // 00011 // License: Copyright (C) 2009 Michael Bartsch and Contributors 00012 // 00013 // This program is free software: you can redistribute it 00014 // and/or modify it under the terms of the zlib/libpng License. 00015 // See main.cpp for conditions of distribution and use. 00016 // 00017 // ///////////////////////////////////////////////////////////////////////////// 00018 00019 // Include files 00020 #include "AssetProcessor.h" 00021 00022 00023 // AssetProcessor class 00024 // AssetProcessor constructor. 00025 AssetProcessor::AssetProcessor(AssetGroup *parent, const std::string &baseName) 00026 : pParent(parent), mBaseName(baseName) 00027 { 00028 if(pParent != NULL) 00029 pParent->grab(); 00030 } 00031 00032 // AssetProcessor deconstructor. 00033 AssetProcessor::~AssetProcessor() 00034 { 00035 if(pParent != NULL) 00036 pParent->drop(); 00037 } 00038 00039 // Returns the base name. 00040 const std::string& AssetProcessor::getBaseName() const 00041 { 00042 return mBaseName; 00043 } 00044 00045 // Gets the parent of this processor. 00046 AssetGroup* AssetProcessor::getParent() const 00047 { 00048 return pParent; 00049 } 00050 00051 // The following methods are dummy methods, which are needed to prevent problems 00052 // with binding them to AngelScript. 00053 // Loads all assets with the give name. 00054 bool AssetProcessor::loadAsset(const std::string &fileName) 00055 { 00056 return false; 00057 } 00058 00059 // Loads all assets. 00060 void AssetProcessor::loadAssets() 00061 { 00062 } 00063 00064 // Reloads the asset with the given filename. 00065 bool AssetProcessor::reloadAsset(const std::string &fileName) 00066 { 00067 return false; 00068 } 00069 00070 // Reloads all assets. 00071 void AssetProcessor::reloadAssets() 00072 { 00073 } 00074 00075 // Removes the asset with the given filename. 00076 bool AssetProcessor::removeAsset(const std::string &fileName) 00077 { 00078 return false; 00079 } 00080 00081 // Removes all assets. 00082 void AssetProcessor::removeAssets() 00083 { 00084 } 00085 00086 // End of File