Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Sep 24, 2006, 12:12:14 PM (18 years ago)
Author:
bensch
Message:

namespaces

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/new_class_id/src/lib/util/loading/new_resource_manager.h

    r9799 r9800  
    1010#include "filesys/directory.h"
    1111
    12 class NewResourceManager : public BaseObject
     12namespace Resources
    1313{
    14   ObjectListDeclaration(NewResourceManager);
    15 public:
    16   /** @returns a Pointer to the only object of this Class */
    17   inline static NewResourceManager* getInstance() { if (!_singletonRef) _singletonRef = new NewResourceManager();  return _singletonRef; };
     14
     15  class NewResourceManager : public BaseObject
     16  {
     17    ObjectListDeclaration(NewResourceManager);
     18  public:
     19    /** @returns a Pointer to the only object of this Class */
     20    inline static NewResourceManager* getInstance() { if (!_singletonRef) _singletonRef = new NewResourceManager();  return _singletonRef; };
    1821  inline static void deleteInstance() { if (_singletonRef) delete _singletonRef; };
    1922
    2023
    21   void setMainGlobalPath(const Directory& directory);
    22   void addGlobalPath(const Directory& directory);
     24    void setMainGlobalPath(const Directory& directory);
     25    void addGlobalPath(const Directory& directory);
    2326
    24   bool addResourcePath(const std::string& resourceName, const std::string& pathName);
    25   bool addResourceSubPath(const std::string& resourceName, const std::string& pathName);
    26   void registerType(Resources::Type* type);
    27   void unregisterType(Resources::Type* type);
     27    bool addResourcePath(const std::string& resourceName, const std::string& pathName);
     28    bool addResourceSubPath(const std::string& resourceName, const std::string& pathName);
     29    void registerType(Resources::Type* type);
     30    void unregisterType(Resources::Type* type);
    2831
    29   unsigned int addKeepLevelName(const std::string& keepLevelName);
    30   unsigned int getKeepLevelID(const std::string& keepLevelName) const;
    31   const std::string& getKeepLevelName(unsigned int keepLevelID) const;
     32    unsigned int addKeepLevelName(const std::string& keepLevelName);
     33    unsigned int getKeepLevelID(const std::string& keepLevelName) const;
     34    const std::string& getKeepLevelName(unsigned int keepLevelID) const;
    3235
    3336  const std::vector<Resources::Type*> resourceTypes() const { return _resourceTypes; };
    34   const Directory& mainGlobalPath() const { return _mainGlobalPath; };
    35   /** @returns all global paths without mainGlobalPath */
    36   const std::vector<Directory>& globalPaths() const { return _globalPaths; };
     37    const Directory& mainGlobalPath() const { return _mainGlobalPath; };
     38    /** @returns all global paths without mainGlobalPath */
     39    const std::vector<Directory>& globalPaths() const { return _globalPaths; };
    3740
    3841
    39   bool checkFileInMainPath(const File& fileInside);
     42    bool checkFileInMainPath(const File& fileInside);
    4043
    41   bool unloadAllByPriority();
     44    bool unloadAllByKeepLevel(const Resources::KeepLevel& keepLevel);
    4245
    43   void debug() const;
     46    void debug() const;
    4447
    45   // utility functions for handling files in and around the data-directory
    46   static std::string getFullName(const std::string& fileName);
    47   static bool isInDataDir(const std::string& fileName);
    48 private:
    49   NewResourceManager();
    50   virtual ~NewResourceManager();
     48    // utility functions for handling files in and around the data-directory
     49    static std::string getFullName(const std::string& fileName);
     50    static bool isInDataDir(const std::string& fileName);
     51  private:
     52    NewResourceManager();
     53    virtual ~NewResourceManager();
    5154
    52 private:
    53   static NewResourceManager*         _singletonRef;       //!< singleton Reference
     55  private:
     56    static NewResourceManager*         _singletonRef;       //!< singleton Reference
    5457
    55   std::vector<Resources::Type*>      _resourceTypes;
    56   //! GLOBALS
    57   Directory                          _mainGlobalPath;
    58   std::vector<Directory>             _globalPaths;
     58    std::vector<Resources::Type*>      _resourceTypes;
     59    //! GLOBALS
     60    Directory                          _mainGlobalPath;
     61    std::vector<Directory>             _globalPaths;
    5962
    60   std::vector<std::string>           _keepLevelNames;
    61 };
     63    std::vector<std::string>           _keepLevelNames;
     64  };
     65
     66}
    6267
    6368#endif /* _RESOURCE_MANAGER_H */
Note: See TracChangeset for help on using the changeset viewer.