d2c_openarray

Top  Previous  Next

Pretranslated C++ code > Delphi RTL/VCL > C++ code for C++Builder > d2c_openarray

d2c_openarray contains Delphi2Cpp II helper code for open array parameters. The C++Builder OPENARRAY macro is used to pass an array of values on the fly. In addition Delphi2Cpp II provides an extended class OpenArrayEx by which dynamic and fixed arrays can be passed where a function expects an open array parameter. In addition there are cases, where open arrays are passed as var-parameters. Strings, SmallStrings, and fixed arrays con be passed to such parameters as well as dynamic arrays. For that case Delphi2Cpp II uses a special template type OpenArrayRef, which is defined in d2c_openarray.

 

 

       template <class T>

       class OpenArrayEx

       {

       public:

 

               __fastcall OpenArrayEx(const DynamicArray<T>& src); 

               __fastcall OpenArrayEx(const T* pArr, int Count);

               template <class InputIterator> __fastcallOpenArrayEx(InputIterator first, InputIterator last); 

               

               ...

       };

 

 

       template <class T>

       class OpenArrayRef

       {

       public:

               __fastcall OpenArrayRef(DynamicArray<T>& arr); 

               __fastcall OpenArrayRef(std::basic_string<T>& s);

               

               ...

       };

 

 



This page belongs to the DelphiXE2Cpp11 Documentation

DelphiXE2Cpp11 home  Content