#include "Utilities\commondefs.hpp" #include #define __INPUT_RAWUIEVENT_CPP_ #include "RawUIEvent.hpp" using namespace Input; RAW_UI_EVENT_DECL RawUIEvent::RawUIEvent(): detail(0) { BOOST_LOG_TRIVIAL(trace) << CLASS_METHOD << " called"; parameter_strings parms; initialize(parms); // pick up the defaults } RAW_UI_EVENT_DECL RawUIEvent::RawUIEvent(const parameter_strings & parms) :RawEvent(parms) { BOOST_LOG_TRIVIAL(trace) << CLASS_METHOD << " parameter_strings called"; initialize(parms); } RAW_UI_EVENT_DECL void RawUIEvent::initialize(const parameter_strings & parms) { // Note in particular that the timestamp default constructor will be called, initializing the timestamp // to this instant in time, using the local clock. This is exactly what we want. detail = SET_PARM_OR_DFLT(parms, "detail", long,0) ; } RAW_UI_EVENT_DECL bool RawUIEvent::operator==(RawUIEvent const& cmp) const { // does a fast compare if possible, then does value compares if that doesn't work return (this == &cmp) || ( RawEvent::operator==(*this) && (detail == cmp.detail) ); } RAW_UI_EVENT_DECL RawUIEvent::~RawUIEvent() { BOOST_LOG_TRIVIAL(trace) << CLASS_METHOD << " called"; } template RAW_UI_EVENT_DECL void RawUIEvent::serialize(Archive &ar, const unsigned int version) { ar & boost::serialization::base_object(*this); ar & detail; } #ifdef BOOST_MSVC # pragma warning(push) # pragma warning(disable : 4244) #endif #include #include #include #include BOOST_CLASS_EXPORT_IMPLEMENT(Input::RawUIEvent); BOOST_CLASS_IMPLEMENTATION(Input::RawUIEvent,boost::serialization::object_serializable); BOOST_CLASS_TRACKING(Input::RawUIEvent,boost::serialization::track_never); // without the explicit instantiations below, the program will // fail to link for lack of instantiantiation of the above function // note: the following failed to fix link errors for vc 7.0 ! template RAW_UI_EVENT_DECL void RawUIEvent::serialize( boost::archive::text_iarchive & ar, const unsigned int file_version ); template RAW_UI_EVENT_DECL void RawUIEvent::serialize( boost::archive::text_oarchive & ar, const unsigned int file_version ); template RAW_UI_EVENT_DECL void RawUIEvent::serialize( boost::archive::binary_iarchive & ar, const unsigned int file_version ); template RAW_UI_EVENT_DECL void RawUIEvent::serialize( boost::archive::binary_oarchive & ar, const unsigned int file_version ); #ifdef BOOST_MSVC # pragma warning(pop) #endif