Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Sep 22, 2006, 6:38:28 PM (18 years ago)
Author:
bensch
Message:

ResourceLoading is working perfectly.

File:
1 edited

Legend:

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

    r9785 r9786  
    3232
    3333protected:
     34  class Pointer
     35  {
     36  public:
     37    Pointer(const std::string& loadString, const Resource::KeepLevel& keeplevel);
     38    const std::string& loadString() const { return _loadString; };
     39    const Resource::KeepLevel& keepLevel() const { return _keepLevel; };
     40
     41  private:
     42    std::string              _loadString;             //!< An identifier, to match when loading a File.
     43    Resource::KeepLevel      _keepLevel;              //!< The Priority of this resource. (can only be increased, so none else will delete this)
     44  };
     45
     46
    3447  class Type
    3548  {
     
    4760    const std::vector<std::string>& resourcePaths() const { return _resourcePaths; };
    4861    const std::vector<std::string>& resourceSubPaths() const { return _resourceSubPaths; };
    49     const std::vector<Resource*>& storedResources() const { return _storedResources; };
     62    const std::vector<Resource::Pointer*>& storedResources() const { return _storedResources; };
    5063
    5164    void setID(int id);
    52     void addResource(Resource* resource);
     65    void addResource(Resource::Pointer* resource);
    5366
    5467  private:
    55     int                           _id;
    56     const ClassID&                _classID;
    57     std::vector<std::string>      _resourcePaths;
    58     std::vector<std::string>      _resourceSubPaths;
    59     std::vector<std::string>      _fileExtensions;
     68    int                             _id;
     69    const ClassID&                  _classID;
     70    std::vector<std::string>        _resourcePaths;
     71    std::vector<std::string>        _resourceSubPaths;
     72    std::vector<std::string>        _fileExtensions;
    6073
    61     std::vector<Resource*>        _storedResources;
    62   };
    63 
    64   class Pointer
    65   {
    66   public:
    67     Pointer(const std::string& loadString, const Resource::KeepLevel& keeplevel);
    68     const std::string& loadString() const { return _loadString; };
    69     const Resource::KeepLevel& keepLevel() const { return _keepLevel; };
    70 
    71   private:
    72     std::string              _loadString;             //!< An identifier, to match when loading a File.
    73     Resource::KeepLevel      _keepLevel;              //!< The Priority of this resource. (can only be increased, so none else will delete this)
     74    std::vector<Resource::Pointer*> _storedResources;
    7475  };
    7576
     
    8586
    8687
    87   public:
    88     static void setMainGlobalPath(const Directory& directory);
    89     static void addGlobalPath(const Directory& directory);
     88public:
     89  static void setMainGlobalPath(const Directory& directory);
     90  static void addGlobalPath(const Directory& directory);
    9091
    9192
     
    9596
    9697private:
    97   Resource::Pointer*       _pointer;                //!< Virtual Pointer to the ResourceData.
    98   Resource::Type*          _type;                   //!< Type of the Resource.
     98  Resource::Pointer*       _pointer;                         //!< Virtual Pointer to the ResourceData.
     99  Resource::Type*          _type;                            //!< Type of the Resource.
    99100
    100101
Note: See TracChangeset for help on using the changeset viewer.