Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SegmentS2.h File Reference
Include dependency graph for SegmentS2.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  SegmentS2< FT >
 

Functions

template<class FT >
std::ostream & operator<< (std::ostream &os, const SegmentS2< FT > &s)
 
template<class FT >
std::istream & operator>> (std::istream &is, SegmentS2< FT > &s)
 

Function Documentation

std::ostream& operator<< ( std::ostream &  os,
const SegmentS2< FT > &  s 
)

Definition at line 232 of file SegmentS2.h.

References IO::ASCII, IO::BINARY, IO::mode, and s.

233 {
234  switch(os.iword(IO::mode)) {
235  case IO::ASCII :
236  return os << s.source() << ' ' << s.target();
237  case IO::BINARY :
238  return os << s.source() << s.target();
239  default:
240  return os << "SegmentS2(" << s.source() << ", " << s.target() << ")";
241  }
242 }
Definition: io.h:64
static int mode
Definition: io.h:63
Definition: io.h:64
const PointS2< FT > & source() const
Definition: SegmentS2.h:141
const PointS2< FT > & target() const
Definition: SegmentS2.h:147
std::istream& operator>> ( std::istream &  is,
SegmentS2< FT > &  s 
)

Definition at line 247 of file SegmentS2.h.

References q.

248 {
249  PointS2<FT> p, q;
250 
251  is >> p >> q;
252 
253  s = SegmentS2<FT>(p, q);
254  return is;
255 }
NT q