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. CF1130E Wrong Answer

    E Wrong Answer 注意到 \(n\geq 2\) 时才可能有解,可以按如下方式构造一个 \(a_{1,2\dots n}\): 令 \(a_1=-1\) ,而后面的数都为正.记 \(s=\ ...

  2. 不再为命名而苦恼!使用 MSTestEnhancer 单元测试扩展,写契约就够了

    有没有觉得命名太难?有没有觉得单元测试的命名更难?没错,你不是一个人!看看这个你就知道了:程序员最头疼的事:命名 或它的英文原文 Don’t go into programming if you do ...

  3. grpc rust 项目基本使用

    1. 安装依赖(rust 基本依赖就不说了,需要配置环境变量) protoc 参考: https://github.com/google/protobuf/releases/tag/v3.5.1 2. ...

  4. 【剑指offer】Q14:调整数组顺序使奇数位于偶数前面

    def isOdd(n): return n & 1 def Reorder(data, cf = isOdd): odd = 0 even = len( data ) - 1 while T ...

  5. SQL的 like 中间字符通配 用法

    中间的字符也可以用通配符匹配如果业务需求是找出某表中某字段是“好*****上”的数据,SQL语句应该写成 select * from Table where UserName like '%好%上%' ...

  6. 我的 Git 学习过程

    我的 Git 学习过程 有 SVN 使用基础. 开始使用 FastAdmin 后正式使用 Git. 找了一篇廖雪峰的 <Git 教程> 找到一个在线学习 Git 的教程 https://l ...

  7. bzoj 1070 [SCOI2007]修车——网络流(拆边)

    题目:https://www.lydsy.com/JudgeOnline/problem.php?id=1070 后面还有几辆车在这个人这儿修,自己这辆车的时间对总时间的贡献就要多乘上几倍. 所以可以 ...

  8. bzoj 4552 [Tjoi2016&Heoi2016]排序——二分答案

    题目:https://www.lydsy.com/JudgeOnline/problem.php?id=4552 二分答案,把 >= mid 的设成1.< mid 的设成0,之后排序就变成 ...

  9. jQuery 性能优化技巧

    原文地址:jQuery 性能优化技巧 博客地址:http://www.extlight.com 一.使用最新版本 jQuery 类库 二.合理使用选择器 # 推荐使用 $("#id" ...

  10. C语言实现简单的单向链表(创建、插入、删除)及等效STL实现代码

    实现个算法,懒得手写链表,于是用C++的forward_list,没有next()方法感觉很不好使,比如一个对单向链表的最简单功能要求: input: 1 2 5 3 4 output: 1-> ...