I am trying to convert a few C++ Header files to Delphi. Is there a
tool that can do that? I came across HeadConv from Dr. Bob, but I am
not sure how to use it since it seems to only do that for DLL files. An
example of this header file is as follows:
Any help is greatly appreciated.
Jim
class TDescContainer
{
public:
struct descContainer
{
keypointsData kp;
TIERectangle rect;
};
TDescContainer(void) {CellSize = 0; Cell = 0;}
virtual ~TDescContainer(void) {ClearCells(); }
void ClearCells(void)
{
if (Cell)
{
for (int i = 0; i < CellSize; i++)
{
delete []Cell[i].kp.Data;
Cell[i].kp.Data = 0;
}
delete []Cell;
}
Cell = 0;
CellSize = 0;
}
void CreateCells(int size)
{
ClearCells();
CellSize = size;
Cell = new descContainer[size];
for (int i = 0; i < CellSize; i++)
{
Cell[i].kp.Data = 0;
Cell[i].kp.Count = 0;
}
}
void CreateData(int cIndex, int size)
{
if (Cell[cIndex].kp.Data)
delete [] Cell[cIndex].kp.Data;
Cell[cIndex].kp.Data = new keypoint[size];
Cell[cIndex].kp.Count = size;
}
descContainer *Cell;
int CellSize;
};
class TMatchContainer
{
public:
struct matchContainer
{
matchData md;
TIERectangle rect;
};
TMatchContainer(void) {CellSize = 0; Cell = 0; OffsetX = 0; }
virtual ~TMatchContainer(void) {ClearCells(); }
void ClearCells(void)
{
if (Cell)
{
for (int i = 0; i < CellSize; i++)
{
delete []Cell[i].md.Data;
Cell[i].md.Data = 0;
}
delete []Cell;
}
Cell = 0;
CellSize = 0;
OffsetX = 0;
}
void CreateCells(int size, int offsetX)
{
ClearCells();
OffsetX = offsetX;
CellSize = size;
Cell = new matchContainer[size];
for (int i = 0; i < CellSize; i++)
{
Cell[i].md.Data = 0;
Cell[i].md.Count = 0;
}
}
void CreateData(int cIndex, int size)
{
if (Cell[cIndex].md.Data)
delete [] Cell[cIndex].md.Data;
Cell[cIndex].md.Data = new matchings[size];
Cell[cIndex].md.Count = size;
}
matchContainer *Cell;
int CellSize;
int OffsetX;
};
class TAssistorBasic
{
protected:
TImageEnVect *_paint;
int *_hAssistorObject, _hAssistorSize, _hAssistorIndex;
int _boxID;
TAssistorType _assType;
public:
TAssistorBasic(TImageEnVect *paint);
virtual ~TAssistorBasic(void);
//
virtual void Add(int hobj, bool anchorToLayer = true);
virtual void Delete(void);
virtual void Create(int rows, int cols, int penSize, TColor
penColor);
virtual void Create(TDescContainer &dscC, int sigma, int
penSize, TColor penColor);
virtual void Create(TMatchContainer &matC, int index, int
penSize, TColor penColor);
virtual int Load(TDescContainer &dscC, int penSize, TColor
penColor, TColor brushColor);
virtual void PrepareAddObject(int penSize, TColor penColor,
TColor brushColor);
virtual void PrepareMoveObject(void);
virtual void DeleteObject(void);
virtual void Hide(bool full = false);
virtual void Show(bool full = false);
virtual TIERectangle GetObjRect(int val);
// properites
__property int Size = {read = _hAssistorSize};
__property int *Object = {read = _hAssistorObject};
__property TAssistorType Type = {read = _assType};
};
Connect with Us