Open Inventor Release 2024.1.0
 
Loading...
Searching...
No Matches
SoFieldList Class Reference

Maintains a list of pointers to fields. More...

#include <Inventor/lists/SoFieldList.h>

+ Inheritance diagram for SoFieldList:

Public Member Functions

 SoFieldList ()
 Constructor.
 
 SoFieldList (int size)
 Constructor that pre-allocates storage for size pointers.
 
 SoFieldList (const SoFieldList &l)
 Constructor that copies the contents of another list.
 
virtual ~SoFieldList ()
 Destructor.
 
void append (SoField *field)
 Adds a pointer to the end of the list.
 
void insert (SoField *field, int addBefore)
 Inserts given pointer in list before pointer with given index.
 
SoFieldoperator[] (int i) const
 Returns pointer with given index.
 
void set (int i, SoField *Field)
 Sets an element of a list.
 
- 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.
 
virtual void truncate (int start)
 Removes all pointers after one with given index, inclusive.
 
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 pointers to fields.

This subclass of SbPList holds lists of pointers to instances of classes derived from SoField.

SEE ALSO

SoField

Definition at line 71 of file SoFieldList.h.

Constructor & Destructor Documentation

◆ SoFieldList() [1/3]

SoFieldList::SoFieldList ( )
inline

Constructor.

Definition at line 77 of file SoFieldList.h.

◆ SoFieldList() [2/3]

SoFieldList::SoFieldList ( int  size)
inline

Constructor that pre-allocates storage for size pointers.

Definition at line 82 of file SoFieldList.h.

◆ SoFieldList() [3/3]

SoFieldList::SoFieldList ( const SoFieldList l)
inline

Constructor that copies the contents of another list.

Definition at line 87 of file SoFieldList.h.

◆ ~SoFieldList()

virtual SoFieldList::~SoFieldList ( )
inlinevirtual

Destructor.

Definition at line 92 of file SoFieldList.h.

Member Function Documentation

◆ append()

void SoFieldList::append ( SoField field)
inline

Adds a pointer to the end of the list.

Definition at line 97 of file SoFieldList.h.

◆ insert()

void SoFieldList::insert ( SoField field,
int  addBefore 
)
inline

Inserts given pointer in list before pointer with given index.

Definition at line 103 of file SoFieldList.h.

◆ operator[]()

SoField * SoFieldList::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 107 of file SoFieldList.h.

◆ set()

void SoFieldList::set ( int  i,
SoField Field 
)
inline

Sets an element of a list.

Definition at line 113 of file SoFieldList.h.


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