Changeset 2864 in Sophya for trunk/SophyaExt/FitsIOServer/fitshandler.h
- Timestamp:
- Jan 2, 2006, 2:47:44 PM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaExt/FitsIOServer/fitshandler.h
r2820 r2864 4 4 #include "machdefs.h" 5 5 #include <string> 6 #include <typeinfo> 6 7 #include "fitsinoutfile.h" 7 8 … … 19 20 //! Return the real data object 20 21 virtual AnyDataObj* DataObj() = 0; // Retourne l'objet reel 21 //! Return true if I/O for object \b o can be handled22 virtual boolCheckHandling(AnyDataObj & o) = 0;22 //! Return a positive value if I/O for object \b o can be handled 23 virtual int CheckHandling(AnyDataObj & o) = 0; 23 24 //! Read/write operation will use the object o 24 25 virtual void SetDataObj(AnyDataObj & o) = 0; 25 26 27 //! Return a positive value if current HDU can be read by the handler 28 virtual int CheckReadability(FitsInOutFile& is) = 0; 29 26 30 //! Clone (duplicate) the handler class 27 31 virtual FitsHandlerInterface* Clone() = 0; … … 46 50 47 51 virtual AnyDataObj* DataObj() { return(dobj); } 48 virtual boolCheckHandling(AnyDataObj & o)52 virtual int CheckHandling(AnyDataObj & o) 49 53 { 54 if (typeid(o) == typeid(T)) return 2; 50 55 T * po = dynamic_cast< T * >(& o); 51 if (po == NULL) return false;52 else return true;56 if (po == NULL) return 0; 57 else return 1; 53 58 } 54 59 virtual void SetDataObj(AnyDataObj & o) … … 62 67 if (ownobj && dobj) delete dobj; dobj = po; ownobj = false; 63 68 } 69 70 virtual int CheckReadability(FitsInOutFile& is); 64 71 65 72 virtual FitsHandlerInterface* Clone()
Note:
See TracChangeset
for help on using the changeset viewer.