⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 basicclass.m

📁 这个是LINUX下的GDB调度工具的源码
💻 M
字号:
#include <objc/Object.h>@interface BasicClass: Object{  id object;}+ newWithArg: arg;- doIt;- takeArg: arg;- printHi;- (int) printNumber: (int)number;- (const char *) myDescription;@end@interface BasicClass (Private)- hiddenMethod;@end@implementation BasicClass+ newWithArg: arg{  id obj = [self new];  [obj takeArg: arg];  return obj;}- doIt{  return self;}- takeArg: arg{  object = arg;  [self hiddenMethod];  return self;}- printHi{  printf("Hi\n");  return self;}- (int) printNumber: (int)number{  printf("%d\n", number);  return number+1;}- (const char *) myDescription{  return "BasicClass gdb test object";}@end@implementation BasicClass (Private)- hiddenMethod{  return self;}@endint main (int argc, const char *argv[]){  id obj;  obj = [BasicClass new];  [obj takeArg: obj];  return 0;}const char *_NSPrintForDebugger(id object){  /* This is not really what _NSPrintForDebugger should do, but it     is a simple test if gdb can call this function */  if (object && [object respondsTo: @selector(myDescription)])    return [object myDescription];  return NULL;}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -