#ifndef __JDETECTOR__JTRIPOD__ #define __JDETECTOR__JTRIPOD__ #include #include #include "JLang/JObjectID.hh" #include "JUTM/JUTMPosition.hh" #include "JIO/JSerialisable.hh" /** * \file * * Data structure for tripod. * \author mdejong */ namespace JDETECTOR {} namespace JPP { using namespace JDETECTOR; } namespace JDETECTOR { using JLANG::JObjectID; using JUTM::JUTMPosition; using JIO::JReader; using JIO::JWriter; /** * Data structure for tripod. */ class JTripod : public JObjectID, public JUTMPosition { public: /** * Default constructor. */ JTripod() {} /** * Constructor. * * \param id identifier * \param position UTM positiom */ JTripod(const int id, const JUTMPosition& position) : JObjectID(id), JUTMPosition(position) {} /** * Read tripod from input. * * \param in input stream * \param tripod tripod * \return input stream */ friend inline std::istream& operator>>(std::istream& in, JTripod& tripod) { in >> static_cast (tripod); in >> static_cast(tripod); return in; } /** * Write tripod to output. * * \param out output stream * \param tripod tripod * \return output stream */ friend inline std::ostream& operator<<(std::ostream& out, const JTripod& tripod) { out << static_cast (tripod); out << ' '; out << static_cast(tripod); return out; } /** * Read tripod from input. * * \param in reader * \param tripod tripod * \return reader */ friend inline JReader& operator>>(JReader& in, JTripod& tripod) { in >> static_cast (tripod); in >> static_cast(tripod); return in; } /** * Write tripod to output. * * \param out writer * \param tripod tripod * \return writer */ friend inline JWriter& operator<<(JWriter& out, const JTripod& tripod) { out << static_cast (tripod); out << static_cast(tripod); return out; } }; } #endif