The InterfaceTable contains a list of interfaces. From this class caller can add and query a given interface. More...
#include <interfaces_utils.h>
Public Member Functions | |
InterfaceTable () | |
~InterfaceTable () | |
template<class T > | |
void | add_entry (T *ptr) |
bool | query_interface (const char *name, void **return_ptr) |
template<class T > | |
bool | contain_interface (T *ptr) |
InterfaceTable () | |
~InterfaceTable () | |
template<class T > | |
void | add_entry (T *ptr) |
bool | query_interface (const char *name, void **return_ptr) |
template<class T > | |
bool | contain_interface (T *ptr) |
InterfaceTable () | |
~InterfaceTable () | |
template<class T > | |
void | add_entry (T *ptr) |
bool | query_interface (const char *name, void **return_ptr) |
template<class T > | |
bool | contain_interface (T *ptr) |
The InterfaceTable contains a list of interfaces. From this class caller can add and query a given interface.
Definition at line 102 of file images/plugin_impl/interfaces_utils.h.
utils::InterfaceTable::InterfaceTable | ( | ) | [inline] |
Definition at line 105 of file images/plugin_impl/interfaces_utils.h.
utils::InterfaceTable::~InterfaceTable | ( | ) | [inline] |
Definition at line 109 of file images/plugin_impl/interfaces_utils.h.
utils::InterfaceTable::InterfaceTable | ( | ) | [inline] |
Definition at line 105 of file pdf/plugin_impl/interfaces_utils.h.
utils::InterfaceTable::~InterfaceTable | ( | ) | [inline] |
Definition at line 109 of file pdf/plugin_impl/interfaces_utils.h.
utils::InterfaceTable::InterfaceTable | ( | ) | [inline] |
Definition at line 105 of file plaintext/plugin_impl/interfaces_utils.h.
utils::InterfaceTable::~InterfaceTable | ( | ) | [inline] |
Definition at line 109 of file plaintext/plugin_impl/interfaces_utils.h.
void utils::InterfaceTable::add_entry | ( | T * | ptr | ) | [inline] |
Definition at line 116 of file plaintext/plugin_impl/interfaces_utils.h.
References ERRORPRINTF, utils::MAX_INTERFACES, and name.
00117 { 00118 interfaces.push_back(new InterfaceEntry<T>(ptr)); 00119 unsigned int size = interfaces.size(); 00120 if (size > MAX_INTERFACES) 00121 { 00122 ERRORPRINTF("Too many interfaces for class %s: interfaces.size [%u] max [%u]", 00123 typeid(T).name(), size, MAX_INTERFACES); 00124 } 00125 }
void utils::InterfaceTable::add_entry | ( | T * | ptr | ) | [inline] |
Definition at line 116 of file pdf/plugin_impl/interfaces_utils.h.
References ERRORPRINTF, utils::MAX_INTERFACES, and name.
00117 { 00118 interfaces.push_back(new InterfaceEntry<T>(ptr)); 00119 unsigned int size = interfaces.size(); 00120 if (size > MAX_INTERFACES) 00121 { 00122 ERRORPRINTF("Too many interfaces for class %s: interfaces.size [%u] max [%u]", 00123 typeid(T).name(), size, MAX_INTERFACES); 00124 } 00125 }
void utils::InterfaceTable::add_entry | ( | T * | ptr | ) | [inline] |
Definition at line 116 of file images/plugin_impl/interfaces_utils.h.
References ERRORPRINTF, utils::MAX_INTERFACES, and name.
Referenced by utils::ObjectTable< PluginRenderResultImpl >::add_interface().
00117 { 00118 interfaces.push_back(new InterfaceEntry<T>(ptr)); 00119 unsigned int size = interfaces.size(); 00120 if (size > MAX_INTERFACES) 00121 { 00122 ERRORPRINTF("Too many interfaces for class %s: interfaces.size [%u] max [%u]", 00123 typeid(T).name(), size, MAX_INTERFACES); 00124 } 00125 }
bool utils::InterfaceTable::contain_interface | ( | T * | ptr | ) | [inline] |
Definition at line 145 of file plaintext/plugin_impl/interfaces_utils.h.
bool utils::InterfaceTable::contain_interface | ( | T * | ptr | ) | [inline] |
Definition at line 145 of file pdf/plugin_impl/interfaces_utils.h.
bool utils::InterfaceTable::contain_interface | ( | T * | ptr | ) | [inline] |
Definition at line 145 of file images/plugin_impl/interfaces_utils.h.
bool utils::InterfaceTable::query_interface | ( | const char * | name, | |
void ** | return_ptr | |||
) | [inline] |
Definition at line 127 of file plaintext/plugin_impl/interfaces_utils.h.
00128 { 00129 Iter begin = interfaces.begin(); 00130 Iter end = interfaces.end(); 00131 for(Iter it = begin; it != end; ++it) 00132 { 00133 if ((*it)->is_name_equal(name)) 00134 { 00135 *return_ptr = (*it)->get_pointer(); 00136 return true; 00137 } 00138 } 00139 // This could happen when caller wants to query a optional 00140 // interface. Should not use assert here. 00141 return false; 00142 }
bool utils::InterfaceTable::query_interface | ( | const char * | name, | |
void ** | return_ptr | |||
) | [inline] |
Definition at line 127 of file pdf/plugin_impl/interfaces_utils.h.
00128 { 00129 Iter begin = interfaces.begin(); 00130 Iter end = interfaces.end(); 00131 for(Iter it = begin; it != end; ++it) 00132 { 00133 if ((*it)->is_name_equal(name)) 00134 { 00135 *return_ptr = (*it)->get_pointer(); 00136 return true; 00137 } 00138 } 00139 // This could happen when caller wants to query a optional 00140 // interface. Should not use assert here. 00141 return false; 00142 }
bool utils::InterfaceTable::query_interface | ( | const char * | name, | |
void ** | return_ptr | |||
) | [inline] |
Definition at line 127 of file images/plugin_impl/interfaces_utils.h.
00128 { 00129 Iter begin = interfaces.begin(); 00130 Iter end = interfaces.end(); 00131 for(Iter it = begin; it != end; ++it) 00132 { 00133 if ((*it)->is_name_equal(name)) 00134 { 00135 *return_ptr = (*it)->get_pointer(); 00136 return true; 00137 } 00138 } 00139 // This could happen when caller wants to query a optional 00140 // interface. Should not use assert here. 00141 return false; 00142 }