X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Fyoink;a=blobdiff_plain;f=src%2FMoof%2FResource.hh;fp=src%2FMoof%2FResource.hh;h=0000000000000000000000000000000000000000;hp=db6fe138e37f748d1d6747f667f8b93876c871dd;hb=831f04d4bc19a390415ac0bbac4331c7a65509bc;hpb=299af4f2047e767e5d79501c26444473bda64c64 diff --git a/src/Moof/Resource.hh b/src/Moof/Resource.hh deleted file mode 100644 index db6fe13..0000000 --- a/src/Moof/Resource.hh +++ /dev/null @@ -1,76 +0,0 @@ - -/*] Copyright (c) 2009-2010, Charles McGarvey [************************** -**] All rights reserved. -* -* vi:ts=4 sw=4 tw=75 -* -* Distributable under the terms and conditions of the 2-clause BSD license; -* see the file COPYING for a complete text of the license. -* -**************************************************************************/ - -#ifndef _MOOF_RESOURCE_HH_ -#define _MOOF_RESOURCE_HH_ - -/** - * @file Resource.hh - * Interface for textures, sounds, and other types of resources. - */ - -#include -#include -#include - - -namespace Mf { - - -/** - * Generic resource class. - */ - -class Resource -{ -public: - - virtual ~Resource() {} - - - /** - * Add a directory to search when looking for resource files. - * @param directory Path to a directory. - */ - - static void addSearchPaths(const std::string& paths); - static void addSearchPaths(const std::vector& pathList); - - /** - * Get the path to a resource of a given name. - * @param name Name of a resource. The name will be appended to each - * search directory in order. - * @return The first path found which resolves to a file. - */ - - static std::string getPath(const std::string& path, - const std::string& prefix = "", - const std::string& extension = ""); - - static bool getPath(std::string& path, - const std::string& prefix = "", - const std::string& extension = ""); - - static FILE* openFile(std::string& path, - std::string prefix = "", - const std::string& extension = "", - const std::string& mode = "rb"); - -private: - - static std::vector gSearchPaths; -}; - - -} // namespace Mf - -#endif // _MOOF_RESOURCE_HH_ -