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

◆ reportkey()

void reportkey ( const datrw::Subformat f,
const std::string  k,
const std::string  d 
)
Examples:
libdatrwxxtests.cc.

Definition at line 69 of file libdatrwxxtests.cc.

References datrw::Subformat::isset(), and datrw::Subformat::value().

Referenced by main().

72 {
73  cout << " " << k << " is ";
74  if (!f.isset(k))
75  {
76  cout << "NOT ";
77  }
78  cout << "set";
79  cout << " and has value " << f.value(k, d) << endl;
80  double a,b;
81  f(k, d) >> a >> b;
82  cout << " reading two doubles from value: " << a << ", " << b;
83  cout << endl;
84  cout << " the given default value is " << d << endl;
85 } // void reportkey(const datrw::Subformat& f, const std::string k)
bool isset(const std::string &k) const
check if user provided this key
std::string value(const std::string &k, const std::string &dev="false") const
function operator returns string
Here is the call graph for this function:
Here is the caller graph for this function: