11 std::ostringstream OStr;
13 bool known_data_type =
false;
27 assert(known_data_type);
38 std::getline(Istr,line);
39 std::istringstream IStr(line);
42 int read_size = in_nitems * in_size;
44 if(expected_size <= 0) {
45 expected_size = read_size;
49 bool known_data_type =
false;
51 if(expected_size != read_size){
52 std::cout <<
"PC2::ERROR line = " << line << std::endl
53 <<
"PC2::ERROR in_nitems = " << in_nitems << std::endl
54 <<
"PC2::ERROR in_size = " << in_size << std::endl
55 <<
"PC2::ERROR read_size = " << read_size << std::endl
56 <<
"PC2::ERROR expected = " << expected_size << std::endl;
57 std::getline(Istr,line);
58 std::cout <<
"PC2::ERROR next_line = " << line << std::endl;
60 assert(expected_size == read_size);
73 assert(known_data_type);
80 if(md.
unit ==
"[NULL]")
90 for(
int iData = 0;iData < numData;iData++){
93 if(md.ncomp > 0 && md.dsize > 0 && !md.name.empty())
102 << (md.
unit.empty() ?
"[NULL]" : md.
unit);
108 metadataset::const_iterator mdIt = mdSet.begin();
109 OStr << mdSet.size() << std::endl;
110 while(mdIt != mdSet.end()){
112 OStr << md << std::endl;
std::ostream & operator<<(std::ostream &Ostr, const databuffer &buf)
std::ostream & OutputToStream(std::ostream &Ostr) const
std::istream & ReadFromStream(std::istream &Istr)
std::istream & operator>>(std::istream &Istr, databuffer &buf)