Open CASCADE Technology
6.8.0
|
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 () | |
Creates an empty List. More... | |
TopLoc_SListOfItemLocation (const TopLoc_ItemLocation &anItem, const TopLoc_SListOfItemLocation &aTail) | |
Creates a List with <anItem> as value and <aTail> as tail. More... | |
TopLoc_SListOfItemLocation (const TopLoc_SListOfItemLocation &Other) | |
Creates a list from an other one. The lists are shared. More... | |
TopLoc_SListOfItemLocation & | Assign (const TopLoc_SListOfItemLocation &Other) |
Sets a list from an other one. The lists are shared. The list itself is returned. More... | |
TopLoc_SListOfItemLocation & | operator= (const TopLoc_SListOfItemLocation &Other) |
Standard_Boolean | IsEmpty () const |
void | Clear () |
Sets the list to be empty. More... | |
~TopLoc_SListOfItemLocation () | |
const TopLoc_ItemLocation & | Value () const |
Returns the current value of the list. An error is raised if the list is empty. More... | |
TopLoc_ItemLocation & | ChangeValue () |
Returns the current value of the list. An error is raised if the list is empty. This value may be modified. A method modifying the value can be called. The value will be modified in the list. More... | |
void | SetValue (const TopLoc_ItemLocation &anItem) |
Changes the current value in the list. An error is raised if the list is empty. More... | |
const TopLoc_SListOfItemLocation & | Tail () const |
Returns the current tail of the list. On an empty list the tail is the list itself. More... | |
TopLoc_SListOfItemLocation & | ChangeTail () |
Returns the current tail of the list. This tail may be modified. A method modifying the tail can be called. The tail will be modified in the list. More... | |
void | SetTail (const TopLoc_SListOfItemLocation &aList) |
Changes the current tail in the list. On an empty list SetTail is Assign. More... | |
void | Construct (const TopLoc_ItemLocation &anItem) |
Replaces the list by a list with <anItem> as Value and the list <me> as tail. More... | |
TopLoc_SListOfItemLocation | Constructed (const TopLoc_ItemLocation &anItem) const |
Returns a new list with <anItem> as Value an the list <me> as tail. More... | |
void | ToTail () |
Replaces the list <me> by its tail. More... | |
void | Initialize (const TopLoc_SListOfItemLocation &aList) |
Sets the iterator to iterate on the content of <aList>. This is Assign(). More... | |
Standard_Boolean | More () const |
Returns True if the iterator has a current value. This is !IsEmpty() More... | |
void | Next () |
Moves the iterator to the next object in the list. If the iterator is empty it will stay empty. This is ToTail() More... | |
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();
Memory usage is automatically managed for SListOfItemLocations (using reference counts).
TopLoc_SListOfItemLocation::TopLoc_SListOfItemLocation | ( | ) |
Creates an empty List.
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::TopLoc_SListOfItemLocation | ( | const TopLoc_SListOfItemLocation & | Other | ) |
Creates a list from an other one. The lists are shared.
|
inline |
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.
TopLoc_SListOfItemLocation& TopLoc_SListOfItemLocation::ChangeTail | ( | ) |
Returns the current tail of the list. This tail may be modified. A method modifying the tail can be called. The tail will be modified in the list.
TopLoc_ItemLocation& TopLoc_SListOfItemLocation::ChangeValue | ( | ) |
Returns the current value of the list. An error is raised if the list is empty. This value may be modified. A method modifying the value can be called. The value will be modified in the list.
void TopLoc_SListOfItemLocation::Clear | ( | ) |
Sets the list to be empty.
void TopLoc_SListOfItemLocation::Construct | ( | const TopLoc_ItemLocation & | anItem | ) |
Replaces the list by a list with <anItem> as Value and the list <me> as tail.
TopLoc_SListOfItemLocation TopLoc_SListOfItemLocation::Constructed | ( | const TopLoc_ItemLocation & | anItem | ) | const |
Returns a new list with <anItem> as Value an the list <me> as tail.
void TopLoc_SListOfItemLocation::Initialize | ( | const TopLoc_SListOfItemLocation & | aList | ) |
Sets the iterator to iterate on the content of <aList>. This is Assign().
Standard_Boolean TopLoc_SListOfItemLocation::IsEmpty | ( | ) | const |
Standard_Boolean TopLoc_SListOfItemLocation::More | ( | ) | const |
Returns True if the iterator has a current value. This is !IsEmpty()
void TopLoc_SListOfItemLocation::Next | ( | ) |
Moves the iterator to the next object in the list. If the iterator is empty it will stay empty. This is ToTail()
|
inline |
void TopLoc_SListOfItemLocation::SetTail | ( | const TopLoc_SListOfItemLocation & | aList | ) |
Changes the current tail in the list. On an empty list SetTail is Assign.
void TopLoc_SListOfItemLocation::SetValue | ( | const TopLoc_ItemLocation & | anItem | ) |
Changes the current value in the list. An error is raised if the list is empty.
const TopLoc_SListOfItemLocation& TopLoc_SListOfItemLocation::Tail | ( | ) | const |
Returns the current tail of the list. On an empty list the tail is the list itself.
void TopLoc_SListOfItemLocation::ToTail | ( | ) |
Replaces the list <me> by its tail.
const TopLoc_ItemLocation& TopLoc_SListOfItemLocation::Value | ( | ) | const |
Returns the current value of the list. An error is raised if the list is empty.