/*************************************************************************** * E-Com Technology Ltd. * * ECOMPACS DICOM Network Transport Libraries * Version 0.1 Beta ***************************************************************************/ #pragma once #ifndef __IOManipulate__ #define __IOManipulate__ template class fcn_obj { public: fcn_obj (stype & (*f) (stype &, vtype), vtype v): func (f), val (v) { } stype & operator () (stype & s) const { return (*func) (s, val); } private: stype & (*func) (stype &, vtype); vtype val; }; template stype & operator << (stype & ofile, const fcn_obj (im)) { return im (ofile); } template stype & operator >> (stype & ifile, const fcn_obj (im)) { return im (ifile); } #endif