Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 25, 2009, 10:23:58 PM (15 years ago)
Author:
rgrieder
Message:

Merged presentation2 branch back to trunk.
Major new features:

  • Actual GUI with settings, etc.
  • Improved space ship steering (human interaction)
  • Rocket fire and more particle effects
  • Advanced sound framework
Location:
code/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/trunk

  • code/trunk/src/libraries/core/Resource.h

    r5929 r6417  
    3434#include <boost/shared_ptr.hpp>
    3535#include <OgreDataStream.h>
     36#include <OgreStringVector.h>
    3637
    3738namespace orxonox
     
    4041    using Ogre::DataStreamList;
    4142    using Ogre::DataStreamListPtr;
     43    using Ogre::StringVector;
     44    using Ogre::StringVectorPtr;
    4245
    4346    //! Stores basic information about a Resource from Ogre
     
    5659    };
    5760
    58     /**
    59     @brief
    60         Provides simple functions to easily access the Ogre::ResourceGroupManager
     61    /** Provides simple functions to easily access the Ogre::ResourceGroupManager.
     62        The wrapper functions also avoid having to deal with resource groups.
    6163    */
    6264    class _CoreExport Resource
     
    7274            Even if resource locations are added recursively, you
    7375            must provide a fully qualified name to this method.
    74         @param groupName
    75             The name of the resource group; this determines which
    76             locations are searched.
    77         @param searchGroupsIfNotFound
    78             If true, if the resource is not found in
    79             the group specified, other groups will be searched.
    8076        @return
    8177            Shared pointer to data stream containing the data. Will be
    8278            destroyed automatically when no longer referenced.
    8379        */
    84         static DataStreamPtr open(const std::string& name,
    85             const std::string& group = Resource::DEFAULT_GROUP,
    86             bool bSearchGroupsIfNotFound = false);
     80        static DataStreamPtr open(const std::string& name);
     81
     82        //! Similar to open(string, string, bool), but with a fileInfo struct
     83        static DataStreamPtr open(shared_ptr<ResourceInfo> fileInfo)
     84        {
     85            return open(fileInfo->filename);
     86        }
    8787
    8888        /**
    8989        @brief
    9090            Open all resources matching a given pattern (which can contain
    91             the character '*' as a wildcard), and return a collection of 
     91            the character '*' as a wildcard), and return a collection of
    9292            DataStream objects on them.
    9393        @param pattern
     
    9595            added recursively, subdirectories will be searched too so this
    9696            does not need to be fully qualified.
    97         @param groupName
    98             The resource group; this determines which locations
    99             are searched.
    10097        @return
    10198            Shared pointer to a data stream list , will be
    10299            destroyed automatically when no longer referenced
    103100        */
    104         static DataStreamListPtr openMulti(const std::string& pattern, const std::string& group = Resource::DEFAULT_GROUP);
     101        static DataStreamListPtr openMulti(const std::string& pattern);
    105102
    106103        /**
    107             Find out if the named file exists in a group.
     104            Find out if the named file exists.
    108105        @param filename
    109106            Fully qualified name of the file to test for
    110         @param group
    111             The name of the resource group
    112107        */
    113         static bool exists(const std::string& name, const std::string& group = Resource::DEFAULT_GROUP);
     108        static bool exists(const std::string& name);
    114109
    115110        /**
    116             Get struct with information about group, path and size.
     111            Get struct with information about path and size.
    117112        @param filename
    118113            Fully qualified name of the file to test for
    119         @param group
    120             The name of the resource group
    121114        */
    122         static shared_ptr<ResourceInfo> getInfo(const std::string& name, const std::string& group = Resource::DEFAULT_GROUP);
     115        static shared_ptr<ResourceInfo> getInfo(const std::string& name);
     116
     117        /**
     118            Retrieves a list with all resources matching a certain pattern.
     119        @param pattern
     120            The pattern to look for. If resource locations have been
     121            added recursively, subdirectories will be searched too so this
     122            does not need to be fully qualified.
     123        */
     124        static StringVectorPtr findResourceNames(const std::string& pattern);
    123125
    124126        //! Name of the default resource group (usually "General")
Note: See TracChangeset for help on using the changeset viewer.