3 Copyright 2007-2009 Antoine Chavasse <a.chavasse@gmail.com>
5 This file is part of Fail.
7 Fail is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License version 3
9 as published by the Free Software Foundation.
11 Fail is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program. If not, see <http://www.gnu.org/licenses/>.
19 #ifndef FAIL_MANIFEST_H_
20 #define FAIL_MANIFEST_H_
24 // This class manages a dictionary of named pointers to serializable objects.
25 // The idea is to use it as the primary object of a serialized bundle of objects
26 // to function as a mini-directory of the objects of interest to the client code
29 // For instance, when storing a complex 3d object as a scenegraph in a file,
30 // a manifest can be used as a front-end for that file and provide links with
31 // specific names to objects of interest to the game code such as the root frame,
32 // the root renderable object, additional sub-frames to use to bind sub-objects such
33 // as weapons, animation controller parameters to bind to game code variables, etc.
34 class FLCORE_EXPORT Manifest
: public Serializable
38 Manifest( const Serialization_tag
& );
40 void addObject( string Name
, shared_ptr
< Serializable
> pObject
);
41 shared_ptr
< Serializable
> getObject( string Name
);
44 template< class C
, typename T
> friend struct fail::attribute_traits
;
46 map
< string
, shared_ptr
< Serializable
> > m_ObjectMap
;