| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
|
| 22 |
#if !defined( INCLUDED_IMAP_H ) |
| 23 |
#define INCLUDED_IMAP_H |
| 24 |
|
| 25 |
#include "generic/constant.h" |
| 26 |
|
| 27 |
class Tokeniser; |
| 28 |
class TokenWriter; |
| 29 |
|
| 30 |
|
| 31 |
class MapImporter |
| 32 |
{ |
| 33 |
public: |
| 34 |
STRING_CONSTANT( Name, "MapImporter" ); |
| 35 |
|
| 36 |
virtual bool importTokens( Tokeniser& tokeniser ) = 0; |
| 37 |
}; |
| 38 |
|
| 39 |
|
| 40 |
class MapExporter |
| 41 |
{ |
| 42 |
public: |
| 43 |
STRING_CONSTANT( Name, "MapExporter" ); |
| 44 |
|
| 45 |
virtual void exportTokens( TokenWriter& writer ) const = 0; |
| 46 |
}; |
| 47 |
|
| 48 |
#include "iscenegraph.h" |
| 49 |
|
| 50 |
class EntityCreator; |
| 51 |
|
| 52 |
class TextInputStream; |
| 53 |
class TextOutputStream; |
| 54 |
|
| 55 |
|
| 56 |
typedef void ( *GraphTraversalFunc )( scene::Node& root, const scene::Traversable::Walker& walker ); |
| 57 |
|
| 58 |
|
| 59 |
class MapFormat |
| 60 |
{ |
| 61 |
public: |
| 62 |
virtual ~MapFormat() = default; |
| 63 |
INTEGER_CONSTANT( Version, 2 ); |
| 64 |
STRING_CONSTANT( Name, "map" ); |
| 65 |
mutable bool wrongFormat; |
| 66 |
|
| 67 |
|
| 68 |
virtual void readGraph( scene::Node& root, TextInputStream& inputStream, EntityCreator& entityTable ) const = 0; |
| 69 |
|
| 70 |
virtual void writeGraph( scene::Node& root, GraphTraversalFunc traverse, TextOutputStream& outputStream, bool writeComments ) const = 0; |
| 71 |
}; |
| 72 |
|
| 73 |
|
| 74 |
template<typename Type> |
| 75 |
class Modules; |
| 76 |
typedef Modules<MapFormat> MapModules; |
| 77 |
|
| 78 |
template<typename Type> |
| 79 |
class ModulesRef; |
| 80 |
typedef ModulesRef<MapFormat> MapModulesRef; |
| 81 |
|
| 82 |
|
| 83 |
#endif |