Templates and Containers ??

Hello, I was just wondering why Cas.Cade doesn't offer Template Classes and Containers such as Lists, Maps, etc.. I know that with some little work we can take the data structure of Top_Tools and we can manage to make our own data structure. But this is not true all the time. For example i tried creating a TopTools_Array of a Class that inherits from MFC CObject. It didn't work.

There is no complaint just a question to know how Cas.Cade's architecture was thought. This could help people use it better this way i think Best regards Omar Msaaf

Arnaud Magnier's picture

Open CASCADE delivers template classes in the TCollection package. As an exemple, you will find the templates of :

- Arrays (1 and 2 dimension),

- Stack, Queue,

- List, Sequence, Set,

- Map, DataMap, DoubleMap, IndexedMap, IndexedDataMap.

Moreover, some packages contains classes instanciating these templates, such as :

- TColStd for basic types (real, integer, boolean, etc.),

- TColgp for basic geometries defined in the gp package,

- TColGeom for 3D geometries defined in the Geom package,

- TColGeom2d for 2D geometries defined in the Geom2d package,

- TopTools for topologies defined in the TopoDS package,

- etc.