Open CASCADE Technology  6.9.1
Public Member Functions | Protected Member Functions | Protected Attributes
TCollection_BaseSequence Class Reference

Definition of a base class for all instanciations of sequence. More...

#include <TCollection_BaseSequence.hxx>

Inherited by AdvApp2Var_SequenceOfNode, AdvApp2Var_SequenceOfPatch, AdvApp2Var_SequenceOfStrip, AdvApp2Var_Strip, AIS_SequenceOfDimension, AIS_SequenceOfInteractive, AppParCurves_SequenceOfMultiBSpCurve, AppParCurves_SequenceOfMultiCurve, Approx_SequenceOfHArray1OfReal, Aspect_SequenceOfColor, Blend_SequenceOfPoint, Bnd_SeqOfBox, BRepAlgo_SequenceOfSequenceOfInteger, BRepBlend_SequenceOfLine, BRepBlend_SequenceOfPointOnRst, BRepFill_SequenceOfEdgeFaceAndOrder, BRepFill_SequenceOfFaceAndOrder, BRepFill_SequenceOfSection, BRepOffsetAPI_SequenceOfSequenceOfReal, BRepOffsetAPI_SequenceOfSequenceOfShape, ChFiDS_SequenceOfSpine, ChFiDS_SequenceOfSurfData, Contap_SequenceOfIWLineOfTheIWalking, Contap_SequenceOfPathPointOfTheSearch, Contap_SequenceOfSegmentOfTheSearch, Contap_TheSequenceOfLine, Contap_TheSequenceOfPoint, Convert_SequenceOfArray1OfPoles, Draw_SequenceOfDrawable3D, Expr_SequenceOfGeneralExpression, Expr_SequenceOfGeneralRelation, ExprIntrp_SequenceOfNamedExpression, ExprIntrp_SequenceOfNamedFunction, Extrema_SeqPCOfPCFOfEPCOfELPCOfLocateExtPC, Extrema_SeqPCOfPCFOfEPCOfELPCOfLocateExtPC2d, Extrema_SeqPCOfPCFOfEPCOfExtPC, Extrema_SeqPCOfPCFOfEPCOfExtPC2d, Extrema_SeqPCOfPCLocFOfLocEPCOfLocateExtPC, Extrema_SeqPCOfPCLocFOfLocEPCOfLocateExtPC2d, Extrema_SeqPOnCOfCCLocFOfLocECC, Extrema_SeqPOnCOfCCLocFOfLocECC2d, Extrema_SequenceOfPOnCurv, Extrema_SequenceOfPOnCurv2d, Extrema_SequenceOfPOnSurf, FEmTool_SeqOfLinConstr, Geom2dInt_SeqPCOfPCLocFOfTheLocateExtPCOfTheProjPCurOfGInter, Geom_SequenceOfBSplineSurface, GeomFill_SequenceOfAx2, GeomFill_SequenceOfTrsf, GeomInt_SequenceOfParameterAndOrientation, GeomPlate_SequenceOfAij, GeomPlate_SequenceOfCurveConstraint, GeomPlate_SequenceOfPointConstraint, 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, IntPolyh_SeqOfStartPoints, IntRes2d_SequenceOfIntersectionPoint, IntRes2d_SequenceOfIntersectionSegment, Intrv_SequenceOfInterval, IntSurf_SequenceOfCouple, IntSurf_SequenceOfInteriorPoint, IntSurf_SequenceOfPathPoint, 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, MDF_ARDriverSequence, MDF_ASDriverSequence, MeshVS_SequenceOfPrsBuilder, Message_SequenceOfPrinters, Message_SequenceOfProgressScale, MoniTool_SequenceOfElement, NLPlate_SequenceOfHGPPConstraint, PCDM_SequenceOfDocument, PCDM_SequenceOfReference, Plate_SequenceOfLinearScalarConstraint, Plate_SequenceOfLinearXYZConstraint, Plate_SequenceOfPinpointConstraint, ProjLib_SequenceOfHSequenceOfPnt, PrsMgr_Presentations, SelectMgr_SequenceOfFilter, SelectMgr_SequenceOfOwner, 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_SeqOfRoot, TColGeom2d_SequenceOfBoundedCurve, TColGeom2d_SequenceOfCurve, TColGeom2d_SequenceOfGeometry, TColGeom_SequenceOfBoundedCurve, TColGeom_SequenceOfCurve, TColGeom_SequenceOfSurface, TColgp_SequenceOfArray1OfPnt2d, TColgp_SequenceOfAx1, 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_SequenceOfLight, Visual3d_SequenceOfView, XCAFDoc_GraphNodeSequence, and XmlLDrivers_SequenceOfNamespaceDef.

Public Member Functions

Standard_Boolean IsEmpty () const
 returns True if the sequence <me> contains no elements. More...
 
Standard_Integer Length () const
 Returns the number of element(s) in the sequence. Returns zero if the sequence is empty. More...
 
void Reverse ()
 Reverses the order of items on <me>. Example: before me = (A B C) after me = (C B A) More...
 
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) More...
 

Protected Member Functions

 TCollection_BaseSequence ()
 Creation of an empty sequence. More...
 
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 = () More...
 
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 = () More...
 
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 = () More...
 
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) More...
 
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>. More...
 

Protected Attributes

Standard_Address FirstItem
 
Standard_Address LastItem
 
Standard_Address CurrentItem
 
Standard_Integer CurrentIndex
 
Standard_Integer Size
 

Detailed Description

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.

Constructor & Destructor Documentation

TCollection_BaseSequence::TCollection_BaseSequence ( )
protected

Creation of an empty sequence.

Member Function Documentation

void TCollection_BaseSequence::Clear ( const Standard_Address  DelNode)
protected
void TCollection_BaseSequence::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)

Standard_Address TCollection_BaseSequence::Find ( const Standard_Integer  Index) const
protected

Returns the node at position <index>.

Standard_Boolean TCollection_BaseSequence::IsEmpty ( ) const

returns True if the sequence <me> contains no elements.

Standard_Integer TCollection_BaseSequence::Length ( ) const

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

void TCollection_BaseSequence::PAppend ( const Standard_Address  Node)
protected
void TCollection_BaseSequence::PAppend ( TCollection_BaseSequence S)
protected

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 TCollection_BaseSequence::PInsertAfter ( const Standard_Integer  Index,
const Standard_Address  Node 
)
protected
void TCollection_BaseSequence::PInsertAfter ( const Standard_Integer  Index,
TCollection_BaseSequence S 
)
protected

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 TCollection_BaseSequence::PPrepend ( const Standard_Address  Node)
protected
void TCollection_BaseSequence::PPrepend ( TCollection_BaseSequence S)
protected

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 TCollection_BaseSequence::PSplit ( const Standard_Integer  Index,
TCollection_BaseSequence Sub 
)
protected

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 TCollection_BaseSequence::Remove ( const Standard_Integer  Index,
const Standard_Address  DelNode 
)
protected
void TCollection_BaseSequence::Remove ( const Standard_Integer  FromIndex,
const Standard_Integer  ToIndex,
const Standard_Address  DelNode 
)
protected
void TCollection_BaseSequence::Reverse ( )

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

Field Documentation

Standard_Integer TCollection_BaseSequence::CurrentIndex
protected
Standard_Address TCollection_BaseSequence::CurrentItem
protected
Standard_Address TCollection_BaseSequence::FirstItem
protected
Standard_Address TCollection_BaseSequence::LastItem
protected
Standard_Integer TCollection_BaseSequence::Size
protected

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