|
Isis 3.0 Object Programmers' Reference |
Home |
00001 #if !defined(Blob_h) 00002 #define Blob_h 00003 00026 #include <string> 00027 #include "Pvl.h" 00028 00029 namespace Isis { 00030 bool IsBlob(Isis::PvlObject &obj); 00041 class Blob { 00042 public: 00043 Blob (const std::string &name, const std::string &type); 00044 Blob (const std::string &name, const std::string &type, 00045 const std::string &file); 00046 Blob (const Blob& other); 00047 virtual ~Blob(); 00048 00049 void Read (const std::string &file); 00050 virtual void Read (Isis::Pvl &pvl, std::fstream &is); 00051 00052 void Write (const std::string &file); 00053 void Write (Isis::Pvl &pvl, std::fstream &istm, 00054 const std::string &detachedFilename = ""); 00055 00056 std::string Type() const { return p_type; }; 00057 std::string Name() const { return p_blobName; }; 00058 00059 PvlObject &Label() { return p_blobPvl; }; 00060 00061 Blob &operator=(const Blob &other); 00062 00063 protected: 00064 void Find (Isis::Pvl &pvl); 00065 virtual void ReadInit () {}; 00066 virtual void ReadData (std::fstream &is); 00067 00068 virtual void WriteInit () {}; 00069 virtual void WriteData (std::fstream &os); 00070 00071 Isis::PvlObject p_blobPvl; 00072 std::string p_blobName; 00073 00074 char *p_buffer; 00075 BigInt p_startByte; 00076 int p_nbytes; 00077 std::string p_type; 00078 std::string p_detached; 00079 std::string p_labelFile; 00080 }; 00081 }; 00082 00083 #endif