Open CASCADE Technology  6.5.4
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Protected Member Functions | Protected Attributes
TCollection_BaseSequence Class Reference

Definition of a base class for all instanciations
of sequence.

The methods : Clear, Remove accepts a pointer to a
function to use to delete the nodes. This allow
proper call of the destructor on the Items.
Without adding a virtual function pointer to each
node or each sequence.

#include <TCollection_BaseSequence.hxx>

Inherited by AdvApp2Var_SequenceOfNode, AdvApp2Var_SequenceOfPatch, AdvApp2Var_SequenceOfStrip, AdvApp2Var_Strip, AIS2D_SequenceOfIO, AIS2D_SequenceOfPrimArchit, AIS_SequenceOfDimension, AIS_SequenceOfInteractive, AppParCurves_SequenceOfMultiBSpCurve, AppParCurves_SequenceOfMultiCurve, Approx_SequenceOfHArray1OfReal, Aspect_SequenceOfColor, Aspect_SequenceOfColorMapEntry, Aspect_SequenceOfFontMapEntry, Aspect_SequenceOfMarkMapEntry, Aspect_SequenceOfTypeMapEntry, Aspect_SequenceOfWidthMapEntry, Blend_SequenceOfPoint, Bnd_SeqOfBox, BOP_SeqOfSeqOfShape, BOPTools_SequenceOfCurves, BOPTools_SequenceOfPaveBlock, BRepAlgo_SequenceOfSequenceOfInteger, BRepBlend_SequenceOfLine, BRepBlend_SequenceOfPointOnRst, BRepFill_SequenceOfEdgeFaceAndOrder, BRepFill_SequenceOfFaceAndOrder, BRepFill_SequenceOfSection, BRepMAT2d_SequenceOfBasicElt, BRepOffsetAPI_SequenceOfSequenceOfReal, BRepOffsetAPI_SequenceOfSequenceOfShape, BRepSweep_SequenceOfShapesOfNumLinearRegularSweep, ChFiDS_SequenceOfSpine, ChFiDS_SequenceOfSurfData, Contap_SequenceOfIWLineOfTheIWalkingOfContour, Contap_SequenceOfPathPointOfTheSearchOfContour, Contap_SequenceOfSegmentOfTheSearchOfContour, Contap_TheSequenceOfLineOfContour, Contap_TheSequenceOfPointOfContour, Convert_SequenceOfArray1OfPoles, Draw_SequenceOfDrawable3D, Dynamic_SeqOfClasses, Dynamic_SeqOfFuzzyDefinitions, Dynamic_SeqOfMethodDefinitions, Dynamic_SeqOfMethods, Expr_SequenceOfGeneralExpression, Expr_SequenceOfGeneralRelation, ExprIntrp_SequenceOfNamedExpression, ExprIntrp_SequenceOfNamedFunction, Extrema_SeqPCOfPCFOfEPCOfELPCOfLocateExtPC, Extrema_SeqPCOfPCFOfEPCOfELPCOfLocateExtPC2d, Extrema_SeqPCOfPCFOfEPCOfExtPC, Extrema_SeqPCOfPCFOfEPCOfExtPC2d, Extrema_SeqPCOfPCLocFOfLocEPCOfLocateExtPC, Extrema_SeqPCOfPCLocFOfLocEPCOfLocateExtPC2d, Extrema_SeqPOnCOfCCFOfECC2dOfExtCC2d, Extrema_SeqPOnCOfCCFOfECCOfExtCC, Extrema_SeqPOnCOfCCFOfELCC2dOfLocateExtCC2d, Extrema_SeqPOnCOfCCFOfELCCOfLocateExtCC, Extrema_SeqPOnCOfCCLocFOfLocECC2dOfLocateExtCC2d, Extrema_SeqPOnCOfCCLocFOfLocECCOfLocateExtCC, Extrema_SequenceOfPOnCurv, Extrema_SequenceOfPOnCurv2d, Extrema_SequenceOfPOnSurf, FEmTool_SeqOfLinConstr, Geom2dInt_SeqPCOfPCLocFOfTheLocateExtPCOfTheProjPCurOfGInter, Geom_SequenceOfBSplineSurface, Geom_SequenceOfSurface, GeomFill_SequenceOfTrsf, GeomInt_SequenceOfParameterAndOrientation, GeomPlate_SequenceOfAij, GeomPlate_SequenceOfCurveConstraint, GeomPlate_SequenceOfPointConstraint, Graphic2d_SequenceOfBuffer, Graphic2d_SequenceOfGraphicObject, Graphic2d_SequenceOfPolyline, Graphic2d_SequenceOfPrimitives, Graphic2d_SequenceOfVertex, Graphic3d_SequenceOfAddress, Graphic3d_SequenceOfGroup, Graphic3d_SequenceOfStructure, Hatch_SequenceOfLine, Hatch_SequenceOfParameter, HatchGen_Domains, HatchGen_PointsOnElement, HatchGen_PointsOnHatching, HLRBRep_SeqOfShapeBounds, HLRBRep_SeqPCOfPCLocFOfTheLocateExtPCOfTheProjPCurOfCInter, IFSelect_SequenceOfAppliedModifiers, IFSelect_SequenceOfGeneralModifier, IFSelect_SequenceOfInterfaceModel, IFSelect_TSeqOfDispatch, IFSelect_TSeqOfSelection, IntCurveSurface_SequenceOfPnt, IntCurveSurface_SequenceOfSeg, Interface_SequenceOfCheck, Intf_SeqOfSectionLine, Intf_SeqOfSectionPoint, Intf_SeqOfTangentZone, IntPatch_SequenceOfIWLineOfTheIWalking, IntPatch_SequenceOfLine, IntPatch_SequenceOfPathPointOfTheSOnBounds, IntPatch_SequenceOfPoint, IntPatch_SequenceOfSegmentOfTheSOnBounds, IntPoly_SequenceOfSequenceOfPnt, IntPoly_SequenceOfSequenceOfPnt2d, IntPolyh_SeqOfStartPoints, IntRes2d_SequenceOfIntersectionPoint, IntRes2d_SequenceOfIntersectionSegment, Intrv_SequenceOfInterval, IntSurf_SequenceOfCouple, IntSurf_SequenceOfInteriorPoint, IntSurf_SequenceOfPathPoint, IntSurf_SequenceOfPntOn2S, IntTools_SequenceOfCommonPrts, IntTools_SequenceOfCurves, IntTools_SequenceOfPntOn2Faces, IntTools_SequenceOfRanges, IntTools_SequenceOfRoots, LocOpe_SequenceOfCirc, LocOpe_SequenceOfLin, LocOpe_SequenceOfPntFace, LProp_SequenceOfCIType, MAT2d_SequenceOfConnexion, MAT2d_SequenceOfSequenceOfCurve, MAT2d_SequenceOfSequenceOfGeometry, MAT_SequenceOfArc, MAT_SequenceOfBasicElt, Materials_MtsSequence, MDF_ARDriverSequence, MDF_ASDriverSequence, MeshVS_SequenceOfPrsBuilder, Message_SequenceOfPrinters, Message_SequenceOfProgressScale, MFT_ListOfFontHandle, MoniTool_SequenceOfElement, NLPlate_SequenceOfHGPPConstraint, PCDM_SequenceOfDocument, PCDM_SequenceOfReference, Plate_SequenceOfLinearScalarConstraint, Plate_SequenceOfLinearXYZConstraint, Plate_SequenceOfPinpointConstraint, PlotMgt_ListOfPlotterParameter, ProjLib_SequenceOfHSequenceOfPnt, PrsMgr_Presentations, Select3D_SensitiveEntitySequence, SelectBasics_SequenceOfOwner, SelectMgr_SequenceOfFilter, SelectMgr_SequenceOfOwner, SelectMgr_SequenceOfSelection, SelectMgr_SequenceOfSelector, ShapeAnalysis_SequenceOfFreeBounds, ShapeFix_SequenceOfWireSegment, StepElement_SequenceOfCurveElementPurposeMember, StepElement_SequenceOfCurveElementSectionDefinition, StepElement_SequenceOfElementMaterial, StepElement_SequenceOfSurfaceElementPurposeMember, StepFEA_SequenceOfCurve3dElementProperty, StepFEA_SequenceOfElementGeometricRelationship, StepFEA_SequenceOfElementRepresentation, StepFEA_SequenceOfNodeRepresentation, StepRepr_SequenceOfMaterialPropertyRepresentation, StepRepr_SequenceOfRepresentationItem, STEPSelections_SequenceOfAssemblyComponent, STEPSelections_SequenceOfAssemblyLink, StlMesh_SequenceOfMesh, StlMesh_SequenceOfMeshDomain, StlMesh_SequenceOfMeshTriangle, Storage_SeqOfCallBack, Storage_SeqOfPersistent, Storage_SeqOfRoot, TColGeom2d_SequenceOfBoundedCurve, TColGeom2d_SequenceOfCurve, TColGeom2d_SequenceOfGeometry, TColGeom_SequenceOfBoundedCurve, TColGeom_SequenceOfBoundedSurface, TColGeom_SequenceOfCurve, TColGeom_SequenceOfSurface, TColgp_SequenceOfArray1OfPnt2d, TColgp_SequenceOfDir, TColgp_SequenceOfDir2d, TColgp_SequenceOfPnt, TColgp_SequenceOfPnt2d, TColgp_SequenceOfVec, TColgp_SequenceOfVec2d, TColgp_SequenceOfXY, TColgp_SequenceOfXYZ, TColStd_SequenceOfAddress, TColStd_SequenceOfAsciiString, TColStd_SequenceOfBoolean, TColStd_SequenceOfExtendedString, TColStd_SequenceOfHAsciiString, TColStd_SequenceOfHExtendedString, TColStd_SequenceOfInteger, TColStd_SequenceOfReal, TColStd_SequenceOfTransient, TDF_AttributeSequence, TDF_LabelSequence, TDocStd_SequenceOfApplicationDelta, TDocStd_SequenceOfDocument, TopOpeBRep_SequenceOfPoint2d, TopTools_SequenceOfShape, Transfer_SequenceOfBinder, Transfer_SequenceOfFinder, TransferBRep_SequenceOfTransferResultInfo, TShort_SequenceOfShortReal, Units_QtsSequence, Units_TksSequence, Units_UtsSequence, Visual3d_SequenceOfPickPath, WNT_SequenceOfImage, XCAFDoc_GraphNodeSequence, and XmlLDrivers_SequenceOfNamespaceDef.

Public Member Functions

DEFINE_STANDARD_ALLOC
Standard_Boolean 
IsEmpty () const
 returns True if the sequence <me> contains no elements.

Standard_Integer Length () const
 Returns the number of element(s) in the
sequence. Returns zero if the sequence is empty.

void Reverse ()
 Reverses the order of items on <me>.
Example:
before
me = (A B C)
after
me = (C B A)

void Exchange (const Standard_Integer I, const Standard_Integer J)
 Swaps elements which are located at
positions and <J> in <me>.
Raises an exception if I or J is out of bound.
Example:
before
me = (A B C), I = 1, J = 3
after
me = (C B A)

Protected Member Functions

 TCollection_BaseSequence ()
 Creation of an empty sequence.

void Clear (const Standard_Address DelNode)
void PAppend (const Standard_Address Node)
void PAppend (TCollection_BaseSequence &S)
 Concatenates <S> at the end of <me>.
<S> is cleared.
Example:
before
me = (A B C)
S = (D E F)
after
me = (A B C D E F)
S = ()

void PPrepend (const Standard_Address Node)
void PPrepend (TCollection_BaseSequence &S)
 Concatenates <S> at the beginning of <me>.
<S> is cleared.
Example:
before
me = (A B C) S = (D E F)
after me = (D E F A B C)
S = ()

void PInsertAfter (const Standard_Integer Index, const Standard_Address Node)
void PInsertAfter (const Standard_Integer Index, TCollection_BaseSequence &S)
 Inserts the sequence <S> in <me> after the
position <Index>. <S> is cleared.
Raises an exception if the index is out of bound.
Example:
before
me = (A B C), Index = 3, S = (D E F)
after
me = (A B C D E F)
S = ()

void PSplit (const Standard_Integer Index, TCollection_BaseSequence &Sub)
 Keeps in <me> the items 1 to <Index>-1 and
puts in the items <Index> to the end.
Example:
before
me = (A B C D) ,Index = 3
after
me = (A B)
Sub = (C D)

void Remove (const Standard_Integer Index, const Standard_Address DelNode)
void Remove (const Standard_Integer FromIndex, const Standard_Integer ToIndex, const Standard_Address DelNode)
Standard_Address Find (const Standard_Integer Index) const
 Returns the node at position <index>.

Protected Attributes

Standard_Address FirstItem
Standard_Address LastItem
Standard_Address CurrentItem
Standard_Integer CurrentIndex
Standard_Integer Size

Constructor & Destructor Documentation


Member Function Documentation


Field Documentation


The documentation for this class was generated from the following file: