text::PluginCollectionImpl Class Reference

#include <collection_impl.h>

Inheritance diagram for text::PluginCollectionImpl:
Inheritance graph
[legend]
Collaboration diagram for text::PluginCollectionImpl:
Collaboration graph
[legend]

Public Member Functions

 PluginCollectionImpl (void)
 ~PluginCollectionImpl (void)
template<typename T >
void create ()
template<typename T >
std::vector< T > & take_data_ref ()

Data Fields

Signal< PluginCollectionImpl * > release_signal

Detailed Description

PluginCollectionImpl provides a template based collection container. Through this class, caller is able to store data inside the collection. If caller wants to strore pointe data in the collection, it's necessary for caller to connect the release_signal, so that when collection object is to be released, the caller can be notified.

Definition at line 119 of file plaintext/plugin_impl/collection_impl.h.


Constructor & Destructor Documentation

text::PluginCollectionImpl::PluginCollectionImpl ( void   )  [inline]

Definition at line 123 of file plaintext/plugin_impl/collection_impl.h.

References utils::ObjectTable< T >::add_interface(), IPluginCollection::get_data, IPluginCollection::get_num_elements, _IPluginUnknown::query_interface, and _IPluginUnknown::release.

00124     : data(0)
00125     {
00126         query_interface = query_interface_impl;
00127         release = release_impl;
00128         get_data = get_data_impl;
00129         get_num_elements = get_num_elements_impl;
00130 
00131         g_instances_table.add_interface<IPluginUnknown>(this);
00132         g_instances_table.add_interface<IPluginCollection>(this);
00133     }

Here is the call graph for this function:

text::PluginCollectionImpl::~PluginCollectionImpl ( void   )  [inline]

Definition at line 135 of file plaintext/plugin_impl/collection_impl.h.

References utils::ObjectTable< T >::remove().

00136     {
00137         if (data)
00138         {
00139             delete data;
00140             data = 0;
00141         }
00142         g_instances_table.remove(this);
00143     }

Here is the call graph for this function:


Member Function Documentation

template<typename T >
void text::PluginCollectionImpl::create (  )  [inline]

Definition at line 150 of file plaintext/plugin_impl/collection_impl.h.

Referenced by text::PluginViewImpl::get_bounding_rectangles_from_range_impl().

00151     {
00152         data = new DataContainer<T>;
00153     }

Here is the caller graph for this function:

template<typename T >
std::vector<T>& text::PluginCollectionImpl::take_data_ref (  )  [inline]

Definition at line 156 of file plaintext/plugin_impl/collection_impl.h.

References text::DataContainer< T >::ref().

Referenced by text::PluginViewImpl::get_bounding_rectangles_from_range_impl().

00157     { 
00158         DataContainer<T> *ptr = static_cast<DataContainer<T> *>(data);
00159         return ptr->ref(); 
00160     }

Here is the call graph for this function:

Here is the caller graph for this function:


Field Documentation

Definition at line 146 of file plaintext/plugin_impl/collection_impl.h.


The documentation for this class was generated from the following files:
Generated by  doxygen 1.6.2-20100208