#ifndef ICE_P2_HELPERS_H #define ICE_P2_HELPERS_H #include #include template const VariableType & operator>>(const VariableType & vt, T & v) { v = vt.as(); return vt; } template <> const VariableType & operator>>(const VariableType & vt, Common::Duration & d); template <> const VariableType & operator>>(const VariableType & vt, Common::DateTime & dt); template const VariableType & operator>>(const VariableType & vt, IceUtil::Optional & v) { if (vt.isNull()) { v = IceUtil::Optional(); } else { v = T(); vt >> *v; } return vt; } template <> const VariableType & operator>>(const VariableType & vt, short int & v); template VariableType & operator<<(VariableType & vt, const T & v) { vt = v; return vt; } template <> VariableType & operator<<(VariableType & vt, const Common::Duration & d); template <> VariableType & operator<<(VariableType & vt, const Common::DateTime & dt); template VariableType & operator<<(VariableType & vt, const IceUtil::Optional & v) { if (v) { vt << *v; } else { vt = Null(); } return vt; } #endif