ojective-c convert to pascal pattern

http://www.cnblogs.com/cnsoft/archive/2013/06/09/3128619.html

Case I. Simple Class

Objective-C

XE4

// Protocol

@protocol mycalcEvent

- (void) oncalcEventA : (int) inx ext1:(int) extInx1;

- (void) oncalcEventB : (int) inx ext1:(int) extInx1;

@end

// ObjC Class : mycalc -------

@interface mycalc : NSObject {

BOOL busy;

//

id <mycalcEvent> delegate;

}

- (void) setDelegate:(id) delegate;

- (int) calc : (int) value;

@property (nonatomic, assign) id delegate;

@end

// User Protocol -----------------------------------------------

mycalcEvent = interface(IObjectiveC)

procedure oncalcEventA(inx :Integer; ext1 : Integer); cdecl;

procedure oncalcEventB(inx :Integer; ext1 : Integer); cdecl;

end;

//

TmycalcEvent = class(TOCLocal,mycalcEvent)

private

public

procedure oncalcEventA(inx :Integer; ext1 : Integer); cdecl;

procedure oncalcEventB(inx :Integer; ext1 : Integer); cdecl;

end;

 // mycalc Class  --------------------------------------------

mycalc = interface(NSObject)

function  calc        ( value : integer) : integer; cdecl;

procedure setDelegate ( adelegate : pointer ); cdecl;

end;

//

MycalcClass  = interface(NSObjectClass) end;

TMycalc = class(TOCGenericImport<MyCalcClass, mycalc>) end;

Never giveup. Thanks the world.
http://stackoverflow.com/questions/16522403/how-to-convert-objective-c-property-to-delphi-xe3

ojective-c convert to pascal pattern的更多相关文章

  1. php读取excel文档内容(转载)

    入到数据库的需要,php-excel-reader可以很轻松的使用它读取excel文件,本文将详细介绍,需要了解的朋友可以参考下   php开发中肯定会遇到将excel文件内容导入到数据库的需要,ph ...

  2. 第三十二节,使用谷歌Object Detection API进行目标检测、训练新的模型(使用VOC 2012数据集)

    前面已经介绍了几种经典的目标检测算法,光学习理论不实践的效果并不大,这里我们使用谷歌的开源框架来实现目标检测.至于为什么不去自己实现呢?主要是因为自己实现比较麻烦,而且调参比较麻烦,我们直接利用别人的 ...

  3. Comparing Two High-Performance I/O Design Patterns--reference

    by Alexander Libman with Vladimir GilbourdNovember 25, 2005 Summary This article investigates and co ...

  4. [转]Design Pattern Interview Questions - Part 2

    Interpeter , Iterator , Mediator , Memento and Observer design patterns. (I) what is Interpreter pat ...

  5. SCALA XML pattern attrbute(属性)

    from: Working with Scala's XML Support 虽然这个guy炒鸡罗嗦,但是还是讲到我要的那句话:  Because Scala doesn't support XML ...

  6. How to convert any valid date string to a DateTime.

    DateTimeFormatInfo pattern = new DateTimeFormatInfo() { ShortDatePattern = "your date pattern&q ...

  7. A Simple C++ Template Class that Matches a String to a Wildcard Pattern

    A recently implemented enhanced wildcard string matcher, features of which including, Supporting wil ...

  8. 深入浅出设计模式——适配器模式(Adapter Pattern)

    模式动机 在软件开发中采用类似于电源适配器的设计和编码技巧被称为适配器模式. 通常情况下,客户端可以通过目标类的接口访问它所提供的服务.有时,现有的类可以满足客户类的功能需要,但是它所提供的接口不一定 ...

  9. 深入浅出设计模式——策略模式(Strategy Pattern)

    模式动机 完成一项任务,往往可以有多种不同的方式,每一种方式称为一个策略,我们可以根据环境或者条件的不同选择不同的策略来完成该项任务.在软件开发中也常常遇到类似的情况,实现某一个功能有多个途径,此时可 ...

随机推荐

  1. ranch分析学习(一)

    Ranch 是一个tcp处理的程序框架.官方的解释  Ranch is a socket acceptor pool for TCP protocols. 主要目的是提供一个方便,易用,高效,稳定的t ...

  2. 原生js实现div拖拽

    十分简单的效果. <!DOCTYPE html> <html> <head> <meta charset="utf-8"> < ...

  3. 解决 git 错误 error: RPC failed; curl 56 OpenSSL SSL_read: SSL_ERROR_SYSCALL, errno 11

    环境 Windows 7 . git push 时出现错误,无法提交代码到远程仓库. Counting objects: , done. Delta compression using up to t ...

  4. Codeforces 17E Palisection 【Manacher】

    Codeforces 17E Palisection E. Palisection In an English class Nick had nothing to do at all, and rem ...

  5. CH1803 City Game

    题意 这片土地被分成NM个格子,每个格子里写着'R'或者'F',R代表这块土地被赐予了rainbow,F代表这块土地被赐予了freda. 现在freda要在这里卖萌...它要找一块矩形土地,要求这片土 ...

  6. pymongo和mongodbengine之间的区别

    pymongo是一个mongo driver,可以用来连接数据库以及对数据库进行操作,但是是用mongo自己的用来操作数据库的语句进行操作数据库,而mongodbengine就像是sqlalchemy ...

  7. nginx 缓存处理

    核心指令   proxy_cache_path /data/nginx/cache/one levels=1:2 keys_zone=one:10m max_size=10g; proxy_cache ...

  8. Hibernate One-to-One Mappings 一对一关系映射

    Hibernate One-to-One Mappings 一对一关系映射 关键:一对一关系映射和多对一关系映射非常像.仅仅是unique 属性值为 true 样例:一个员工仅仅能有一个地址. Hib ...

  9. 12.Python使用requests发送post请求

    1.我们使用postman进行接口测试的时候,发现POST请求方式的编码有3种,具体的编码方式如下: A:application/x-www-form-urlencoded ==最常见的post提交数 ...

  10. Java语言与C语言混合编程(2)--在Java中调用C语言本地库

    在上一篇文章中介绍了Java语言中的native关键字,以及Java语言调用C语言的编译生成本地动态链接库(DLL)实现加法运算的小例子,本文通过一个更加详细的例子,深入讲解Java语言调用C语言的函 ...