geometry.hh

00001 // geometry.hh: this file is part of the Vaucanson project.
00002 //
00003 // Vaucanson, a generic library for finite state machines.
00004 //
00005 // Copyright (C) 2005 The Vaucanson Group.
00006 //
00007 // This program is free software; you can redistribute it and/or
00008 // modify it under the terms of the GNU General Public License
00009 // as published by the Free Software Foundation; either version 2
00010 // of the License, or (at your option) any later version.
00011 //
00012 // The complete GNU General Public Licence Notice can be found as the
00013 // `COPYING' file in the root directory.
00014 //
00015 // The Vaucanson Group consists of people listed in the `AUTHORS' file.
00016 //
00017 #ifndef VCSN_AUTOMATA_IMPLEMENTATION_GEOMETRY_HH
00018 # define VCSN_AUTOMATA_IMPLEMENTATION_GEOMETRY_HH
00019 
00020 # include <map>
00021 # include <string>
00022 # include <vaucanson/automata/concept/handlers.hh>
00023 
00024 
00025 namespace vcsn
00026 {
00035   struct geometry
00036   {
00037       // Store in this map state coordinates.
00038       typedef std::map<hstate_t, std::pair<double, double> >
00039       states_geometry_map_t;
00040 
00041       // Store in this map label coordinates for transitions.
00042       typedef std::map<htransition_t, std::pair<double, double> >
00043       transitions_geometry_map_t;
00044 
00045       // Store in this map label coordinates for initial transitions.
00046       typedef std::map<hstate_t, std::pair<double, double> >
00047       initials_geometry_map_t;
00048 
00049       // Store in this map label coordinates for final transitions.
00050       typedef std::map<hstate_t, std::pair<double, double> >
00051       finals_geometry_map_t;
00052 
00053       geometry();
00054       geometry(const geometry& obj);
00055       ~geometry();
00056 
00061       inline states_geometry_map_t& states();
00062       inline const states_geometry_map_t& states() const;
00063 
00068       inline transitions_geometry_map_t& transitions();
00069       inline const transitions_geometry_map_t& transitions() const;
00070 
00075       inline initials_geometry_map_t& initials();
00076       inline const initials_geometry_map_t& initials() const;
00077 
00082       inline finals_geometry_map_t& finals();
00083       inline const finals_geometry_map_t& finals() const;
00084 
00089       inline std::string& name();
00090       inline const std::string& name() const;
00091 
00092 
00093     private:
00094       mutable states_geometry_map_t*    states_;
00095       mutable transitions_geometry_map_t*       transitions_;
00096       mutable initials_geometry_map_t*  initials_;
00097       mutable finals_geometry_map_t*    finals_;
00098       mutable std::string*              name_;
00099   };
00100 
00101 } // !vcsn
00102 
00103 
00104 
00105 # ifndef VCSN_USE_INTERFACE_ONLY
00106 #  include <vaucanson/automata/implementation/geometry.hxx>
00107 # endif // VCSN_USE_INTERFACE_ONLY
00108 
00109 #endif // ! VCSN_AUTOMATA_IMPLEMENTATION_GEOMETRY_HH

Generated on Fri Jul 28 12:18:34 2006 for Vaucanson by  doxygen 1.4.6