Definition of a new collection class managed by Handle

 

It is necessary to provide relevant statements both in the header ( .hxx file) and the C++ source ( .cxx file).

Header file MyPackage_HSequenceOfPnt.hxx:

 

#include <NCollection_DefineHSequence.hxx>

#include <gp_Pnt.hxx>

 

// The following line defines the class "base collection of points"

DEFINE_BASECOLLECTION(MyPackage_BaseCollPnt, gp_Pnt)

// The following line defines the class MyPackage_SequenceOfPnt

 

DEFINE_SEQUENCE (MyPackage_SequenceOfPnt, MyPackage_BaseCollPnt, gp_Pnt)

 

// The following line defines the classes MyPackage_HSequenceOfPnt

// and Handle(MyPackage_HSequenceOfPnt)

 

DEFINE_HSEQUENCE (MyPackage_HSequenceOfPnt, MyPackage_SequenceOfPnt)

Source code file MyPackage_HSequenceOfPnt.cxx or any other .cxx file (once in the whole project):

IMPLEMENT_HSEQUENCE (MyPackage_HSequenceOfPnt)