Object.pkg 841 B

1234567891011121314151617181920212223242526
  1. $#include "Object.h"
  2. class Object : public RefCounted
  3. {
  4. StringHash GetType() const;
  5. StringHash GetBaseType() const;
  6. const String GetTypeName() const;
  7. const String GetCategory() const;
  8. tolua_outside void ObjectSendEvent @ SendEvent(const String eventName, VariantMap* eventData = 0);
  9. tolua_readonly tolua_property__get_set StringHash type;
  10. tolua_readonly tolua_property__get_set StringHash baseType;
  11. tolua_readonly tolua_property__get_set const String typeName;
  12. tolua_readonly tolua_property__get_set const String category;
  13. };
  14. ${
  15. static void ObjectSendEvent(Object* object, const String eventName, VariantMap* eventData = 0)
  16. {
  17. if (eventData)
  18. object->SendEvent(StringHash(eventName), *eventData);
  19. else
  20. object->SendEvent(StringHash(eventName));
  21. }
  22. $}