Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Sep 27, 2006, 11:13:17 PM (18 years ago)
Author:
bensch
Message:

some more functionality for the unloading of resources

File:
1 edited

Legend:

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

    r9844 r9845  
    2929    KeepLevel(const std::string& keepLevelName);
    3030
     31    bool operator==(const KeepLevel& keepLevel) const { return this->_keepLevel == keepLevel._keepLevel; };
     32    bool operator!=(const KeepLevel& keepLevel) const { return this->_keepLevel != keepLevel._keepLevel; };
     33    bool operator<=(const KeepLevel& keepLevel) const { return this->_keepLevel <= keepLevel._keepLevel; };
     34    bool operator<(const KeepLevel& keepLevel) const { return this->_keepLevel < keepLevel._keepLevel; };
     35
    3136    /** @returns the KeepLevel */
    3237    unsigned int keepLevel() const { return _keepLevel; };
     
    4146  public:
    4247    StorePointer(const std::string& loadString, const Resources::KeepLevel& keeplevel);
     48    //! Virtual Destructor, that removes the Stored information-pointer.
     49    virtual ~StorePointer() {};
     50
    4351    /** @returns the LoadString this resource was loaded with */
    4452    const std::string& loadString() const { return _loadString; };
     
    7381    const std::string& storedClassName() const { return _typeName; };
    7482    /** @returns the ID of the Type != ClassID */
    75     int id() const { return _id; };
    7683    /** @returns the type-specific paths this Resource searches in. */
    7784    const std::vector<Directory>& resourcePaths() const { return _resourcePaths; };
     
    8390    virtual void createFromString(const std::string& loadString) = 0;
    8491
    85     void setID(int id);
     92    void unloadAllBelowKeepLevel(const Resources::KeepLevel& keepLevel);
     93
    8694    void addResource(Resources::StorePointer* resource);
    8795
     
    94102    Type(const Type& type) {};
    95103  private:
    96     int                                   _id;                //!< ID of the Type in over all of the Types.
    97104    const std::string                     _typeName;          //!< Name of the Type. (Name of the Resource this loads.)
    98105    std::vector<Directory>                _resourcePaths;     //!< The Paths to search for files in this type
Note: See TracChangeset for help on using the changeset viewer.