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