clipboard_format_sequence Class Reference
[Windows Clipboard Library]

#include <winstl/clipboard/clipboard_format_sequence.hpp>

Inheritance diagram for clipboard_format_sequence:

stl_collection_tag collection_tag

List of all members.


Detailed Description

This class provides an STL-like sequence for iterating the clipboard formats for the current process.

The class enables the formats currently available on the clipboard to be enumerated, as shown in the following example:

  winstl::clipboard_format_sequence   fmt;

  std::copy(fmt.begin(), fmt.end()
          , stlsoft::ostream_iterator<UINT>(std::cout, "\t", "\n"));

On the system on which this documentation was written, this printed the following:

    1
    16
    7
    13

which are CF_TEXT, CF_LOCALE, CF_OEMTEXT, and CF_UNICODETEXT.

Examples:

by_library/windows_clipboard/clipboard_format_sequence/clipboard_format_sequence.cpp.


Public Types

Member Types
typedef clipboard_format_sequence class_type
 The type.
typedef UINT value_type
 The value type.
typedef size_t size_type
 The size type.
typedef ws_ptrdiff_t difference_type
 The difference type.

Public Member Functions

Construction
 clipboard_format_sequence ()
 Constructs a sequence object, attempting to open the clipboard.
 ~clipboard_format_sequence () throw ()
 Release any resources aquired.
Iteration
const_iterator begin () const
 Begins the iteration.
const_iterator end () const
 Ends the iteration.
bool empty () const
 Indicates whether the search sequence is empty.
size_type size () const
 Returns the number of elements in the sequence.
bool inaccessible () const
 Indicates whether the search sequence is valid.

Classes

class  const_iterator
 Non-mutating iterator class. More...

Member Typedef Documentation

The type.

typedef UINT value_type

The value type.

typedef size_t size_type

The size type.

typedef ws_ptrdiff_t difference_type

The difference type.


Constructor & Destructor Documentation

clipboard_format_sequence (  )  [inline]

Constructs a sequence object, attempting to open the clipboard.

~clipboard_format_sequence (  )  throw () [inline]

Release any resources aquired.


Member Function Documentation

const_iterator begin (  )  const [inline]

Begins the iteration.

Returns:
An iterator representing the start of the sequence

const_iterator end (  )  const [inline]

Ends the iteration.

Returns:
An iterator representing the end of the sequence

bool empty (  )  const [inline]

Indicates whether the search sequence is empty.

size_type size (  )  const [inline]

Returns the number of elements in the sequence.

bool inaccessible (  )  const [inline]

Indicates whether the search sequence is valid.

Note:
The sequence may not be able to access the clipboard formats if another window is currently holding the clipboard via a call to OpenClipboard()


The documentation for this class was generated from the following file:

Generated on Thu Jun 10 08:59:15 2010 for STLSoft by  doxygen 1.5.6