#ifndef __IHIERARCHICALSTORAGEATTRIBUTE_H__ #define __IHIERARCHICALSTORAGEATTRIBUTE_H__ #include "StreamInterface/StreamInterface.pkg" #include "MarshalSupport/MarshalSupport.pkg" #include using namespace MarshalSupport::Operators; class IHierarchicalStorageAttribute { public: // Constructors inline virtual ~IHierarchicalStorageAttribute() = 0; // Name functions virtual Marshal::Ret GetName() const = 0; virtual void SetName(const Marshal::In& name) = 0; // Value read functions //##FIX## Why do we reset the stream position when extracting data, but not when // inserting data? inline std::wstring GetValue() const; template T ExtractValue(); template T ExtractHexValue(); template void ExtractValue(T& target); template void ExtractHexValue(T& target); // Value write functions template void SetValue(const T& data); template void InsertValue(const T& data); template void InsertHexValue(const T& data, unsigned int length); protected: // Stream functions virtual void ResetInternalStreamPosition() const = 0; virtual void EmptyInternalStream() = 0; virtual Stream::IStream& GetInternalStream() const = 0; }; IHierarchicalStorageAttribute::~IHierarchicalStorageAttribute() { } #include "IHierarchicalStorageAttribute.inl" #endif