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. 【Python】下载图片

    import requests import bs4 import urllib.request import urllib import os hdr = {'User-Agent': 'Mozil ...

  2. navicat如何设置外键

    今天上午刚刚弄明白了在navicat for mysql上如何设置外键,现在分享出来,希望能够对大家有帮助. 先介绍一下基本情况.现在有两个表一张是teacher表一张是dept表,现在我想把teac ...

  3. 日志组件logback的介绍及配置使用方法(二)

    四.Logback的默认配置 如果配置文件 logback-test.xml 和 logback.xml 都不存在,那么 logback 默认地会调用BasicConfigurator ,创建一个最小 ...

  4. Vijos1891 学姐的逛街计划 【费用流】*

    Vijos1891 学姐的逛街计划 描述 doc 最近太忙了, 每天都有课. 这不怕, doc 可以请假不去上课. 偏偏学校又有规定, 任意连续 n 天中, 不得请假超过 k 天. doc 很忧伤, ...

  5. FirstTry_HelloWorld

    #include <qapplication.h> #include <qpushbutton.h> int main( int argc, char **argv ) { Q ...

  6. Sprint第一个冲刺(第七天)

       今天休息. 燃尽图:

  7. 纯 as3 项目中引用 fl 包下的类

    如果安装了 Flash IDE, 将下面的文件添加到项目的 libs 中即可:D:\Program Files\Adobe\Adobe Flash CS6\Common\Configuration\A ...

  8. Java 设计模式之抽象工厂模式(三)

    原文地址:Java 设计模式之抽象工厂模式(三) 博客地址:http://www.extlight.com 一.前言 上篇文章 <Java 设计模式之工厂模式(二)>,介绍了简单工厂模式和 ...

  9. linux 定时任务 Crond Crontab

    定时任务http://www.cnblogs.com/chensiqiqi/p/6367890.html http://www.cnblogs.com/chensiqiqi/p/6389611.htm ...

  10. UVALive7261(2015ACM/ICPC北京赛区现场赛A)

    题目链接:https://icpcarchive.ecs.baylor.edu/index.php?option=com_onlinejudge&Itemid=8&page=show_ ...