Open Inventor Release 2024.2.1
 
Loading...
Searching...
No Matches
SoDetailList Class Reference

Maintains a list of instances of details. More...

#include <Inventor/lists/SoDetailList.h>

+ Inheritance diagram for SoDetailList:

Public Member Functions

 SoDetailList ()
 Constructor.
 
 SoDetailList (int size)
 Constructor that pre-allocates storage for size pointers.
 
 SoDetailList (const SoDetailList &l)
 Constructor that copies the contents of another list.
 
virtual ~SoDetailList ()
 Destructor.
 
void append (SoDetail *detail)
 Adds a detail to the end of the list.
 
void insert (SoDetail *detail, int addBefore)
 Inserts given detail in list before detail with given index.
 
virtual void truncate (int start)
 Removes all details after one with given index, inclusive.
 
void copy (const SoDetailList &l)
 Copies a list, making a copy of each detail instance in the list.
 
SoDetailListoperator= (const SoDetailList &l)
 Copies a list, making a copy of each detail instance in the list.
 
SoDetailoperator[] (int i) const
 Returns pointer with given index.
 
void set (int i, SoDetail *detail)
 Sets an element of a list, deleting the old entry first.
 
- Public Member Functions inherited from SbPList
 SbPList ()
 Default constructor.
 
 SbPList (int initSize)
 Constructor.
 
 SbPList (const SbPList &pl)
 Constructor.
 
virtual ~SbPList ()
 Destructor.
 
void append (void *ptr)
 Adds given pointer to end of list.
 
int find (const void *ptr) const
 Returns index of given pointer in list, or -1 if not found.
 
void insert (void *ptr, int addBefore)
 Inserts given pointer in list before pointer with given index.
 
virtual void remove (int which)
 Removes pointer with given index.
 
int getLength () const
 Returns number of pointers in list.
 
void copy (const SbPList &pl)
 Copies a list.
 
SbPListoperator= (const SbPList &pl)
 Assignment operator: copies list into this list.
 
void *& operator[] (const int index) const
 Returns pointer with given index.
 
int operator== (const SbPList &pl) const
 Equality operator.
 
int operator!= (const SbPList &pl) const
 Inequality operator.
 
void swap (int index1, int index2)
 Swaps element having index1 with the one having index2.
 

Detailed Description

Maintains a list of instances of details.

This subclass of SbPList holds lists of instances of classes derived from SoDetail.

SEE ALSO

SoDetail

Definition at line 73 of file SoDetailList.h.

Constructor & Destructor Documentation

◆ SoDetailList() [1/3]

SoDetailList::SoDetailList ( )
inline

Constructor.

Definition at line 79 of file SoDetailList.h.

◆ SoDetailList() [2/3]

SoDetailList::SoDetailList ( int  size)
inline

Constructor that pre-allocates storage for size pointers.

Definition at line 84 of file SoDetailList.h.

◆ SoDetailList() [3/3]

SoDetailList::SoDetailList ( const SoDetailList l)

Constructor that copies the contents of another list.

◆ ~SoDetailList()

virtual SoDetailList::~SoDetailList ( )
inlinevirtual

Destructor.

Definition at line 94 of file SoDetailList.h.

Member Function Documentation

◆ append()

void SoDetailList::append ( SoDetail detail)
inline

Adds a detail to the end of the list.

Definition at line 99 of file SoDetailList.h.

◆ copy()

void SoDetailList::copy ( const SoDetailList l)

Copies a list, making a copy of each detail instance in the list.

◆ insert()

void SoDetailList::insert ( SoDetail detail,
int  addBefore 
)
inline

Inserts given detail in list before detail with given index.

Definition at line 105 of file SoDetailList.h.

◆ operator=()

SoDetailList & SoDetailList::operator= ( const SoDetailList l)
inline

Copies a list, making a copy of each detail instance in the list.

Definition at line 123 of file SoDetailList.h.

◆ operator[]()

SoDetail * SoDetailList::operator[] ( int  i) const
inline

Returns pointer with given index.

If requested index does not exists, list is grown to return a valid pointer.

Definition at line 127 of file SoDetailList.h.

◆ set()

void SoDetailList::set ( int  i,
SoDetail detail 
)

Sets an element of a list, deleting the old entry first.

◆ truncate()

virtual void SoDetailList::truncate ( int  start)
virtual

Removes all details after one with given index, inclusive.

Removed detail instances are deleted.

Reimplemented from SbPList.


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