MeVisLabToolboxReference
MeVis/Foundation/Sources/DicomTree/MLDicomTree/DCMTree_Serialization_File.h
Go to the documentation of this file.
00001 //-----------------------------------------------------------------------------
00002 // **InsertLicense** code
00003 //-----------------------------------------------------------------------------
00005 
00010 //-----------------------------------------------------------------------------
00011 
00012 #ifndef CLASS_DCMTREE_SERIALIZATION_FILE
00013 #define CLASS_DCMTREE_SERIALIZATION_FILE
00014 
00015 #include "DCMTree_Serialization.h"
00016 
00017 #include <ctime>
00018 
00019 #include <stdio.h>
00020 
00021 
00022 namespace DCMTree_Serialization
00023 {
00025     class DCMTREE_EXPORT FileSink:public Sink
00026     {
00027     public:
00028         FileSink (std::string filename);
00029         virtual ~FileSink();
00030 
00031         virtual void writeX(const void *data, boost::uint32_t size);
00032         
00033     private:
00034         FILE *_fp;
00035 
00036         clock_t _tm;
00037     };
00038 
00040     class DCMTREE_EXPORT FileSource:public Source
00041     {
00042     public:
00043         FileSource (std::string filename);
00044         virtual ~FileSource();
00045 
00046         virtual void readX(void *data, boost::uint32_t size);
00047         virtual void rewind();
00048 
00049     private:
00050         FILE *_fp;
00051         clock_t _tm;
00052     };
00053 }
00054 
00055 #endif
00056 
00057