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. 新手向——关于Python3.5在Windows 10 系统下发布模块的终极讲解

    博主自己在发布Python模块的时候也是摸索了好久啊,因为跟着书上写的步骤一步一步来终究会跪的节奏有木有啊!!!几经波折终于搞出来了,贴下来与诸君共勉.之前的步骤相信大家都已经知道了,那我们就直接跳过 ...

  2. onenote的笔记本在windows10保存的路径

    onenote挺好用的,支持windows,android,mac等操作系统,完全符合我的需求,并且还没有广告.但是,在删除笔记本的时候,感觉比较费事,因为他没有配置告诉我们文件具体放在哪个路径下了, ...

  3. Jmeter简单的接口测试

    1.新建线程组 2.编辑线程组信息 3.在线程组中添加HTTP信息头管理器 4.配置HTTP信息头管理器 参数格式配置 5.在线程组中添加HTTP请求 6.编辑HTTP请求信息 7.添加响应断言 8. ...

  4. springmvc+mybatis+redis实现查询插入操作

    最近在学习redis,虽然现在还不是很熟练.不过可以进行简单的框架整合开发. IDE:我使用的是IDEA.springmvc+spring+mybatis的整合这个我就不多说了,下面我们先进行这块的整 ...

  5. Codeforces 834D The Bakery 【线段树优化DP】*

    Codeforces 834D The Bakery LINK 题目大意是给你一个长度为n的序列分成k段,每一段的贡献是这一段中不同的数的个数,求最大贡献 是第一次做线段树维护DP值的题 感觉还可以, ...

  6. 迫不及待地体验了一把 C#8.0 中的可空引用类型(Nullable Reference)

    在我之前的一篇博客 NullReferenceException,就不应该存在! 中,我吐槽了 C# 中 null 的弊端以及避免 null 的方法:事实上这本都是现代高级语言中极力推崇的做法.Kot ...

  7. NET Core 2.2

    .NET Core 2.2 新增部分功能使用尝鲜 https://www.cnblogs.com/viter/p/10070248.html 前言     美国当地时间12月4日,微软2019开发者大 ...

  8. {Reship}{Meanshift}Mean Shift Tracking: 2000-2012回顾

    Mean Shift跟踪从 2000年被提出至今已经经历了十余个年头,从被大量灌水到如今不屑被拿来作为比较算法,经历了辉煌高潮的 Mean-Shift based Tracking正在慢慢淡出主流tr ...

  9. 第一次Sprint团队贡献分

    201406114105       董婷婷           21 201406114157       容杰龙           22 201406114343       卓炜杰       ...

  10. [LeetCode系列]爬梯问题的递归解法转换为迭代解法

    有一个n阶的梯子, 你每次只能爬1阶或2阶, 请问共有多少种登顶的爬法?(正好爬完n阶, 不能多也不能少) 本题最优解是直接套用菲波那切数列即可(因为菲波那切数列的第n个元素正好等于第n-1个元素和第 ...