00001
00002
00003
00004
00005
00006 #ifndef BAG1_
00007 #define BAG1_
00008
00009 #include "eleve/config.hpp"
00010
00011 #include <string>
00012 #include <map>
00013 #include <list>
00014 #include <string>
00015 #include <stdexcept>
00016
00017 #include <boost/bimap.hpp>
00018 #include <boost/any.hpp>
00019 #include <boost/multi_array.hpp>
00020 #include <boost/function.hpp>
00021
00022 #include "eleve/src/typing0.hpp"
00023
00024 namespace eepgwde { namespace detail {
00025
00026 struct Bag {
00027
00028 struct Impl;
00029 friend struct Impl;
00030
00035 typedef boost::bimap<int, std::string> attr_pos_t;
00036
00038 typedef attr_pos_t::left_map::const_iterator l_itr;
00039
00041 typedef attr_pos_t::right_map::const_iterator r_itr;
00042
00044 attr_pos_t header;
00045
00046
00047
00048
00049 void add(int column_position, const std::string & column_name);
00050
00051
00052
00053
00054 std::list<boost::any> * get(const std::string & name0)
00055 throw (std::exception);
00056
00057
00058
00059
00060 std::list<boost::any> * get(int pos)
00061 throw (std::exception);
00062
00063
00064
00065
00066 const std::list<boost::any> * get(const std::string & name0) const
00067 throw (std::exception);
00068
00069
00070
00071
00072 const std::list<boost::any> * get(int pos) const
00073 throw (std::exception);
00074
00075
00076
00077
00078 std::list<boost::any> *
00079 append(int pos, const std::string & value0)
00080 throw (std::exception);
00081
00082 Bag() throw(std::exception);
00083 virtual ~Bag() throw();
00084
00085 protected:
00086 const std::auto_ptr<eepgwde::detail::Bag::Impl> impl;
00087 };
00088
00089 std::ostream& operator<< (std::ostream& os,
00090 const eepgwde::detail::Bag::attr_pos_t::left_map & l);
00091
00092 struct DataFrame0 {
00093 struct Impl;
00094 friend struct Impl;
00095
00096 typedef boost::multi_array_types::index_range range;
00097 typedef boost::multi_array<boost::any, 2> ma_any_t;
00098
00100 const Bag::attr_pos_t header_;
00101
00102 ma_any_t frame;
00103
00104 explicit DataFrame0(const Bag & bag);
00105
00106 virtual ~DataFrame0() throw();
00107
00108 protected:
00109 const std::auto_ptr<eepgwde::detail::DataFrame0::Impl> impl;
00110 };
00111
00112 }}
00113
00114 #endif