36 using std::ostringstream;
46 , isSizeConstant(false)
50 Dimension::Dimension(
const string& nameArg,
unsigned int sizeArg,
bool isSharedArg,
bool isSizeConstantArg)
53 , isShared(isSharedArg)
54 , isSizeConstant(isSizeConstantArg)
72 os << dim.
name <<
'\n';
73 os << dim.
size <<
'\n';
82 getline(is, dim.
name);
83 is >> ws >> dim.
size >> ws;
91 vector<Dimension>::const_iterator endIt = _dimensions.end();
92 vector<Dimension>::const_iterator it;
93 for (it = _dimensions.begin(); it != endIt; ++it)
113 _dimensions.push_back(dim);
117 BESDEBUG(
"ncml",
"A dimension with name=" << dim.
name <<
" already exists. Not adding." << endl);
121 const std::vector<Dimension>&
std::istream & operator>>(std::istream &is, Dimension &dim)
bool findDimension(const std::string &name, Dimension *pOut=0) const
Find the dimension with the given name.
const std::vector< Dimension > & getDimensions() const
Helper class for temporarily hijacking an existing dhi to load a DDX response for one particular file...
std::ostream & operator<<(std::ostream &os, const Dimension &dim)
Dump to stream.
std::string toString() const
Dump to string and return (using operator<<)
Struct for holding information about a dimension of data, minimally a name and a cardinality (size)...
void addDimensionUnique(const Dimension &dim)
Add the dimension to the table if one with the same name doesn't already exist.
#define BESDEBUG(x, y)
macro used to send debug information to the debug stream