SiGraph: sulcal graphs


exoticGraphReader.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 1998-2004 CEA
3 *
4 * This software and supporting documentation were developed by
5 * CEA/DSV/SHFJ
6 * 4 place du General Leclerc
7 * 91401 Orsay cedex
8 * France
9 *
10 */
11
12#ifndef SI_GRAPH_EXOTICGRAPHREADER_H
13#define SI_GRAPH_EXOTICGRAPHREADER_H
14
15
16#include <cartobase/object/attributed.h>
17#include <graph/graph/greader.h>
18class Vertex;
19class Edge;
20
21
22namespace sigraph
23{
24
33 {
34 public:
35 ExoticGraphReader( const std::string & filename,
36 const carto::SyntaxSet & attr );
39
40 static carto::SyntaxSet initSyntax( const std::string & filename );
41
42 protected:
43 virtual void read( Graph & gr );
44 virtual void parse( Graph & sg, carto::AttributedObject* go ) = 0;
45 virtual void parse( Graph & sg, Vertex* go );
46 virtual void parse( Graph & sg, Edge* go );
47 virtual void parse( Graph & sg, Graph* go );
48
49 private:
50 };
51
52 // Fonctions inline
53
54 inline void ExoticGraphReader::parse( Graph & sg, Vertex* go )
55 {
56 parse( sg, (carto::AttributedObject *) go );
57 }
58
59
60 inline void ExoticGraphReader::parse( Graph & sg, Edge* go )
61 {
62 parse( sg, (carto::AttributedObject *) go );
63 }
64
65
66 inline void ExoticGraphReader::parse( Graph & sg, Graph* go )
67 {
68 parse( sg, (carto::AttributedObject *) go );
69 }
70
71}
72
73#endif
74
GraphReader(const std::string &filename, const carto::SyntaxSet &syntax, const carto::AttributedReader::HelperSet &helpers=carto::AttributedReader::HelperSet())
ExoticGraphReader(const std::string &filename, const carto::SyntaxSet &attr)
virtual void read(Graph &gr)
ExoticGraphReader(const carto::SyntaxSet &attr)
static carto::SyntaxSet initSyntax(const std::string &filename)
virtual void parse(Graph &sg, carto::AttributedObject *go)=0
SyntaxedObject< PropertySet > AttributedObject
std::map< std::string, Syntax > SyntaxSet