OverSim
CoordinateSystem.h File Reference
#include <stdint.h>
#include <vector>
#include <omnetpp.h>

Go to the source code of this file.

Classes

class  AbstractNcsNodeInfo
class  EuclideanNcsNodeInfo
class  GnpNpsCoordsInfo
class  SimpleUnderlayCoordsInfo
class  SimpleCoordsInfo
class  VivaldiCoordsInfo
class  AbstractNcs

Typedefs

typedef std::vector< double > Coords
typedef std::vector< CoordsCoordsVec

Functions

std::ostream & operator<< (std::ostream &os, const Coords &coords)
std::ostream & operator<< (std::ostream &os, const GnpNpsCoordsInfo &info)
std::ostream & operator<< (std::ostream &os, const SimpleCoordsInfo &info)
std::ostream & operator<< (std::ostream &os, const VivaldiCoordsInfo &info)

Detailed Description

Author
Bernhard Heep

Definition in file CoordinateSystem.h.

Typedef Documentation

typedef std::vector<double> Coords

Definition at line 33 of file CoordinateSystem.h.

typedef std::vector<Coords> CoordsVec

Definition at line 38 of file CoordinateSystem.h.

Function Documentation

std::ostream& operator<< ( std::ostream &  os,
const Coords coords 
)

Definition at line 236 of file CoordinateSystem.cc.

{
uint8_t dim = coords.size();
if (dim == 0) return os;
os << "< " << coords[0];
for (uint8_t i = 1; i < dim; i++) {
os << ", " << coords[i];
}
os << " >";
return os;
}
std::ostream& operator<< ( std::ostream &  os,
const GnpNpsCoordsInfo info 
)

Definition at line 74 of file CoordinateSystem.cc.

{
if (!info.getCoords().size()) throw cRuntimeError("dim = 0");
/*
os << "< ";
uint8_t i;
for (i = 0; i < info.getCoords().size() - 1; ++i) {
os << info.getCoords(i) << ", ";
}
os << info.getCoords(i) << " >";
*/
os << info.getCoords();
if (info.getLayer() != -1)
os << ", NPS-Layer = " << (int)info.getLayer();
return os;
}
std::ostream& operator<< ( std::ostream &  os,
const SimpleCoordsInfo info 
)
std::ostream& operator<< ( std::ostream &  os,
const VivaldiCoordsInfo info 
)

Definition at line 147 of file CoordinateSystem.cc.

{
if (!info.getCoords().size()) throw cRuntimeError("dim = 0");
os << "< ";
uint8_t i;
for (i = 0; i < info.getCoords().size() - 1; ++i) {
os << info.getCoords(i) << ", ";
}
os << info.getCoords(i) << " >";
os << ", Err = " << info.getError();
if (info.getHeightVector() != -1.0)
os << ", HeightVec = " << info.getHeightVector();
return os;
}