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/resource.h

    r9799 r9800  
    3030  class StorePointer
    3131  {
    32     public:
    33       StorePointer(const std::string& loadString, const Resources::KeepLevel& keeplevel);
    34       const std::string& loadString() const { return _loadString; };
    35       const Resources::KeepLevel& keepLevel() const { return _keepLevel; };
     32  public:
     33    StorePointer(const std::string& loadString, const Resources::KeepLevel& keeplevel);
     34    const std::string& loadString() const { return _loadString; };
     35    const Resources::KeepLevel& keepLevel() const { return _keepLevel; };
    3636
    37     private:
    38       std::string                 _loadString;             //!< An identifier, to match when loading a File.
    39       Resources::KeepLevel        _keepLevel;              //!< The Priority of this resource. (can only be increased, so none else will delete this)
     37  private:
     38    std::string                 _loadString;             //!< An identifier, to match when loading a File.
     39    Resources::KeepLevel        _keepLevel;              //!< The Priority of this resource. (can only be increased, so none else will delete this)
    4040  };
    4141
     
    7373    std::vector<Resources::StorePointer*> _storedResources;
    7474  };
     75
     76
     77  //! A NewResource is an Object, that can be loaded from Disk
     78  /**
     79   *
     80   */
     81  class NewResource : virtual public BaseObject
     82  {
     83    ObjectListDeclaration(NewResource);
     84
     85  public:
     86    NewResource(Resources::Type* type);
     87    virtual ~NewResource();
     88
     89    virtual bool reload() { return false; };
     90    virtual bool unload() { return false; };
     91
     92    std::string locateFile(const std::string& fileName) const;
     93
     94
     95  public:
     96  protected:
     97    Resources::StorePointer* acquireResource(const std::string& loadString);
     98    void addResource(Resources::StorePointer* pointer);
     99
     100  private:
     101    std::string locateFileInSubDir(const Directory& directory, const std::string& fileName) const;
     102
     103  private:
     104    Resources::StorePointer*       _pointer;                         //!< Virtual Pointer to the ResourceData.
     105    Resources::Type*               _type;                            //!< Type of the NewResource.
     106  };
    75107}
    76108
    77 //! A NewResource is an Object, that can be loaded from Disk
    78 /**
    79  *
    80  */
    81 class NewResource : virtual public BaseObject
    82 {
    83   ObjectListDeclaration(NewResource);
    84 
    85 public:
    86   NewResource(Resources::Type* type);
    87   virtual ~NewResource();
    88 
    89   virtual bool reload() { return false; };
    90   virtual bool unload() { return false; };
    91 
    92   std::string locateFile(const std::string& fileName) const;
    93 
    94 
    95 public:
    96 protected:
    97   Resources::StorePointer* acquireResource(const std::string& loadString);
    98   void addResource(Resources::StorePointer* pointer);
    99 
    100 private:
    101   std::string locateFileInSubDir(const Directory& directory, const std::string& fileName) const;
    102 
    103 private:
    104   Resources::StorePointer*       _pointer;                         //!< Virtual Pointer to the ResourceData.
    105   Resources::Type*               _type;                            //!< Type of the NewResource.
    106 };
    107 
    108109#endif /* _RESOURCE_H */
Note: See TracChangeset for help on using the changeset viewer.