mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-22 21:24:41 +02:00
parent
b1ddc71925
commit
b5b56e5438
@ -46,6 +46,7 @@ struct Field
|
|||||||
class I2_BASE_API Type
|
class I2_BASE_API Type
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
virtual Type *GetBaseType(void) const = 0;
|
||||||
virtual int GetFieldId(const String& name) const = 0;
|
virtual int GetFieldId(const String& name) const = 0;
|
||||||
virtual Field GetFieldInfo(int id) const = 0;
|
virtual Field GetFieldInfo(int id) const = 0;
|
||||||
virtual int GetFieldCount(void) const = 0;
|
virtual int GetFieldCount(void) const = 0;
|
||||||
|
@ -92,6 +92,20 @@ void ClassCompiler::HandleClass(const Klass& klass, const ClassDebugInfo& locp)
|
|||||||
<< "{" << std::endl
|
<< "{" << std::endl
|
||||||
<< "public:" << 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 */
|
/* GetFieldId */
|
||||||
std::cout << "\t" << "virtual int GetFieldId(const String& name) const" << std::endl
|
std::cout << "\t" << "virtual int GetFieldId(const String& name) const" << std::endl
|
||||||
<< "\t" << "{" << std::endl
|
<< "\t" << "{" << std::endl
|
||||||
|
Loading…
x
Reference in New Issue
Block a user