Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7240 in orxonox.OLD for branches


Ignore:
Timestamp:
Mar 22, 2006, 12:52:16 PM (19 years ago)
Author:
bensch
Message:

resources: lib

Location:
branches/resources
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • branches/resources/configure.ac

    r7223 r7240  
    630630                 src/lib/Makefile
    631631                 src/lib/math/Makefile
     632                 src/lib/util/Makefile
    632633                 src/lib/graphics/Makefile
    633634                 src/lib/graphics/importer/Makefile
  • branches/resources/src/lib/BuildLibs.am

    r7238 r7240  
    1717                $(LIB_PREFIX)/parser/ini_parser/libIniParser.a \
    1818                $(LIB_PREFIX)/shell/libORXshell.a \
    19                 $(LIB_PREFIX)/libORXlibs.a \
     19                $(LIB_PREFIX)/util/libORXlibutil.a \
    2020                $(LIB_PREFIX)/math/libORXmath.a
  • branches/resources/src/lib/Makefile.am

    r7237 r7240  
    1010                coord/p_node.cc \
    1111                \
    12                 util/substring.cc \
    13                 util/color.cc \
    14                 util/helper_functions.cc \
    15                 util/multi_type.cc \
    16                 util/executor/executor.cc \
    17                 \
    18                 util/loading/resource.cc \
    19                 util/loading/resource_manager.cc \
    20                 util/loading/game_loader.cc \
    21                 util/loading/load_param.cc \
    22                 util/loading/load_param_description.cc \
    23                 util/loading/factory.cc \
    24                 util/loading/dynamic_loader.cc \
    25                 \
    2612                data/data_tank.cc
    2713
     
    3218                coord/p_node.h \
    3319                \
    34                 util/substring.h \
    35                 util/multi_type.h \
    36                 util/color.h \
    37                 util/helper_functions.h \
    38                 util/executor/executor.h \
    39                 util/executor/executor_specials.h \
    40                 util/executor/functor_list.h \
    41                 \
    42                 util/loading/resource.h \
    43                 util/loading/resource_manager.h \
    44                 util/loading/game_loader.h \
    45                 util/loading/load_param.h \
    46                 util/loading/load_param_description.h \
    47                 util/loading/factory.h \
    48                 util/loading/dynamic_loader.h \
    49                 \
    50                 util/count_pointer.h \
    51                 util/list.h \
    52                 \
    5320                \
    5421                data/data_tank.h
     
    5724        . \
    5825        math \
     26        util \
    5927        graphics \
    6028        sound \
  • branches/resources/src/lib/util/loading/resource.cc

    r7238 r7240  
    22   orxonox - the future of 3D-vertical-scrollers
    33
    4    Copyright (C) 2004 orx
     4   Copyright (C) 2006 orx
    55
    66   This program is free software; you can redistribute it and/or modify
     
    2121namespace Loading
    2222{
     23  /**
     24   * @brief Initializes a shared Resource
     25   */
    2326  Resource::SharedResource::SharedResource()
    2427  {
     
    3033
    3134  /**
    32    * standard constructor
     35   * @brief standard constructor
    3336  */
    3437  Resource::Resource (const std::string& fileName, ResourcePriority prio)
     
    4043
    4144  /**
    42    * standard deconstructor
     45   * @brief standard deconstructor
    4346   */
    44   //   Resource::~Resource ()
    45   //   {
    46   //   }
     47  Resource::~Resource ()
     48  {}
    4749
    4850
     
    5052                      const MultiType& param0, const MultiType& param1, const MultiType& param2)
    5153  {}
     54
     55
    5256  bool Resource::cache(std::string& fileName, ResourcePriority prio,
    5357                       const MultiType& param0, const MultiType& param1,  const MultiType& param2)
     
    5559
    5660
    57   // reloads the resource.
    58 //  bool Resource::reload()
    59 //  {}
    60   // unloads the sharedResource (from this Resource)
     61  /**
     62   * @brief reloads the resource.
     63   */
     64  bool Resource::reload()
     65  {}
     66
    6167  bool Resource::unload()
    6268  {}
     
    7177  {}
    7278
    73 //   const SharedResource* findResource(std::string& fileName,
    74 //                                      const MultiType& param0, const MultiType& param1, const MultiType& param2)
    75 //   {
    76 //   }
     79
     80  bool Resource::reloadResourcesByType(ClassID ResourceType)
     81  {}
     82
     83  bool Resource::reloadAllResources()
     84  {}
     85
     86  bool Resource::unloadResourcesByType(ResourcePriority prio)
     87  {}
    7788
    7889
     90  bool Resource::unloadAllResources()
     91  {}
     92
     93  void Resource::debug()
     94  {}
     95
     96
     97
     98
     99  const Resource::SharedResource* Resource::findResource(std::string& fileName,
     100      const MultiType& param0, const MultiType& param1, const MultiType& param2)
     101  {}
     102
    79103}
  • branches/resources/src/lib/util/loading/resource.h

    r7237 r7240  
    5353    public:
    5454      SharedResource();
     55      bool reload();
    5556      std::string       fileName;
    5657
     
    6566  public:
    6667    Resource(const std::string& fileName = "", ResourcePriority prio = RP_LEVEL);
    67     virtual ~Resource() {};
     68    virtual ~Resource();
    6869
    6970    // looks if the resource was already loaded and (if not) loads it.
     
    7374                      const MultiType& param1 = MT_NULL,
    7475                      const MultiType& param2 = MT_NULL);
     76
    7577    virtual bool cache(std::string& fileName = "",
    7678                       ResourcePriority prio = RP_LEVEL,
     
    8183
    8284    // reloads the resource.
    83     virtual bool reload() { };
     85    virtual bool reload();
    8486    // unloads the sharedResource (from this Resource)
    8587    virtual bool unload();
    8688
    8789    // checks if a resource was already loaded.
    88     bool isLoaded(std::string& fileName,
    89                   const MultiType& param0 = MT_NULL,
    90                   const MultiType& param1 = MT_NULL,
    91                   const MultiType& param2 = MT_NULL);
     90    static bool isLoaded(std::string& fileName,
     91                         const MultiType& param0 = MT_NULL,
     92                         const MultiType& param1 = MT_NULL,
     93                         const MultiType& param2 = MT_NULL);
    9294
    9395    // raises the priority can only be raised
     
    9597
    9698    /** @returns the referenceCount of the shared resource behind this resource or 0 if no internal Resource is stored */
    97   unsigned int referenceCount() const { return (this->resource)? this->resource->referenceCount : 0; };
     99    unsigned int referenceCount() const { return (this->resource)? this->resource->referenceCount : 0; };
    98100
     101    static bool reloadResourcesByType(ClassID ResourceType);
     102    static bool reloadAllResources();
     103
     104    static bool unloadResourcesByType(ResourcePriority prio);
     105    static bool unloadAllResources();
     106
     107    static void debug();
    99108  protected:
    100109    const SharedResource* findResource(std::string& fileName,
Note: See TracChangeset for help on using the changeset viewer.