C++Builder Programming Forum
C++Builder  |  Delphi  |  FireMonkey  |  C/C++  |  Free Pascal  |  Firebird
볼랜드포럼 BorlandForum
 경고! 게시물 작성자의 사전 허락없는 메일주소 추출행위 절대 금지
C++빌더 포럼
Q & A
FAQ
팁&트릭
강좌/문서
자료실
컴포넌트/라이브러리
메신저 프로젝트
볼랜드포럼 홈
헤드라인 뉴스
IT 뉴스
공지사항
자유게시판
해피 브레이크
공동 프로젝트
구인/구직
회원 장터
건의사항
운영진 게시판
회원 메뉴
북마크
볼랜드포럼 광고 모집

C++빌더 Q&A
C++Builder Programming Q&A
[63779] Re:델파이 -> C++ 변경 방법
장성호 [nasilso] 1185 읽음    2011-02-21 14:42
대충 다음과 같이 될것 같습니다.
TAppViewerFunc = Procedure(Data : String); stdcall; 
property Ini: rTIni read FIni write SetIni;          
property Items[Index: integer] : TMyCollectionItem read GetItem write SetItem; 



//1번
typedef void __stdcall ( *TAppViewerFunc)(String Data);
//2번
__property rTIni* Ini = {read=FIni,write=SetIni};
//3번
__property TMyCollectionItem* Items[int Index]={read=GetItem,write=SetItem};


그럼..

김종철 님이 쓰신 글 :
: 아래의 델파이 소스를 C++빌더로 변경하는 중입니다.
:
: 그런데 아래의 3군데는 변경방법을 모르겠네요
:
: 아시는 분은 부족한 저에게 도움을 주세요~
:
: 부탁드립니다 ^^
:
:
: unit Unit_IniCompare;
:
: interface
:
: uses
:   Windows, Classes, SysUtils, StdCtrls, Dialogs;
:
: const
:    MAX_SECTION = 500;   //Total Section Count
:    MAX_KEY_VALUE = 500;  //(Key/Value Count)/1Section
:
: type         //r : record
:   rTSection = record
:     Name : String;
:     KeyCount : Integer;
:     Key : array of String;
:     Value_ : array of String;
:   end;
:
:   rTIni = record
:     Name : String;
:     Path : String;
:     SectionCount : Byte;
:     Section : array of rTSection;
:   end;
:
: TAppViewerFunc = Procedure(Data : String); stdcall;             <----------------------- 1번째
:  
: type
:   TMyCollectionItem = class(TCollectionItem)
:   private
:     FIni : rTIni;
:     FSectionCount : Integer;
:     FKeyCount : Integer;
:     procedure SetIni(const AIni : rTIni);
:   public
:     procedure AssignParameter(const AIni: rTIni); virtual;
:   published
:     property Ini: rTIni read FIni write SetIni;                     <-------------------------2번째
:     property SectionCount: Integer read FSectionCount write FSectionCount;
:     property KeyCount: Integer read FKeyCount write FKeyCount;
:   end;
:
:   TINILogCollection = class(TCollection)
:   private
:     mLogPath: String;
:     mLogFileHeader: String;
:
:     procedure Compare(User: String; OldItemsIndex, NewItemsIndex: Integer);
:   protected
:     function GetItem(Index: integer): TMyCollectionItem; virtual;
:     procedure SetItem(Index: integer; Value: TMyCollectionItem); virtual;
:     function IndexOf(const AIni : rTIni): integer; virtual;
:   public
:     constructor Create(LogPath: String; LogFileHeader:String);
:     function Add: TMyCollectionItem;
:     procedure AddParameter(const AIni : rTIni);
:     procedure DeleteParameter(const AIni : rTIni);
:     procedure AddData(const FilePath : String);
:     procedure CompareItems(User: String);
:     procedure AddLog(LogData: String);
:     property Items[Index: integer] : TMyCollectionItem read GetItem write SetItem;   <------------3번째
:   published
:   end;
:
:
: implementation
:
: var
:   AppViewerFunc : TAppViewerFunc;

+ -

관련 글 리스트
63778 델파이 -> C++ 변경 방법 김종철 942 2011/02/21
63779     Re:델파이 -> C++ 변경 방법 장성호 1185 2011/02/21
Google
Copyright © 1999-2015, borlandforum.com. All right reserved.