SiGraph: sulcal graphs


exoticTreeReader.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_EXOTICTREEREADER_H
13#define SI_GRAPH_EXOTICTREEREADER_H
14
15
16#include <cartobase/object/attributed.h>
17//#include <cartobase/object/areader.h>
18#include <graph/tree/treader.h>
19#include <graph/tree/tree.h>
20
21
22namespace sigraph
23{
24
33 {
34 public:
35 ExoticTreeReader( const std::string & filename,
36 const carto::SyntaxSet & attr,
37 const carto::AttributedReader::HelperSet& helpers
38 = carto::AttributedReader::HelperSet());
40 const carto::AttributedReader::HelperSet& helpers
41 = carto::AttributedReader::HelperSet());
42 ExoticTreeReader( const TreeFactory & factory,
43 const std::string & filename,
44 const carto::SyntaxSet & attr,
45 const carto::AttributedReader::HelperSet& helpers
46 = carto::AttributedReader::HelperSet());
47 ExoticTreeReader( const TreeFactory & factory,
48 const carto::SyntaxSet & attr,
49 const carto::AttributedReader::HelperSet& helpers
50 = carto::AttributedReader::HelperSet());
52
54 virtual Tree* read();
55
56 static carto::SyntaxSet initSyntax( const std::string & filename );
57
58 protected:
59 virtual void readTree( Tree* t );
60 void parseTree( Tree* tr );
61 virtual void parse( Tree* go ) { parse( (carto::AttributedObject *) go ); };
62 virtual void parse( carto::AttributedObject* ) {};
63
64 private:
65 };
66
67
69 { t.accept( er ); return( er ); }
70
71}
72
73#endif
74
TreeReader(const std::string &filename, const carto::SyntaxSet &syntax, const carto::AttributedReader::HelperSet &helpers=carto::AttributedReader::HelperSet())
virtual void accept(TreeVisitor &visitor)
Classe ExoticTreeReader : classe de base de lecture d'arbres "exotiques".
virtual void parse(Tree *go)
virtual Tree * read()
Crée l'arbre et le lit.
static carto::SyntaxSet initSyntax(const std::string &filename)
void parseTree(Tree *tr)
ExoticTreeReader(const TreeFactory &factory, const carto::SyntaxSet &attr, const carto::AttributedReader::HelperSet &helpers=carto::AttributedReader::HelperSet())
ExoticTreeReader(const TreeFactory &factory, const std::string &filename, const carto::SyntaxSet &attr, const carto::AttributedReader::HelperSet &helpers=carto::AttributedReader::HelperSet())
virtual void readTree(Tree *t)
ExoticTreeReader(const carto::SyntaxSet &attr, const carto::AttributedReader::HelperSet &helpers=carto::AttributedReader::HelperSet())
virtual void parse(carto::AttributedObject *)
ExoticTreeReader(const std::string &filename, const carto::SyntaxSet &attr, const carto::AttributedReader::HelperSet &helpers=carto::AttributedReader::HelperSet())
SyntaxedObject< PropertySet > AttributedObject
std::map< std::string, Syntax > SyntaxSet
ExoticTreeReader & operator>>(ExoticTreeReader &er, Tree &t)