Crazy Eddies GUI System: CEGUIResourceProvider.h Source File

- Main Page
- Namespaces
- Classes
- Files
- Directories
- Related Pages

# CEGUIResourceProvider.h

    00001 /************************************************************************
    00002         filename:       CEGUIResourceProvider.h
    00003         created:        8/7/2004
    00004         author:         James '_mental_' O'Sullivan
    00005
    00006         purpose:        Defines abstract base class for loading DataContainer objects
    00007 *************************************************************************/
    00008 /*************************************************************************
    00009     Crazy Eddie's GUI System (http://www.cegui.org.uk)
    00010     Copyright (C)2004 - 2005 Paul D Turner (paul@cegui.org.uk)
    00011
    00012     This library is free software; you can redistribute it and/or
    00013     modify it under the terms of the GNU Lesser General Public
    00014     License as published by the Free Software Foundation; either
    00015     version 2.1 of the License, or (at your option) any later version.
    00016
    00017     This library is distributed in the hope that it will be useful,
    00018     but WITHOUT ANY WARRANTY; without even the implied warranty of
    00019     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    00020     Lesser General Public License for more details.
    00021
    00022     You should have received a copy of the GNU Lesser General Public
    00023     License along with this library; if not, write to the Free Software
    00024     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    00025 *************************************************************************/
    00026 #ifndef _CEGUIResourceProvider_h_
    00027 #define _CEGUIResourceProvider_h_
    00028
    00029 #include "CEGUIBase.h"
    00030 #include "CEGUIDataContainer.h"
    00031 #include "CEGUIString.h"
    00032
    00033
    00034 // Start of CEGUI namespace section
    00035 namespace CEGUI
    00036 {
    00043 class CEGUIEXPORT ResourceProvider
    00044 {
    00045 public:
    00046         /*************************************************************************
    00047                 Construction and Destruction
    00048         *************************************************************************/
    00053         ResourceProvider() { }
    00054
    00059         virtual ~ResourceProvider(void) { }
    00060
    00061     /*************************************************************************
    00062         Accessor functions
    00063     *************************************************************************/
    00064
    00065 //    /*!
    00066 //    \brief
    00067 //        Load XML data using InputSource objects.
    00068 //
    00069 //    \param filename
    00070 //        String containing a filename of the resource to be loaded.
    00071 //
    00072 //      \param output
    00073 //              Reference to a InputSourceContainer object to load the data into.
    00074 //   */
    00075 //    virtual void loadInputSourceContainer(const String& filename, InputSourceContainer& output) = 0;
    00076
    00091     virtual void loadRawDataContainer(const String& filename, RawDataContainer& output, const String& resourceGroup) = 0;
    00092
    00103     virtual void unloadRawDataContainer(RawDataContainer& data)  { }
    00104
    00112     const String&   getDefaultResourceGroup(void) const     { return d_defaultResourceGroup; }
    00113
    00124     void    setDefaultResourceGroup(const String& resourceGroup)    { d_defaultResourceGroup = resourceGroup; }
    00125
    00126 protected:
    00127     String  d_defaultResourceGroup;
    00128 };
    00129
    00130 } // End of  CEGUI namespace section
    00131
    00132 #endif  // end of guard _CEGUIResourceProvider_h_