00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028 #ifndef __INCLUDE_SEGMENT_PCIDSKSEGMENT_H
00029 #define __INCLUDE_SEGMENT_PCIDSKSEGMENT_H
00030
00031 #include "pcidsk_config.h"
00032 #include "pcidsk_types.h"
00033 #include <string>
00034 #include <vector>
00035
00036 namespace PCIDSK
00037 {
00038
00039
00040
00041
00043
00044 class PCIDSKSegment
00045 {
00046 public:
00047 virtual ~PCIDSKSegment() {}
00048
00049 virtual void Initialize() {}
00050
00051 virtual void WriteToFile( const void *buffer, uint64 offset, uint64 size)=0;
00052 virtual void ReadFromFile( void *buffer, uint64 offset, uint64 size ) = 0;
00053
00054 virtual eSegType GetSegmentType() = 0;
00055 virtual std::string GetName() = 0;
00056 virtual std::string GetDescription() = 0;
00057 virtual int GetSegmentNumber() = 0;
00058 virtual uint64 GetContentSize() = 0;
00059 virtual bool IsAtEOF() = 0;
00060
00061 virtual void SetDescription( const std::string &description) = 0;
00062
00063 virtual std::string GetMetadataValue( const std::string &key ) const = 0;
00064 virtual void SetMetadataValue( const std::string &key, const std::string &value ) = 0;
00065 virtual std::vector<std::string> GetMetadataKeys() const = 0;
00066
00067 virtual std::vector<std::string> GetHistoryEntries() const = 0;
00068 virtual void SetHistoryEntries( const std::vector<std::string> &entries ) = 0;
00069 virtual void PushHistory(const std::string &app,
00070 const std::string &message) = 0;
00071
00072 virtual void Synchronize() = 0;
00073
00074 virtual std::string ConsistencyCheck() = 0;
00075 };
00076
00077 }
00078
00079 #endif // __INCLUDE_SEGMENT_PCIDSKSEGMENT_H