DATRW++ library: seismic data I/O with multiple formats

◆ value()

std::string datrw::Subformat::value ( const std::string &  k,
const std::string &  dev = "false" 
) const

function operator returns string

Parameters
kkey for which parameters should be read
devdefault value to be used, if parameter is not set
Returns
string containing parameter value
Examples:
libdatrwxxtests.cc.

Definition at line 119 of file formatmodifier.cc.

References Mparamap.

Referenced by datrw::iasciistream::iasciistream(), datrw::imseedstream::imseedstream(), datrw::itsoftstream::itsoftstream(), operator()(), reportkey(), and datrw::iseifestream::settraceheader().

121  {
122  std::string retval;
123  formatmodifiers::Tparamap::const_iterator P=Mparamap.find(k);
124  if (P!=Mparamap.end())
125  {
126  retval=P->second.value;
127  P->second.checked=true;
128  }
129  else
130  {
131  retval=def;
132  }
133  return retval;
134  } // std::istringstream&
formatmodifiers::Tparamap Mparamap
actual container for parameters
Here is the caller graph for this function: