Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7237 in orxonox.OLD for branches/resources/src/lib/util/loading


Ignore:
Timestamp:
Mar 21, 2006, 10:07:48 PM (19 years ago)
Author:
bensch
Message:

orxonox/branches/resource: some strange errors while linking

Location:
branches/resources/src/lib/util/loading
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/resources/src/lib/util/loading/resource.cc

    r7229 r7237  
    3535   * standard deconstructor
    3636   */
    37   Resource::~Resource ()
    38   {
    39     // delete what has to be deleted here
    40   }
     37//   Resource::~Resource ()
     38//   {
     39//   }
    4140
    4241  Resource::SharedResource::SharedResource()
     
    4645    this->prio = RP_NO;
    4746  }
     47
     48
     49
    4850}
  • branches/resources/src/lib/util/loading/resource.h

    r7229 r7237  
    6565  public:
    6666    Resource(const std::string& fileName = "", ResourcePriority prio = RP_LEVEL);
    67     virtual ~Resource();
     67    virtual ~Resource() {};
    6868
    6969    // looks if the resource was already loaded and (if not) loads it.
     
    7373                      const MultiType& param1 = MT_NULL,
    7474                      const MultiType& param2 = MT_NULL);
     75    virtual bool cache(std::string& fileName = "",
     76                       ResourcePriority prio = RP_LEVEL,
     77                       const MultiType& param0 = MT_NULL,
     78                       const MultiType& param1 = MT_NULL,
     79                       const MultiType& param2 = MT_NULL);
     80
     81
    7582    // reloads the resource.
    7683    virtual bool reload() { };
     
    8693    // raises the priority can only be raised
    8794    void raisePriority(ResourcePriority prio);
     95
    8896    /** @returns the referenceCount of the shared resource behind this resource or 0 if no internal Resource is stored */
    8997  unsigned int referenceCount() const { return (this->resource)? this->resource->referenceCount : 0; };
     
    95103                                       const MultiType& param2 = MT_NULL);
    96104
     105  private:
     106    static SharedResource* locateResourceByPointer(const void* sharedResource);
     107
     108    static SharedResource* locateResourceByInfo(std::string& fileName,
     109        const MultiType& param0 = MT_NULL,
     110        const MultiType& param1 = MT_NULL,
     111        const MultiType& param2 = MT_NULL);
     112
    97113  protected:
    98     SharedResource*     resource;          //!< The internal Resource, this Resource is keeping (at the moment).
     114    SharedResource*         resource;          //!< The internal Resource, this Resource is keeping (at the moment).
    99115
    100     static std::map<ClassID, std::vector<SharedResource> > storedResources;
     116    /** A Map of all stored Resources. */
     117    static std::map<ClassID, std::vector<SharedResource> >    storedResources;
    101118  };
    102119
Note: See TracChangeset for help on using the changeset viewer.