#include <Iguana/Framework/interface/IgModuleDescriptor.h>
Public Member Functions | |
void | addChild (IgModuleDescriptor *child) |
void | addToken (const std::string &text) |
IgModuleDescriptor * | child (unsigned index) const |
unsigned | children (void) const |
void | dup (IgModuleDescriptor *to) const |
IgModuleDescriptor (IgModuleDescriptor *parent, const std::vector< std::string > &tokens) | |
IgModuleDescriptor (IgModuleDescriptor *parent=0, const std::string &t1="", const std::string &t2="", const std::string &t3="", const std::string &t4="", const std::string &t5="", const std::string &t6="", const std::string &t7="", const std::string &t8="") | |
IgModuleDescriptor * | parent (void) const |
const std::string & | token (unsigned index) const |
unsigned | tokens (void) const |
~IgModuleDescriptor (void) | |
Private Attributes | |
std::vector< IgModuleDescriptor * > | m_children |
IgModuleDescriptor * | m_parent |
std::vector< std::string > | m_tokens |
Definition at line 18 of file IgModuleDescriptor.h.
IgModuleDescriptor::IgModuleDescriptor | ( | IgModuleDescriptor * | parent = 0 , |
|
const std::string & | t1 = "" , |
|||
const std::string & | t2 = "" , |
|||
const std::string & | t3 = "" , |
|||
const std::string & | t4 = "" , |
|||
const std::string & | t5 = "" , |
|||
const std::string & | t6 = "" , |
|||
const std::string & | t7 = "" , |
|||
const std::string & | t8 = "" | |||
) |
Definition at line 17 of file IgModuleDescriptor.cc.
References addChild(), ASSERT, m_parent, and m_tokens.
Referenced by dup().
00026 : m_parent (parent) 00027 { 00028 if (m_parent) 00029 m_parent->addChild (this); 00030 00031 if (! t1.empty ()) 00032 m_tokens.push_back (t1); 00033 00034 if (! t2.empty ()) 00035 { 00036 ASSERT (! t1.empty ()); 00037 m_tokens.push_back (t2); 00038 } 00039 00040 if (! t3.empty ()) 00041 { 00042 ASSERT (! t2.empty ()); 00043 m_tokens.push_back (t3); 00044 } 00045 00046 if (! t4.empty ()) 00047 { 00048 ASSERT (! t3.empty ()); 00049 m_tokens.push_back (t4); 00050 } 00051 00052 if (! t5.empty ()) 00053 { 00054 ASSERT (! t4.empty ()); 00055 m_tokens.push_back (t5); 00056 } 00057 00058 if (! t6.empty ()) 00059 { 00060 ASSERT (! t5.empty ()); 00061 m_tokens.push_back (t6); 00062 } 00063 00064 if (! t7.empty ()) 00065 { 00066 ASSERT (! t7.empty ()); 00067 m_tokens.push_back (t7); 00068 } 00069 00070 if (! t8.empty ()) 00071 { 00072 ASSERT (! t8.empty ()); 00073 m_tokens.push_back (t8); 00074 } 00075 }
IgModuleDescriptor::IgModuleDescriptor | ( | IgModuleDescriptor * | parent, | |
const std::vector< std::string > & | tokens | |||
) |
Definition at line 77 of file IgModuleDescriptor.cc.
References addChild(), and m_parent.
00079 : m_parent (parent), 00080 m_tokens (tokens) 00081 { 00082 if (m_parent) 00083 m_parent->addChild (this); 00084 }
IgModuleDescriptor::~IgModuleDescriptor | ( | void | ) |
void IgModuleDescriptor::addChild | ( | IgModuleDescriptor * | child | ) |
Definition at line 107 of file IgModuleDescriptor.cc.
References ASSERT, find(), and m_children.
Referenced by IgModuleDescriptor().
00108 { 00109 ASSERT (child); 00110 ASSERT (std::find (m_children.begin (), m_children.end (), child) 00111 == m_children.end ()); 00112 00113 m_children.push_back (child); 00114 }
void IgModuleDescriptor::addToken | ( | const std::string & | text | ) |
Definition at line 126 of file IgModuleDescriptor.cc.
References m_tokens.
Referenced by IgModuleCache::parse().
IgModuleDescriptor * IgModuleDescriptor::child | ( | unsigned | index | ) | const |
Definition at line 103 of file IgModuleDescriptor.cc.
References ASSERT, and m_children.
Referenced by IgApplication::dumpDatabase(), IgModuleCache::parse(), IgPluginFactoryBase::rebuild(), IgModuleCache::reconstruct(), IgQtAppDebugPluginsInfo::update(), and IgModuleCache::write().
00104 { ASSERT (index < m_children.size ()); return m_children [index]; }
unsigned IgModuleDescriptor::children | ( | void | ) | const |
Definition at line 99 of file IgModuleDescriptor.cc.
References m_children.
Referenced by IgApplication::dumpDatabase(), dup(), IgModuleCache::parse(), IgPluginFactoryBase::rebuild(), IgModuleCache::reconstruct(), IgQtAppDebugPluginsInfo::update(), IgModuleCache::write(), and ~IgModuleDescriptor().
00100 { return m_children.size (); }
void IgModuleDescriptor::dup | ( | IgModuleDescriptor * | to | ) | const |
Definition at line 131 of file IgModuleDescriptor.cc.
References children(), i, IgModuleDescriptor(), and m_tokens.
Referenced by IgModule::cache(), and IgModule::restore().
00132 { 00133 IgModuleDescriptor *self = new IgModuleDescriptor (to, m_tokens); 00134 for (unsigned i = 0; i < children (); ++i) 00135 child (i)->dup (self); 00136 }
IgModuleDescriptor * IgModuleDescriptor::parent | ( | void | ) | const |
Definition at line 95 of file IgModuleDescriptor.cc.
References m_parent.
Referenced by IgModuleCache::reconstruct().
00096 { return m_parent; }
const std::string & IgModuleDescriptor::token | ( | unsigned | index | ) | const |
Definition at line 122 of file IgModuleDescriptor.cc.
References ASSERT, and m_tokens.
Referenced by IgApplication::dumpDatabase(), IgPluginFactoryBase::rebuild(), IgModuleCache::reconstruct(), IgPluginManager::restore(), IgQtAppDebugPluginsInfo::update(), and IgModuleCache::write().
unsigned IgModuleDescriptor::tokens | ( | void | ) | const |
Definition at line 118 of file IgModuleDescriptor.cc.
References m_tokens.
Referenced by IgPluginFactoryImplTypes< void >::Info::Info(), IgModuleCache::parse(), IgModuleCache::reconstruct(), IgPluginManager::restore(), and IgModuleCache::write().
00119 { return m_tokens.size (); }
std::vector<IgModuleDescriptor *> IgModuleDescriptor::m_children [private] |
Definition at line 49 of file IgModuleDescriptor.h.
Referenced by addChild(), child(), children(), and ~IgModuleDescriptor().
IgModuleDescriptor* IgModuleDescriptor::m_parent [private] |
Definition at line 48 of file IgModuleDescriptor.h.
Referenced by IgModuleDescriptor(), and parent().
std::vector<std::string> IgModuleDescriptor::m_tokens [private] |
Definition at line 50 of file IgModuleDescriptor.h.
Referenced by addToken(), dup(), IgModuleDescriptor(), token(), and tokens().