#include <CClipboard.h>
Inherits IClipboard.
Inheritance diagram for CClipboard:
Public Member Functions | |
CClipboard () | |
virtual | ~CClipboard () |
virtual bool | empty () |
Empty clipboard. | |
virtual void | add (EFormat, const CString &data) |
virtual bool | open (Time) const |
virtual void | close () const |
Close clipboard. | |
virtual Time | getTime () const |
Get time. | |
virtual bool | has (EFormat) const |
virtual CString | get (EFormat) const |
manipulators | |
void | unmarshall (const CString &data, Time time) |
Unmarshall clipboard data. | |
accessors | |
CString | marshall () const |
Marshall clipboard data. |
This class implements a clipboard that stores data in memory.
Definition at line 24 of file CClipboard.h.
void CClipboard::close | ( | ) | const [virtual] |
Close clipboard.
Close the clipboard. close() must match a preceding successful open(). This signals that the clipboard has been filled with all the necessary data or all data has been read. It does not mean the clipboard ownership should be released (if it was taken).
Implements IClipboard.
Definition at line 77 of file CClipboard.cpp.
Referenced by CClipboard().
bool CClipboard::empty | ( | ) | [virtual] |
Empty clipboard.
Take ownership of the clipboard and clear all data from it. This must be called between a successful open() and close(). Return false if the clipboard ownership could not be taken; the clipboard should not be emptied in this case.
Implements IClipboard.
Definition at line 36 of file CClipboard.cpp.
References IClipboard::kNumFormats.
Referenced by CClipboard().
CClipboard::Time CClipboard::getTime | ( | ) | const [virtual] |
Get time.
Return the timestamp passed to the last successful open().
Implements IClipboard.
Definition at line 85 of file CClipboard.cpp.
CString CClipboard::marshall | ( | ) | const |
Marshall clipboard data.
Merge this clipboard's data into a single buffer that can be later unmarshalled to restore the clipboard and return the buffer.
Definition at line 111 of file CClipboard.cpp.
References IClipboard::marshall().
void CClipboard::unmarshall | ( | const CString & | data, | |
Time | time | |||
) |
Unmarshall clipboard data.
Extract marshalled clipboard data and store it in this clipboard. Sets the clipboard time to time
.
Definition at line 105 of file CClipboard.cpp.
References IClipboard::unmarshall().