Public Types | |
enum | SourceType { Local, Remote } |
Source type. More... | |
typedef std::vector < Common::CDataObject * > | DataObjects |
Container to store imported (created by Common::CTypeFactory) data objects. | |
Public Member Functions | |
virtual | ~IClipboardFormat () |
Virtual destructor. | |
virtual void | Prepare (const Handles &handles, const CHeader &header)=0 |
Prepares data for serialization to the clipboard. | |
virtual long | GetSerializationSize () const =0 |
Gets the size in bytes needed to store data to a binary buffer. | |
virtual void | Serialize (void *buffer, const CGrid &grid, ContextType contextType, long userData) const =0 |
Serializes data to a binary buffer. | |
virtual void | Clear ()=0 |
Clears temporary data created during a serialization process. | |
virtual int | GetFormatId () const =0 |
Gets clipboard format identifier (CF_TEXT, CF_BITMAP or already registered user-defined format). | |
virtual bool | Deserialize (const void *buffer, long bufSize, const IObjectImporter *importer, RestoredInfo &restoredInfo)=0 |
Deserializes data from the clipboard and tries to restore grid handles with their hierarchy. | |
Static Public Member Functions | |
static HITEM | CreateHandle (Common::CDataObject *pDO, HITEM hParent) |
Creates a new handle that initially is not attached to the grid. | |
Classes | |
struct | RestoredInfo |
This structure keeps data with their hierarchy, deserialized from the clipboard. More... |
enum SourceType |
void Prepare | ( | const Handles & | handles, | |
const CHeader & | header | |||
) | [pure virtual] |
Prepares data for serialization to the clipboard.
[in] | handles | Handles to be serialized. |
[in] | header | CGrid header. Usually a current header is used. |
Implemented in CLocalDataFormat, CRemoteDataFormat, and CTextClipboardFormat.
long GetSerializationSize | ( | ) | const [pure virtual] |
Gets the size in bytes needed to store data to a binary buffer.
Implemented in CLocalDataFormat, CRemoteDataFormat, and CTextClipboardFormat.
void Serialize | ( | void * | buffer, | |
const CGrid & | grid, | |||
ContextType | contextType, | |||
long | userData | |||
) | const [pure virtual] |
Serializes data to a binary buffer.
[in] | buffer | Storage to which data is serialized. The buffer must be preliminary allocated with the size, returned by GetSerializationSize() function |
[in] | grid | Reference to the grid |
[in] | contextType | Context from which data is taken. |
[in] | userData | 32-bit user-defined value |
Implemented in CLocalDataFormat, CRemoteDataFormat, and CTextClipboardFormat.
int GetFormatId | ( | ) | const [pure virtual] |
Gets clipboard format identifier (CF_TEXT, CF_BITMAP or already registered user-defined format).
Implemented in CLocalDataFormat, CRemoteDataFormat, and CTextClipboardFormat.
bool Deserialize | ( | const void * | buffer, | |
long | bufSize, | |||
const IObjectImporter * | importer, | |||
RestoredInfo & | restoredInfo | |||
) | [pure virtual] |
Deserializes data from the clipboard and tries to restore grid handles with their hierarchy.
[in] | buffer | The binary buffer, got from the clipboard. |
[in] | bufSize | Buffer size. |
[in] | importer | Pointer to the object that can instantiate objects of specified classes from a binary form. Usually Common::CTypeFactory is used which permits to import data from other applications. |
[in,out] | restoredInfo | Storage, that keeps all restored data with their hierarchy. |
Implemented in CLocalDataFormat, CRemoteDataFormat, and CTextClipboardFormat.
HITEM CreateHandle | ( | Common::CDataObject * | pDO, | |
HITEM | hParent | |||
) | [static] |
Creates a new handle that initially is not attached to the grid.
[in] | pDO | The data object, a new handle will be associated with. |
[in] | hParent | Parent handle, to which a new handle will be hierarchically added. |
Copyright Dapfor 2007-2009 | Generated on Wed Jul 7 03:24:43 2010 for MFCGrid by 1.5.5 |