Rheolef  7.2
an efficient C++ finite element environment
geo_element_indirect.cc
Go to the documentation of this file.
1 #include "rheolef/geo_element_indirect.h"
22 
23 namespace rheolef {
24 
25 std::istream&
26 operator>> (std::istream& is, geo_element_indirect& x)
27 {
28  char c;
29  is >> std::ws >> c;
30  x.set_shift(0);
31  if (isdigit(c)) { // positive orientation:
32  x.set_orientation(1);
33  is.unget();
34  } else { // negative orientation:
35  x.set_orientation(-1);
36  }
38  is >> idx;
39  x.set_index (idx);
40  return is;
41 }
42 std::ostream&
43 operator<< (std::ostream& os, const geo_element_indirect& x)
44 {
45  if (x.orientation() < 0) os << '-';
46  return os << x.index();
47 }
48 
49 } // namespace rheolef
void set_orientation(orientation_type orient)
orientation_type orientation() const
This file is part of Rheolef.
std::istream & operator>>(std::istream &is, const catchmark &m)
Definition: catchmark.h:88
std::ostream & operator<<(std::ostream &os, const catchmark &m)
Definition: catchmark.h:99