Reflection would be really nice

Dan murpsoft at hotmail.com
Thu Apr 19 08:09:16 PDT 2007


Frank Benoit (keinfarbton) Wrote (MODIFIED BY ME)
> struct ClassInfo{
> 	Field[] fields;
> 	Method[] methods;
> 	Constructors[] constructors;
> 	static ClassInfo[] allClasses; // probably the most important
> }
> 
> struct Field{
> 	uint offset;
> 	TypeInfo type;
> 	Attribute[] attribs;
> 	char[] name;
> 	void* getPtr( Object* obj );
> }
> struct Parameter{
> 	char[] name;
> 	TypeInfo type;
> 	Attribute[] attribs;
> }
> struct Method{
> 	uint offset;
> 	TypeInfo ret_type;
> 	Attribute[] attribs;
> 	char[] name;
> 	Parameter[] params;
> 	void* getPtr( Object* obj = null );
> }
> struct Constructor{
> 	Attribute[] attribs;
> 	char[] name;
> 	void* getPtr();
> 	Parameter[] params;
> }

That's simpler (inside)   : )



More information about the Digitalmars-d mailing list