/runtime/classinfo.d

http://github.com/wilkie/djehuty · D · 39 lines · 23 code · 10 blank · 6 comment · 0 complexity · 1762c6389ba5b7b975a4e6addac8a40a MD5 · raw file

  1. module runtime.classinfo;
  2. import core.string;
  3. import core.definitions;
  4. // Description: The information stored for a class. Retrieved via the .classinfo property.
  5. // It is stored as the first entry in the class' vtbl[].
  6. class ClassInfo {
  7. byte[] init;
  8. string name;
  9. void*[] vtbl;
  10. Interface[] interfaces;
  11. ClassInfo base;
  12. void function() destructor;
  13. void function(Object) classInvariant;
  14. uint flags;
  15. void function() deallocator;
  16. OffsetTypeInfo[] offTi;
  17. Object function() defaultConstructor;
  18. TypeInfo typeinfo;
  19. static ClassInfo find(string classname) {
  20. // Loop through every module
  21. // Then loop through every class
  22. // Trying to find the class
  23. return null;
  24. }
  25. Object create() {
  26. // Class factory
  27. return null;
  28. }
  29. }