iTargetedIO.h

Go to the documentation of this file.
00001 
00002 //
00003 //
00004 //  Targeted IO Utility
00005 //
00006 //  Created 3-13-03: Tom Burke
00007 //
00008 
00009 #pragma once
00010 
00011 // includes
00012 #include "maxheap.h"
00013 #include "sfx.h"
00014 
00015 //==============================================================================
00016 // ITargetedIO
00030 //==============================================================================
00031 class ITargetedIO: public MaxHeapOperators
00032 {
00033 public:
00034 
00036 
00044     virtual void AddSaveTarget( int targetIndex, ReferenceTarget * rt ) = 0;
00045 
00047 
00054     virtual ReferenceTarget * GetSaveTarget( int targetIndex ) = 0;
00055 
00057     virtual int SaveToFile( const MCHAR * fileName, FileIOType context ) = 0;
00058 
00060     virtual int SaveToFile( MCHAR * fileName, FileIOType context ) { return SaveToFile(const_cast<const MCHAR*>(fileName), context); }
00061 
00063     virtual int LoadFromFile( const MCHAR * fileName, FileIOType context ) = 0;
00064 
00066     virtual int LoadFromFile( MCHAR * fileName, FileIOType context ) { return LoadFromFile(const_cast<const MCHAR*>(fileName), context); }
00067 
00069 
00079     virtual void Store( int targetIndex, ReferenceTarget * rt ) = 0;
00080 
00082 
00086     virtual ReferenceTarget * Retrieve( int targetIndex ) = 0;
00087 
00088 };
00089