ostream& TimeStamp::operator<<(ostream &out) const {
            SerializationFactory sf;

            Serializer &s = sf.getSerializer(out);

            s.write(CRC32 < OPENDAVINCI_CORE_STRINGLITERAL3('s', 'e', 'c') >::RESULT,
                    m_seconds);

            s.write(CRC32 < OPENDAVINCI_CORE_STRINGLITERAL3('m', 'i', 'c') >::RESULT,
                    m_microseconds);

            return out;
        }
Esempio n. 2
0
        ostream& TimeStamp::operator<<(ostream &out) const {
            SerializationFactory& sf=SerializationFactory::getInstance();;

            std::shared_ptr<Serializer> s = sf.getSerializer(out);

            s->write(CRC32 < OPENDAVINCI_CORE_STRINGLITERAL3('s', 'e', 'c') >::RESULT,
                    m_seconds);

            s->write(CRC32 < OPENDAVINCI_CORE_STRINGLITERAL3('m', 'i', 'c') >::RESULT,
                    m_microseconds);

            return out;
        }
	ostream& Example3Data::operator<<(ostream &out) const {
		SerializationFactory sf;

		Serializer &s = sf.getSerializer(out);

		s.write(CRC32 < OPENDAVINCI_CORE_STRINGLITERAL3('n', 'u', 'm') >::RESULT,
				m_numericalValue);

		s.write(CRC32 < OPENDAVINCI_CORE_STRINGLITERAL3('s', 't', 'r') >::RESULT,
				m_stringValue);

		return out;
	}
Esempio n. 4
0
 void TimeStamp::accept(Visitor &v) {
     v.beginVisit();
     v.visit(CRC32 < OPENDAVINCI_CORE_STRINGLITERAL3('s', 'e', 'c') >::RESULT,
             1,
             "TimeStamp.seconds",
             "seconds",
             m_seconds);
     v.visit(CRC32 < OPENDAVINCI_CORE_STRINGLITERAL3('m', 'i', 'c') >::RESULT,
             2,
             "TimeStamp.microseconds",
             "microseconds",
             m_microseconds);
     v.endVisit();
 }
Esempio n. 5
0
            ostream& WGS84Coordinate::operator<<(ostream &out) const {
                SerializationFactory sf;

                Serializer &s = sf.getSerializer(out);

                s.write(CRC32 < OPENDAVINCI_CORE_STRINGLITERAL3('l', 'a', 't') >::RESULT,
                        m_lat);

                s.write(CRC32 < OPENDAVINCI_CORE_STRINGLITERAL6('l', 'a', 't', 'd', 'i', 'r') >::RESULT,
                        static_cast<uint32_t>(m_LATITUDE));

                s.write(CRC32 < OPENDAVINCI_CORE_STRINGLITERAL3('l', 'o', 'n') >::RESULT,
                        m_lon);

                s.write(CRC32 < OPENDAVINCI_CORE_STRINGLITERAL6('l', 'o', 'n', 'd', 'i', 'r') >::RESULT,
                        static_cast<uint32_t>(m_LONGITUDE));

                return out;
            }
Esempio n. 6
0
            ostream& Header::operator<<(ostream &out) const {
                SerializationFactory& sf=SerializationFactory::getInstance();

                std::shared_ptr<Serializer> s = sf.getSerializer(out);

                s->write(CRC32 < OPENDAVINCI_CORE_STRINGLITERAL4('n', 'a', 'm', 'e') >::RESULT,
                        m_name);

                s->write(CRC32 < OPENDAVINCI_CORE_STRINGLITERAL7('v', 'e', 'r', 's', 'i', 'o', 'n') >::RESULT,
                        m_version);

                s->write(CRC32 < OPENDAVINCI_CORE_STRINGLITERAL4('d', 'a', 't', 'e') >::RESULT,
                        m_date);

                s->write(CRC32 < OPENDAVINCI_CORE_STRINGLITERAL3('s', 'c', 'n') >::RESULT,
                        m_scenario);

                return out;
            }
Esempio n. 7
0
            ostream& Arc::operator<<(ostream &out) const {
                // Serializer super class.
                StraightLine::operator<<(out);

                SerializationFactory sf;

                Serializer &s = sf.getSerializer(out);

                s.write(CRC32 < OPENDAVINCI_CORE_STRINGLITERAL6('r', 'a', 'd', 'i', 'u', 's') >::RESULT,
                        getRadius());

                s.write(CRC32 < OPENDAVINCI_CORE_STRINGLITERAL5('b', 'e', 'g', 'i', 'n') >::RESULT,
                        getBeginInterval());

                s.write(CRC32 < OPENDAVINCI_CORE_STRINGLITERAL3('e', 'n', 'd') >::RESULT,
                        getEndInterval());

                s.write(CRC32 < OPENDAVINCI_CORE_STRINGLITERAL4('r', 'o', 't', 'z') >::RESULT,
                        getRotationZ());

                return out;
            }
                return out;
            }

            istream& VehicleData::operator>>(istream &in) {
                // Deserialize this class.
                SerializationFactory sf;

                Deserializer &d = sf.getDeserializer(in);

                d.read(CRC32 < OPENDAVINCI_CORE_STRINGLITERAL8('p', 'o', 's', 'i', 't', 'i', 'o', 'n') >::RESULT,
                       m_position);

                d.read(CRC32 < OPENDAVINCI_CORE_STRINGLITERAL7('h', 'e', 'a', 'd', 'i', 'n', 'g') >::RESULT,
                       m_heading);

                d.read(CRC32 < OPENDAVINCI_CORE_STRINGLITERAL3('a', 'd', 'p') >::RESULT,
                       m_absTraveledPath);

                d.read(CRC32 < OPENDAVINCI_CORE_STRINGLITERAL3('r', 'd', 'p') >::RESULT,
                       m_relTraveledPath);

                d.read(CRC32 < OPENDAVINCI_CORE_STRINGLITERAL8('v', 'e', 'l', 'o', 'c', 'i', 't', 'y') >::RESULT,
                       m_velocity);

                d.read(CRC32 < OPENDAVINCI_CORE_STRINGLITERAL5('s', 'p', 'e', 'e', 'd') >::RESULT,
                       m_speed);

                d.read(CRC32 < OPENDAVINCI_CORE_STRINGLITERAL4('v', 'l', 'o', 'g') >::RESULT,
                       m_v_log);

                d.read(CRC32 < OPENDAVINCI_CORE_STRINGLITERAL4('v', 'b', 'a', 't') >::RESULT,
        ostream& TimeStamp::operator<<(ostream &out) const {
            SerializationFactory sf;

            Serializer &s = sf.getSerializer(out);

            s.write(CRC32 < OPENDAVINCI_CORE_STRINGLITERAL3('s', 'e', 'c') >::RESULT,
                    m_seconds);

            s.write(CRC32 < OPENDAVINCI_CORE_STRINGLITERAL3('m', 'i', 'c') >::RESULT,
                    m_microseconds);

            return out;
        }

        istream& TimeStamp::operator>>(istream &in) {
            SerializationFactory sf;

            Deserializer &d = sf.getDeserializer(in);

            d.read(CRC32 < OPENDAVINCI_CORE_STRINGLITERAL3('s', 'e', 'c') >::RESULT,
                   m_seconds);

            d.read(CRC32 < OPENDAVINCI_CORE_STRINGLITERAL3('m', 'i', 'c') >::RESULT,
                   m_microseconds);

            return in;
        }

    }
} // core::data
Esempio n. 10
0
                s->write(CRC32 < OPENDAVINCI_CORE_STRINGLITERAL3('s', 'c', 'n') >::RESULT,
                        m_scenario);

                return out;
            }

            istream& Header::operator>>(istream &in) {
                SerializationFactory& sf=SerializationFactory::getInstance();

                std::shared_ptr<Deserializer> d = sf.getDeserializer(in);

                d->read(CRC32 < OPENDAVINCI_CORE_STRINGLITERAL4('n', 'a', 'm', 'e') >::RESULT,
                       m_name);

                d->read(CRC32 < OPENDAVINCI_CORE_STRINGLITERAL7('v', 'e', 'r', 's', 'i', 'o', 'n') >::RESULT,
                       m_version);

                d->read(CRC32 < OPENDAVINCI_CORE_STRINGLITERAL4('d', 'a', 't', 'e') >::RESULT,
                       m_date);

                d->read(CRC32 < OPENDAVINCI_CORE_STRINGLITERAL3('s', 'c', 'n') >::RESULT,
                       m_scenario);

                return in;
            }

        }
    }
} // opendlv::data::situation
Esempio n. 11
0
                s.write(CRC32 < OPENDAVINCI_CORE_STRINGLITERAL3('l', 'o', 'n') >::RESULT,
                        m_lon);

                s.write(CRC32 < OPENDAVINCI_CORE_STRINGLITERAL6('l', 'o', 'n', 'd', 'i', 'r') >::RESULT,
                        static_cast<uint32_t>(m_LONGITUDE));

                return out;
            }

            istream& WGS84Coordinate::operator>>(istream &in) {
                SerializationFactory sf;

                Deserializer &d = sf.getDeserializer(in);

                d.read(CRC32 < OPENDAVINCI_CORE_STRINGLITERAL3('l', 'a', 't') >::RESULT,
                       m_lat);

                uint32_t l = 0;
                d.read(CRC32 < OPENDAVINCI_CORE_STRINGLITERAL6('l', 'a', 't', 'd', 'i', 'r') >::RESULT,
                       l);
                m_LATITUDE = static_cast<WGS84Coordinate::LATITUDE>(l);

                d.read(CRC32 < OPENDAVINCI_CORE_STRINGLITERAL3('l', 'o', 'n') >::RESULT,
                       m_lon);

                l = 0;
                d.read(CRC32 < OPENDAVINCI_CORE_STRINGLITERAL6('l', 'o', 'n', 'd', 'i', 'r') >::RESULT,
                       l);
                m_LONGITUDE = static_cast<WGS84Coordinate::LONGITUDE>(l);
Esempio n. 12
0
                return out;
            }

            istream& Arc::operator>>(istream &in) {
                // Deserializer super class.
                StraightLine::operator>>(in);

                SerializationFactory sf;

                Deserializer &d = sf.getDeserializer(in);

                d.read(CRC32 < OPENDAVINCI_CORE_STRINGLITERAL6('r', 'a', 'd', 'i', 'u', 's') >::RESULT,
                       m_radius);

                d.read(CRC32 < OPENDAVINCI_CORE_STRINGLITERAL5('b', 'e', 'g', 'i', 'n') >::RESULT,
                       m_beginInterval);

                d.read(CRC32 < OPENDAVINCI_CORE_STRINGLITERAL3('e', 'n', 'd') >::RESULT,
                       m_endInterval);

                d.read(CRC32 < OPENDAVINCI_CORE_STRINGLITERAL4('r', 'o', 't', 'z') >::RESULT,
                       m_rotationZ);

                return in;
            }

        }
    }
} // hesperia::data::scenario
	ostream& Example3Data::operator<<(ostream &out) const {
		SerializationFactory sf;

		Serializer &s = sf.getSerializer(out);

		s.write(CRC32 < OPENDAVINCI_CORE_STRINGLITERAL3('n', 'u', 'm') >::RESULT,
				m_numericalValue);

		s.write(CRC32 < OPENDAVINCI_CORE_STRINGLITERAL3('s', 't', 'r') >::RESULT,
				m_stringValue);

		return out;
	}

	istream& Example3Data::operator>>(istream &in) {
		SerializationFactory sf;

		Deserializer &d = sf.getDeserializer(in);

		d.read(CRC32 < OPENDAVINCI_CORE_STRINGLITERAL3('n', 'u', 'm') >::RESULT,
			   m_numericalValue);

		d.read(CRC32 < OPENDAVINCI_CORE_STRINGLITERAL3('s', 't', 'r') >::RESULT,
			   m_stringValue);

		return in;
	}


} // examples