Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Sep 22, 2006, 10:20:14 PM (18 years ago)
Author:
bensch
Message:

nicer definition of the StorePointer

File:
1 edited

Legend:

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

    r9788 r9789  
    88
    99#include "base_object.h"
    10 #include "multi_type.h"
    1110#include <string>
    1211#include <vector>
     
    2625  {
    2726  public:
    28     void setKeepLevelName(unsigned int level, const std::string& name);
     27    KeepLevel(unsigned int keepLevel) { _keepLevel = keepLevel; };
     28    KeepLevel(const std::string& keepLevelName);
     29
     30    static void defineKeepLevelName(unsigned int level, const std::string& name);
    2931  private:
    30     std::vector<std::string>     _keepLevelName;
     32    unsigned int                        _keepLevel;
     33  private:
     34    static std::vector<std::string>     _keepLevelNames;
    3135  };
    3236
     37
    3338protected:
    34   class Pointer
     39  class StorePointer
    3540  {
    3641  public:
    37     Pointer(const std::string& loadString, const NewResource::KeepLevel& keeplevel);
     42    StorePointer(const std::string& loadString, const NewResource::KeepLevel& keeplevel);
    3843    const std::string& loadString() const { return _loadString; };
    3944    const NewResource::KeepLevel& keepLevel() const { return _keepLevel; };
    4045
    4146  private:
    42     std::string              _loadString;             //!< An identifier, to match when loading a File.
     47    std::string                 _loadString;             //!< An identifier, to match when loading a File.
    4348    NewResource::KeepLevel      _keepLevel;              //!< The Priority of this resource. (can only be increased, so none else will delete this)
    4449  };
     
    6065    const std::vector<std::string>& resourcePaths() const { return _resourcePaths; };
    6166    const std::vector<std::string>& resourceSubPaths() const { return _resourceSubPaths; };
    62     const std::vector<NewResource::Pointer*>& storedResources() const { return _storedResources; };
     67    const std::vector<NewResource::StorePointer*>& storedResources() const { return _storedResources; };
    6368
    6469    void setID(int id);
    65     void addResource(NewResource::Pointer* resource);
     70    void addResource(NewResource::StorePointer* resource);
    6671
    6772  private:
     
    7277    std::vector<std::string>        _fileExtensions;
    7378
    74     std::vector<NewResource::Pointer*> _storedResources;
     79    std::vector<NewResource::StorePointer*> _storedResources;
    7580  };
    7681
     
    9297
    9398protected:
    94   NewResource::Pointer* acquireResource(const std::string& loadString);
    95   void addResource(NewResource::Pointer* pointer);
     99  NewResource::StorePointer* acquireResource(const std::string& loadString);
     100  void addResource(NewResource::StorePointer* pointer);
    96101
    97102private:
    98   NewResource::Pointer*       _pointer;                         //!< Virtual Pointer to the ResourceData.
     103  NewResource::StorePointer*       _pointer;                         //!< Virtual Pointer to the ResourceData.
    99104  NewResource::Type*          _type;                            //!< Type of the NewResource.
    100105
Note: See TracChangeset for help on using the changeset viewer.