#include <eleve/src0/csv1.hpp>
Public Types | |
enum | part_t { ROW, COLUMN } |
typedef boost::bimap< int, std::string > | attr_pos_t |
typedef attr_pos_t::left_map::const_iterator | l_itr |
! A left iterator for the header bimap. | |
typedef attr_pos_t::right_map::const_iterator | r_itr |
! A right iterator for the header bimap. | |
typedef boost::multi_array_types::index_range | range |
typedef boost::multi_array < boost::any, 2 > | ma_any_t |
typedef ma_any_t::array_view < 2 >::type | payload_t |
View on the data. | |
typedef ma_any_t::array_view < 1 >::type | column_t |
View: one column. | |
typedef payload_t::iterator | iterator0 |
By row and then column iterator. | |
typedef column_t::iterator | iterator1 |
By column iterator. | |
Public Member Functions | |
column_t | column (const std::string name0) throw (std::domain_error) |
Get a column by name. | |
column_t | column (int position0) throw (std::out_of_range) |
Get a column by position. | |
Typing::types0_t::value_type | column_t0 (int position0) throw (std::out_of_range) |
Get a column's expected type. | |
Typing::types0_t::value_type | column_t0 (const std::string name0) throw (std::domain_error) |
Get a column's expected type. | |
Typing::types0_t & | types0 () |
Get all the types defined. | |
template<typename T> | |
void | render (column_t &view0, const boost::any null_=(eepgwde::detail::null0< boost::any >())()) throw (std::domain_error) |
template<typename T> | |
void | render (const std::string colname0) throw (std::domain_error) |
void | render (const std::string colname0) throw (std::domain_error) |
Change the type of a column. | |
void | render () throw (std::domain_error) |
Change the types of all columns. | |
DataFrame (ma_any_t &frame_, std::string overrides0=std::string("")) throw (std::domain_error) | |
Build a frame manager using the named overrides set. | |
const std::string & | overrides () const |
DataFrame (const DataFrame &df) throw (std::domain_error) | |
DataFrame (DataFrame &df) throw (std::domain_error) | |
DataFrame & | operator= (const DataFrame &t) |
ma_any_t * | add (ma_any_t *) |
Add a row. | |
ma_any_t * | add (DataFrame::ma_any_t *, const std::string &name0) |
Add a column (at the end) to the frame with the name given. | |
ma_any_t * | add (DataFrame::ma_any_t *, const std::set< std::string > &names) |
Add a set of column names (at the end). | |
virtual | ~DataFrame () throw () |
ma_any_t * | add (DataFrame::ma_any_t *, const std::vector< Record * > &xtra_attrs, std::set< std::string > names=std::set< std::string >()) |
Public Attributes | |
attr_pos_t | header |
! The bimap containing the headers. | |
ma_any_t & | frame |
Reference to the frame passed to the constuctor. | |
boost::shared_ptr < eepgwde::detail::DataFrame::payload_t > | payload |
Protected Attributes | |
std::auto_ptr < eepgwde::detail::DataFrame::Impl > | impl |
Friends | |
class | Impl |
Classes | |
struct | columnar |
Classes for components. More... | |
struct | columnar1 |
struct | Comparor |
struct | headar |
struct | Impl |
struct | payloader |
struct | Record |
struct | rowar |
It creates a header and a payload. You use those to re-type the data in the payload.
Definition at line 40 of file csv1.hpp.
typedef boost::bimap<int, std::string> eepgwde::detail::DataFrame::attr_pos_t |
typedef attr_pos_t::left_map::const_iterator eepgwde::detail::DataFrame::l_itr |
typedef attr_pos_t::right_map::const_iterator eepgwde::detail::DataFrame::r_itr |
typedef boost::multi_array_types::index_range eepgwde::detail::DataFrame::range |
typedef boost::multi_array<boost::any, 2> eepgwde::detail::DataFrame::ma_any_t |
typedef ma_any_t::array_view<2>::type eepgwde::detail::DataFrame::payload_t |
typedef ma_any_t::array_view<1>::type eepgwde::detail::DataFrame::column_t |
typedef payload_t::iterator eepgwde::detail::DataFrame::iterator0 |
typedef column_t::iterator eepgwde::detail::DataFrame::iterator1 |
eepgwde::detail::DataFrame::DataFrame | ( | ma_any_t & | frame_, | |
std::string | overrides0 = std::string("") | |||
) | throw (std::domain_error) [explicit] |
Build a frame manager using the named overrides set.
Add some useful attributes to a frame.
Create a payload view - no header row. The header goes into a numbered bimap.
Definition at line 193 of file csv1.cpp.
References eepgwde::detail::frame, and frame_.
eepgwde::detail::DataFrame::DataFrame | ( | const DataFrame & | df | ) | throw (std::domain_error) |
eepgwde::detail::DataFrame::DataFrame | ( | DataFrame & | df | ) | throw (std::domain_error) |
eepgwde::detail::DataFrame::~DataFrame | ( | ) | throw () [virtual] |
DataFrame::column_t eepgwde::detail::DataFrame::column | ( | const std::string | name0 | ) | throw (std::domain_error) |
Get a column by name.
< fake return
Definition at line 262 of file csv1.cpp.
References header, and eepgwde::daemon::watcher.
Referenced by Test::header0_t::header0::ab0(), Test::header0_t::header0::ab1(), Test::header0_t::header0::ab2(), c1(), Test::col_t::col::d3(), Test::col_t::col::d4(), Test::col_t::col::d5(), Test::col_t::col::d6(), Test::col_t::col::d7(), e1(), eepgwde::detail::TimeSeries0::operator QuantLib::TimeSeries< QuantLib::Rate >(), render(), and Test::curves_t::curves::ycuk().
DataFrame::column_t eepgwde::detail::DataFrame::column | ( | int | position0 | ) | throw (std::out_of_range) |
Typing::types0_t::value_type eepgwde::detail::DataFrame::column_t0 | ( | int | position0 | ) | throw (std::out_of_range) |
Get a column's expected type.
Definition at line 152 of file csv1.cpp.
Referenced by Test::colt_t::colt::d1().
Typing::types0_t::value_type eepgwde::detail::DataFrame::column_t0 | ( | const std::string | name0 | ) | throw (std::domain_error) |
Typing::types0_t & eepgwde::detail::DataFrame::types0 | ( | ) |
Get all the types defined.
Definition at line 147 of file csv1.cpp.
References impl.
Referenced by Test::colt_t::colt::d0().
void eepgwde::detail::DataFrame::render | ( | column_t & | view0, | |
const boost::any | null_ = (eepgwde::detail::null0<boost::any>())() | |||
) | throw (std::domain_error) [inline] |
Change the type of a column.
T | data type to coerce the boost::any |
Definition at line 100 of file csv1.hpp.
Referenced by Test::split0_t::split0::a4(), Test::split0_t::split0::a5(), Test::header0_t::header0::ab0(), Test::header0_t::header0::ab1(), Test::header0_t::header0::ab2(), Test::sort0_t::sort0::b3(), Test::sort0_t::sort0::b4(), Test::sort0_t::sort0::b5(), Test::sort0_t::sort0::b6(), Test::sort0_t::sort0::b7(), Test::sort0_t::sort0::b8(), Test::caps0_t::caps0::caps0(), Test::schema0_t::schema0::csd1(), Test::schema0_t::schema0::csd2(), Test::col_t::col::d4(), Test::col_t::col::d5(), Test::col_t::col::d6(), Test::col_t::col::d7(), Test::mi3_t::mi3::e0(), Test::misc_t::misc::qldt(), Test::curves_t::curves::yceur(), Test::curves_t::curves::ycuk(), and Test::yoyeu_t::yoyeu::yoyeur().
void eepgwde::detail::DataFrame::render | ( | const std::string | colname0 | ) | throw (std::domain_error) [inline] |
void eepgwde::detail::DataFrame::render | ( | const std::string | colname0 | ) | throw (std::domain_error) |
Change the type of a column.
fn1_ref_t render_bps & eepgwde::detail::DataFrame::render | ( | ) | throw (std::domain_error) |
const std::string & eepgwde::detail::DataFrame::overrides | ( | ) | const |
DataFrame::ma_any_t * eepgwde::detail::DataFrame::add | ( | ma_any_t * | result | ) |
Add a row.
Add a row (at the end) to the frame.
Copy the frame to a new frame (passed by reference)
This is a bit weighty. You can only copy from one frame to another.
Definition at line 327 of file csv1.cpp.
References frame.
Referenced by Test::attrs_t::attrs::q0().
DataFrame::ma_any_t * eepgwde::detail::DataFrame::add | ( | DataFrame::ma_any_t * | result, | |
const std::string & | name0 | |||
) |
DataFrame::ma_any_t * eepgwde::detail::DataFrame::add | ( | DataFrame::ma_any_t * | result, | |
const std::set< std::string > & | name0 | |||
) |
ma_any_t* eepgwde::detail::DataFrame::add | ( | DataFrame::ma_any_t * | , | |
const std::vector< Record * > & | xtra_attrs, | |||
std::set< std::string > | names = std::set< std::string >() | |||
) |
Add a set of column names (at the end) and use data from the attrs_ of a DataFrame
friend class Impl [friend] |
! The bimap containing the headers.
Definition at line 72 of file csv1.hpp.
Referenced by Test::split0_t::split0::a4(), Test::header0_t::header0::ab0(), Test::header0_t::header0::ab1(), Test::header0_t::header0::ab2(), eepgwde::detail::DataFrame::payloader::as0(), Test::sort0_t::sort0::b6(), Test::sort0_t::sort0::b7(), Test::sort0_t::sort0::b8(), c0(), column(), Test::frame0_t::frame0::csv4(), Test::col_t::col::d0(), Test::colt_t::colt::d1(), Test::col_t::col::d2(), Test::mi3_t::mi3::e0(), Test::misc_t::misc::e0(), e0(), e2(), eepgwde::detail::TimeSeries0::operator QuantLib::TimeSeries< QuantLib::Rate >(), eepgwde::detail::DataFrame::rowar::operator record_t(), operator=(), render(), and Test::curves_t::curves::yceur().
Reference to the frame passed to the constuctor.
Definition at line 75 of file csv1.hpp.
Referenced by Test::header0_t::header0::ab0(), Test::header0_t::header0::ab1(), Test::header0_t::header0::ab2(), add(), eepgwde::detail::DataFrame::payloader::as0(), c0(), Test::caps0_t::caps0::caps0(), Test::schema0_t::schema0::csd0(), Test::schema0_t::schema0::csd1(), Test::schema0_t::schema0::csd2(), Test::col_t::col::d1(), Test::col_t::col::d4(), Test::col_t::col::d6(), Test::col_t::col::d7(), e0(), e2(), operator=(), Test::attrs_t::attrs::q1(), Test::misc_t::misc::qldt(), and Test::yoyeu_t::yoyeu::yoyeur().
boost::shared_ptr<eepgwde::detail::DataFrame::payload_t> eepgwde::detail::DataFrame::payload |
Definition at line 391 of file csv1.hpp.
Referenced by Test::header0_t::header0::ab1(), Test::header0_t::header0::ab2(), Test::frame0_t::frame0::csv4(), Test::frame0_t::frame0::csv5(), Test::col_t::col::d0(), Test::col_t::col::d2(), eepgwde::detail::DataFrame::payloader::operator std::vector< DataFrame::iterator0 >(), eepgwde::detail::DataFrame::payloader::operator std::vector< eepgwde::detail::record_t >(), eepgwde::detail::DataFrame::payloader::operator std::vector< T >(), and operator=().
std::auto_ptr<eepgwde::detail::DataFrame::Impl> eepgwde::detail::DataFrame::impl [protected] |