mirror of https://github.com/Icinga/icinga2.git
parent
b1ddc71925
commit
b5b56e5438
|
@ -46,6 +46,7 @@ struct Field
|
|||
class I2_BASE_API Type
|
||||
{
|
||||
public:
|
||||
virtual Type *GetBaseType(void) const = 0;
|
||||
virtual int GetFieldId(const String& name) const = 0;
|
||||
virtual Field GetFieldInfo(int id) const = 0;
|
||||
virtual int GetFieldCount(void) const = 0;
|
||||
|
|
|
@ -92,6 +92,20 @@ void ClassCompiler::HandleClass(const Klass& klass, const ClassDebugInfo& locp)
|
|||
<< "{" << std::endl
|
||||
<< "public:" << std::endl;
|
||||
|
||||
/* GetBaseType */
|
||||
std::cout << "\t" << "virtual Type *GetBaseType(void) const" << std::endl
|
||||
<< "\t" << "{" << std::endl;
|
||||
|
||||
std::cout << "\t\t" << "return ";
|
||||
|
||||
if (!klass.Parent.empty())
|
||||
std::cout << "Singleton<TypeImpl<" << klass.Parent << "> >::GetInstance()";
|
||||
else
|
||||
std::cout << "NULL";
|
||||
|
||||
std::cout << ";" << std::endl
|
||||
<< "\t" << "}" << std::endl << std::endl;
|
||||
|
||||
/* GetFieldId */
|
||||
std::cout << "\t" << "virtual int GetFieldId(const String& name) const" << std::endl
|
||||
<< "\t" << "{" << std::endl
|
||||
|
|
Loading…
Reference in New Issue