acronis2000
Junior Member | Редактировать | Профиль | Сообщение | Цитировать | Сообщить модератору Добрый день. Подскажите как код на Delphi написать на C++ Builder Delphi------------------------------ var Items : TdOPCHDAItems; HDAItem : string; begin HDAItem := eItemId.Text; Items := TdOPCHdaItems.Create(OPCServer); Items.AddItem(HDAItem); C++ Builder ---------------------- TdOPCHDAServer * OPCServer; TdOPCHDAItems * Items ; Items->???? Как ассоциировать (назначить) Items с сервером OPCServer ? в Delphi есть Create у TdOPCHdaItems, а в C++ нет ! описание класса из исходников #pragma pack(push,4) class PASCALIMPLEMENTATION TdOPCHDAItems : public System::Classes::TList { typedef System::Classes::TList inherited; public: TdOPCHDAItem* operator[](int index) { return this->Items[index]; } private: unsigned fCancelID; bool fSkipRepeatedValues; HIDESBASE TdOPCHDAItem* __fastcall Get(int index); HIDESBASE void __fastcall Put(int index, TdOPCHDAItem* obj); public: TdOPCHDAServer* HdaServer; HRESULT __fastcall SyncReadRaw(System::TDateTime StartTime, System::TDateTime EndTime, unsigned NumValues, System::LongBool bBounds); HRESULT __fastcall SyncReadProcessed(System::TDateTime StartTime, System::TDateTime EndTime, double ResampleIntervalSeconds); HRESULT __fastcall SyncReadAtTime(TDateTimeList* TimeStampList); HRESULT __fastcall SyncReadModified(System::TDateTime StartTime, System::TDateTime EndTime, unsigned NumValues); HRESULT __fastcall SyncUpdateDeleteRaw(System::TDateTime StartTime, System::TDateTime EndTime); HRESULT __fastcall SyncAnnotationsRead(System::TDateTime StartTime, System::TDateTime EndTime); HRESULT __fastcall SyncAnnotationsInsert(void); HRESULT __fastcall AsyncReadRaw(System::TDateTime StartTime, System::TDateTime EndTime, unsigned NumValues, System::LongBool bBounds, unsigned UserData = (unsigned)(0x0)); HRESULT __fastcall AsyncAdviseRaw(System::TDateTime StartTime, double IntervalSeconds, unsigned UserData = (unsigned)(0x0)); HRESULT __fastcall AsyncReadProcessed(System::TDateTime StartTime, System::TDateTime EndTime, double ResampleIntervalSeconds, unsigned UserData = (unsigned)(0x0)); HRESULT __fastcall AsyncAdviseProcessed(System::TDateTime StartTime, double IntervalSeconds, unsigned NumIntervals, unsigned UserData = (unsigned)(0x0)); HRESULT __fastcall AsyncReadAtTime(TDateTimeList* TimeStampList, unsigned UserData = (unsigned)(0x0)); HRESULT __fastcall AsyncReadModified(System::TDateTime StartTime, System::TDateTime EndTime, unsigned NumValues, unsigned UserData = (unsigned)(0x0)); HRESULT __fastcall AsyncReadCancel(unsigned CancelID); HRESULT __fastcall AsyncUpdateDeleteRaw(System::TDateTime StartTime, System::TDateTime EndTime, unsigned UserData = (unsigned)(0x0)); HRESULT __fastcall AsyncUpdateCancel(unsigned CancelID); HRESULT __fastcall AsyncAnnotationsRead(System::TDateTime StartTime, System::TDateTime EndTime, unsigned UserData = (unsigned)(0x0)); HRESULT __fastcall AsyncAnnotationsInsert(unsigned UserData = (unsigned)(0x0)); HRESULT __fastcall AsyncAnnotationsCancel(unsigned CancelID); HRESULT __fastcall PlaybackReadRawWithUpdate(System::TDateTime StartTime, System::TDateTime EndTime, unsigned NumValues, double DurationSeconds, double IntervalSeconds, unsigned UserData = (unsigned)(0x0)); HRESULT __fastcall PlaybackReadProcessedWithUpdate(System::TDateTime StartTime, System::TDateTime EndTime, double ResampleIntervalSeconds, unsigned NumValues, double IntervalSeconds, unsigned UserData = (unsigned)(0x0)); HRESULT __fastcall PlaybackCancel(unsigned CancelID); __property unsigned CancelID = {read=fCancelID, nodefault}; __property TdOPCHDAItem* Items[int index] = {read=Get, write=Put/*, default*/}; HIDESBASE int __fastcall Add(TdOPCHDAItem* obj); TdOPCHDAItem* __fastcall AddItem(System::UnicodeString ItemId); virtual void __fastcall Clear(void); __fastcall TdOPCHDAItems(TdOPCHDAServer* dOPCHDAServer); __fastcall virtual ~TdOPCHDAItems(void); __property bool SkipRepeatedValues = {read=fSkipRepeatedValues, write=fSkipRepeatedValues, nodefault}; }; | Всего записей: 164 | Зарегистр. 18-10-2005 | Отправлено: 08:52 11-01-2018 | Исправлено: acronis2000, 08:55 11-01-2018 |
|