00001 /* Copyright (c) 2005, Gennady Bystritsky <bystr@mac.com> 00002 * 00003 * Distributed under the MIT Licence. 00004 * This is free software. See 'LICENSE' for details. 00005 * You must read and accept the license prior to use. 00006 */ 00007 00008 #ifndef _SK_UTIL_CLASS_ 00009 #define _SK_UTIL_CLASS_ 00010 00011 #include <sk/util/Object.h> 00012 #include <sk/util/String.h> 00013 #include <sk/util/Method.h> 00014 00015 namespace sk { 00016 namespace util { 00017 class Class 00018 : public virtual sk::util::Object 00019 { 00020 public: 00021 Class(const sk::util::String& name); 00022 virtual ~Class(); 00023 00024 const sk::util::String getName() const; 00025 const sk::util::Method getMethod(const sk::util::String& name) const; 00026 const sk::util::Method getClassMethod(const sk::util::String& name) const; 00027 00028 // sk::util::Object re-implementation. 00029 const sk::util::Class getClass() const; 00030 const sk::util::String toString() const; 00031 const sk::util::String inspect() const; 00032 00033 private: 00034 Class& operator = (const Class& other); 00035 00036 const sk::util::String _name; 00037 }; 00038 } 00039 } 00040 00041 #define SK_METHOD (__class.getMethod(__FUNCTION__).getName()) 00042 #define SK_CLASS_METHOD (__class.getMethod(__FUNCTION__).getName()) 00043 00044 #endif /* _SK_UTIL_CLASS_ */