diff options
Diffstat (limited to '')
-rw-r--r-- | libraries/irrlicht-1.8/include/ISceneUserDataSerializer.h | 102 |
1 files changed, 51 insertions, 51 deletions
diff --git a/libraries/irrlicht-1.8/include/ISceneUserDataSerializer.h b/libraries/irrlicht-1.8/include/ISceneUserDataSerializer.h index 309443b..0e63440 100644 --- a/libraries/irrlicht-1.8/include/ISceneUserDataSerializer.h +++ b/libraries/irrlicht-1.8/include/ISceneUserDataSerializer.h | |||
@@ -1,51 +1,51 @@ | |||
1 | // Copyright (C) 2002-2012 Nikolaus Gebhardt | 1 | // Copyright (C) 2002-2012 Nikolaus Gebhardt |
2 | // This file is part of the "Irrlicht Engine". | 2 | // This file is part of the "Irrlicht Engine". |
3 | // For conditions of distribution and use, see copyright notice in irrlicht.h | 3 | // For conditions of distribution and use, see copyright notice in irrlicht.h |
4 | 4 | ||
5 | #ifndef __I_SCENE_USER_DATA_SERIALIZER_H_INCLUDED__ | 5 | #ifndef __I_SCENE_USER_DATA_SERIALIZER_H_INCLUDED__ |
6 | #define __I_SCENE_USER_DATA_SERIALIZER_H_INCLUDED__ | 6 | #define __I_SCENE_USER_DATA_SERIALIZER_H_INCLUDED__ |
7 | 7 | ||
8 | #include "IReferenceCounted.h" | 8 | #include "IReferenceCounted.h" |
9 | 9 | ||
10 | namespace irr | 10 | namespace irr |
11 | { | 11 | { |
12 | namespace io | 12 | namespace io |
13 | { | 13 | { |
14 | class IAttributes; | 14 | class IAttributes; |
15 | } // end namespace io | 15 | } // end namespace io |
16 | namespace scene | 16 | namespace scene |
17 | { | 17 | { |
18 | class ISceneNode; | 18 | class ISceneNode; |
19 | 19 | ||
20 | //! Interface to read and write user data to and from .irr files. | 20 | //! Interface to read and write user data to and from .irr files. |
21 | /** This interface is to be implemented by the user, to make it possible to read | 21 | /** This interface is to be implemented by the user, to make it possible to read |
22 | and write user data when reading or writing .irr files via ISceneManager. | 22 | and write user data when reading or writing .irr files via ISceneManager. |
23 | To be used with ISceneManager::loadScene() and ISceneManager::saveScene() */ | 23 | To be used with ISceneManager::loadScene() and ISceneManager::saveScene() */ |
24 | class ISceneUserDataSerializer | 24 | class ISceneUserDataSerializer |
25 | { | 25 | { |
26 | public: | 26 | public: |
27 | 27 | ||
28 | virtual ~ISceneUserDataSerializer() {} | 28 | virtual ~ISceneUserDataSerializer() {} |
29 | 29 | ||
30 | //! Called when the scene manager create a scene node while loading a file. | 30 | //! Called when the scene manager create a scene node while loading a file. |
31 | virtual void OnCreateNode(ISceneNode* node) = 0; | 31 | virtual void OnCreateNode(ISceneNode* node) = 0; |
32 | 32 | ||
33 | //! Called when the scene manager read a scene node while loading a file. | 33 | //! Called when the scene manager read a scene node while loading a file. |
34 | /** The userData pointer contains a list of attributes with userData which | 34 | /** The userData pointer contains a list of attributes with userData which |
35 | were attached to the scene node in the read scene file.*/ | 35 | were attached to the scene node in the read scene file.*/ |
36 | virtual void OnReadUserData(ISceneNode* forSceneNode, io::IAttributes* userData) = 0; | 36 | virtual void OnReadUserData(ISceneNode* forSceneNode, io::IAttributes* userData) = 0; |
37 | 37 | ||
38 | //! Called when the scene manager is writing a scene node to an xml file for example. | 38 | //! Called when the scene manager is writing a scene node to an xml file for example. |
39 | /** Implement this method and return a list of attributes containing the user data | 39 | /** Implement this method and return a list of attributes containing the user data |
40 | you want to be saved together with the scene node. Return 0 if no user data should | 40 | you want to be saved together with the scene node. Return 0 if no user data should |
41 | be added. Please note that the scene manager will call drop() to the returned pointer | 41 | be added. Please note that the scene manager will call drop() to the returned pointer |
42 | after it no longer needs it, so if you didn't create a new object for the return value | 42 | after it no longer needs it, so if you didn't create a new object for the return value |
43 | and returning a longer existing IAttributes object, simply call grab() before returning it. */ | 43 | and returning a longer existing IAttributes object, simply call grab() before returning it. */ |
44 | virtual io::IAttributes* createUserData(ISceneNode* forSceneNode) = 0; | 44 | virtual io::IAttributes* createUserData(ISceneNode* forSceneNode) = 0; |
45 | }; | 45 | }; |
46 | 46 | ||
47 | } // end namespace scene | 47 | } // end namespace scene |
48 | } // end namespace irr | 48 | } // end namespace irr |
49 | 49 | ||
50 | #endif | 50 | #endif |
51 | 51 | ||