Open CASCADE Technology Reference Manual 8.0.0
Loading...
Searching...
No Matches
Public Member Functions
TopLoc_SListOfItemLocation Class Reference

An SListOfItemLocation is a LISP like list of Items. An SListOfItemLocation is: . Empty. . Or it has a Value and a Tail which is an other SListOfItemLocation. More...

#include <TopLoc_SListOfItemLocation.hxx>

Public Member Functions

 TopLoc_SListOfItemLocation ()=default
 Creates an empty List.
 
 TopLoc_SListOfItemLocation (const TopLoc_ItemLocation &anItem, const TopLoc_SListOfItemLocation &aTail)
 Creates a List with <anItem> as value and <aTail> as tail.
 
 TopLoc_SListOfItemLocation (const TopLoc_SListOfItemLocation &Other)=default
 Creates a list from an other one. The lists are shared.
 
TopLoc_SListOfItemLocationAssign (const TopLoc_SListOfItemLocation &Other)
 Sets a list from an other one. The lists are shared. The list itself is returned.
 
TopLoc_SListOfItemLocationoperator= (const TopLoc_SListOfItemLocation &Other)
 Assignment.
 
 TopLoc_SListOfItemLocation (TopLoc_SListOfItemLocation &&theOther) noexcept
 Move constructor.
 
TopLoc_SListOfItemLocationoperator= (TopLoc_SListOfItemLocation &&theOther) noexcept
 Move operator.
 
bool IsEmpty () const noexcept
 Return true if this list is empty.
 
void Clear () noexcept
 Sets the list to be empty.
 
 ~TopLoc_SListOfItemLocation () noexcept
 Destructor.
 
const TopLoc_ItemLocationValue () const
 Returns the current value of the list. An error is raised if the list is empty.
 
const TopLoc_SListOfItemLocationTail () const
 Returns the current tail of the list. On an empty list the tail is the list itself.
 
void Construct (const TopLoc_ItemLocation &anItem)
 Replaces the list by a list with <anItem> as Value and the list <me> as tail.
 
void ToTail ()
 Replaces the list <me> by its tail.
 
bool More () const noexcept
 Returns True if the iterator has a current value. This is !IsEmpty()
 
void Next ()
 Moves the iterator to the next object in the list. If the iterator is empty it will stay empty. This is ToTail()
 

Detailed Description

An SListOfItemLocation is a LISP like list of Items. An SListOfItemLocation is: . Empty. . Or it has a Value and a Tail which is an other SListOfItemLocation.

The Tail of an empty list is an empty list. SListOfItemLocation are shared. It means that they can be modified through other lists. SListOfItemLocation may be used as Iterators. They have Next, More, and value methods. To iterate on the content of the list S just do.

SListOfItemLocation Iterator; for (Iterator = S; Iterator.More(); Iterator.Next()) X = Iterator.Value();

Constructor & Destructor Documentation

◆ TopLoc_SListOfItemLocation() [1/4]

TopLoc_SListOfItemLocation::TopLoc_SListOfItemLocation ( )
default

Creates an empty List.

◆ TopLoc_SListOfItemLocation() [2/4]

TopLoc_SListOfItemLocation::TopLoc_SListOfItemLocation ( const TopLoc_ItemLocation & anItem,
const TopLoc_SListOfItemLocation & aTail )

Creates a List with <anItem> as value and <aTail> as tail.

◆ TopLoc_SListOfItemLocation() [3/4]

TopLoc_SListOfItemLocation::TopLoc_SListOfItemLocation ( const TopLoc_SListOfItemLocation & Other)
default

Creates a list from an other one. The lists are shared.

◆ TopLoc_SListOfItemLocation() [4/4]

TopLoc_SListOfItemLocation::TopLoc_SListOfItemLocation ( TopLoc_SListOfItemLocation && theOther)
inlinenoexcept

Move constructor.

◆ ~TopLoc_SListOfItemLocation()

TopLoc_SListOfItemLocation::~TopLoc_SListOfItemLocation ( )
inlinenoexcept

Destructor.

Member Function Documentation

◆ Assign()

TopLoc_SListOfItemLocation & TopLoc_SListOfItemLocation::Assign ( const TopLoc_SListOfItemLocation & Other)

Sets a list from an other one. The lists are shared. The list itself is returned.

◆ Clear()

void TopLoc_SListOfItemLocation::Clear ( )
inlinenoexcept

Sets the list to be empty.

◆ Construct()

void TopLoc_SListOfItemLocation::Construct ( const TopLoc_ItemLocation & anItem)
inline

Replaces the list by a list with <anItem> as Value and the list <me> as tail.

◆ IsEmpty()

bool TopLoc_SListOfItemLocation::IsEmpty ( ) const
inlinenoexcept

Return true if this list is empty.

◆ More()

bool TopLoc_SListOfItemLocation::More ( ) const
inlinenoexcept

Returns True if the iterator has a current value. This is !IsEmpty()

◆ Next()

void TopLoc_SListOfItemLocation::Next ( )
inline

Moves the iterator to the next object in the list. If the iterator is empty it will stay empty. This is ToTail()

◆ operator=() [1/2]

TopLoc_SListOfItemLocation & TopLoc_SListOfItemLocation::operator= ( const TopLoc_SListOfItemLocation & Other)
inline

Assignment.

◆ operator=() [2/2]

TopLoc_SListOfItemLocation & TopLoc_SListOfItemLocation::operator= ( TopLoc_SListOfItemLocation && theOther)
inlinenoexcept

Move operator.

◆ Tail()

const TopLoc_SListOfItemLocation & TopLoc_SListOfItemLocation::Tail ( ) const

Returns the current tail of the list. On an empty list the tail is the list itself.

◆ ToTail()

void TopLoc_SListOfItemLocation::ToTail ( )
inline

Replaces the list <me> by its tail.

◆ Value()

const TopLoc_ItemLocation & TopLoc_SListOfItemLocation::Value ( ) const

Returns the current value of the list. An error is raised if the list is empty.


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