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, 2006 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 inline geometry& operator=(const geometry& obj); 00057 inline geometry& copy_from(const geometry& obj); 00058 00063 inline states_geometry_map_t& states(); 00064 inline const states_geometry_map_t& states() const; 00065 00070 inline transitions_geometry_map_t& transitions(); 00071 inline const transitions_geometry_map_t& transitions() const; 00072 00077 inline initials_geometry_map_t& initials(); 00078 inline const initials_geometry_map_t& initials() const; 00079 00084 inline finals_geometry_map_t& finals(); 00085 inline const finals_geometry_map_t& finals() const; 00086 00091 inline std::string& name(); 00092 inline const std::string& name() const; 00093 00094 00095 private: 00096 mutable states_geometry_map_t* states_; 00097 mutable transitions_geometry_map_t* transitions_; 00098 mutable initials_geometry_map_t* initials_; 00099 mutable finals_geometry_map_t* finals_; 00100 mutable std::string* name_; 00101 }; 00102 00103 } // !vcsn 00104 00105 00106 00107 # ifndef VCSN_USE_INTERFACE_ONLY 00108 # include <vaucanson/automata/implementation/geometry.hxx> 00109 # endif // VCSN_USE_INTERFACE_ONLY 00110 00111 #endif // ! VCSN_AUTOMATA_IMPLEMENTATION_GEOMETRY_HH