SFF++ library: reading and writing SFF from C++

◆ verbose() [4/8]

void sff::verbose ( std::ostream &  os,
const INFO info 
)

Definition at line 184 of file sffverbose.cc.

References sff::INFO::cs, CS_cartesian, CS_spherical, sff::INFO::cx, sff::INFO::cy, sff::INFO::cz, and sff::INFO::nstacks.

185  {
186  sff::helper::MyFormat format;
187  os << "contents of SFF INFO line:" << std::endl;
188  os << " coordinate system (cs): ";
189  switch (info.cs) {
190  case CS_cartesian:
191  os << "cartesian";
192  break;
193  case CS_spherical:
194  os << "spherical";
195  break;
196  }
197  os << std::endl;
198  switch (info.cs) {
199  case CS_cartesian:
200  os << " X-coordinate (c1):"
201  << format(19,8) << info.cx << " m" << std::endl;;
202  os << " Y-coordinate (c2):"
203  << format(19,8) << info.cy << " m" << std::endl;;
204  os << " Z-coordinate (c3):"
205  << format(19,8) << info.cz << " m" << std::endl;;
206  break;
207  case CS_spherical:
208  os << "spherical";
209  os << " latitude (c1): "
210  << format(19,8) << info.cx << " deg" << std::endl;;
211  os << " longitude (c2):"
212  << format(19,8) << info.cy << " deg" << std::endl;;
213  os << " height (c3): "
214  << format(19,8) << info.cz << " m" << std::endl;;
215  break;
216  }
217  os << " number of stacks (nstacks):"
218  << format(8,5) << info.nstacks << std::endl;
219  } // void verbose(std::ostream& os, const INFO& info)