geo_element_indirect.cc
Go to the documentation of this file.
#include "rheolef/geo_element_indirect.h"
namespace rheolef {
std::istream&
operator>> (std::istream& is, geo_element_indirect& x)
{
char c;
is >> std::ws >> c;
x.set_shift(0);
if (isdigit(c)) { // positive orientation:
x.set_orientation(1);
is.unget();
} else { // negative orientation:
x.set_orientation(-1);
}
geo_element_indirect::size_type idx;
is >> idx;
x.set_index (idx);
return is;
}
std::ostream&
operator<< (std::ostream& os, const geo_element_indirect& x)
{
if (x.orientation() < 0) os << '-';
return os << x.index();
}
} // namespace rheolef
rheolef::geo_element_indirect
Definition: geo_element_indirect.h:32
rheolef::geo_element_indirect::size_type
size_t size_type
Definition: geo_element_indirect.h:37
rheolef::geo_element_indirect::set_shift
void set_shift(size_type shift)
Definition: geo_element_indirect.h:61
rheolef::geo_element_indirect::set_orientation
void set_orientation(orientation_type orient)
Definition: geo_element_indirect.h:57
rheolef::geo_element_indirect::set_index
void set_index(size_type ige)
Definition: geo_element_indirect.h:65
rheolef::geo_element_indirect::orientation
orientation_type orientation() const
Definition: geo_element_indirect.h:52
rheolef::geo_element_indirect::index
size_type index() const
Definition: geo_element_indirect.h:51
mkgeo_ball.c
int c
Definition: mkgeo_ball.sh:153
rheolef
This file is part of Rheolef.
Definition: compiler_eigen.h:37
rheolef::operator>>
std::istream & operator>>(std::istream &is, const catchmark &m)
Definition: catchmark.h:88
rheolef::operator<<
std::ostream & operator<<(std::ostream &os, const catchmark &m)
Definition: catchmark.h:99