NX Open C++ Reference Guide
|
Represents a list of objects. More...
Public Types | |
enum | DeleteOption { DeleteOptionDelete, DeleteOptionNoDelete } |
Used to indicate whether to delete the object when removing it from the list. More... | |
Public Member Functions | |
void | Append (const std::vector< NXOpen::TaggedObject * > &objects) |
Appends a set of objects to the list. | |
void | Append (NXOpen::TaggedObject *object) |
Appends an object to the list. | |
void | Clear () |
Clears the entire list Created in NX5.0.0. | |
void | Clear (NXOpen::ObjectList::DeleteOption deleteOption) |
Clears the entire list Created in NX5.0.0. | |
void | ClearIndex (int deleteIdx) |
Deletes the item at the index specified. | |
void | Erase (int index) |
Erases the object from the list, but does not delete the object. | |
void | Erase (int index, NXOpen::ObjectList::DeleteOption deleteOption) |
Erases the object at the given position from the list. | |
void | Erase (NXOpen::TaggedObject *obj) |
Erases the object from the list, but does not delete the object. | |
void | Erase (NXOpen::TaggedObject *obj, NXOpen::ObjectList::DeleteOption deleteOption) |
Erases the object from the list. | |
int | FindIndex (NXOpen::TaggedObject *obj) |
Finds the index where the input object appears. | |
NXOpen::TaggedObject * | FindItem (int index) |
Returns the object at the input index. | |
std::vector < NXOpen::TaggedObject * > | GetContents () |
Gets the contents of the entire list. | |
void | Insert (int location, NXOpen::TaggedObject *object) |
Inserts an object at the specified location Created in NX5.0.0. | |
int | Length () |
Returns the length of the list Created in NX5.0.0. | |
void | SetContents (const std::vector< NXOpen::TaggedObject * > &objects) |
Sets the contents of the entire list. | |
void | Swap (int index1, int index2) |
Exchanges the position of two objects inside the list. | |
void | Swap (NXOpen::TaggedObject *object1, NXOpen::TaggedObject *object2) |
Exchanges the position of two objects inside the list. | |
![]() | |
tag_t | GetTag () const |
<b>Deprecated</b>:<br> Use Tag instead. | |
tag_t | Tag () const |
Returns the tag of this object. | |
Represents a list of objects.
To create a new instance of this class, use Part::CreateObjectList
Created in NX4.0.0.
void NXOpen::ObjectList::Append | ( | const std::vector< NXOpen::TaggedObject * > & | objects | ) |
Appends a set of objects to the list.
Created in NX4.0.0.
License requirements : None
objects | items to append |
void NXOpen::ObjectList::Append | ( | NXOpen::TaggedObject * | object | ) |
Appends an object to the list.
Created in NX5.0.0.
License requirements : None
object | item to append |
void NXOpen::ObjectList::Clear | ( | ) |
Clears the entire list
Created in NX5.0.0.
License requirements : None
void NXOpen::ObjectList::Clear | ( | NXOpen::ObjectList::DeleteOption | deleteOption | ) |
Clears the entire list
Created in NX5.0.0.
License requirements : None
deleteOption | whether to delete the objects when removing them |
void NXOpen::ObjectList::ClearIndex | ( | int | deleteIdx | ) |
Deletes the item at the index specified.
The size of the list does not change, but the item at this index is set to NULL.
Created in NX4.0.0.
License requirements : None
deleteIdx | index of item to be deleted |
void NXOpen::ObjectList::Erase | ( | int | index | ) |
Erases the object from the list, but does not delete the object.
The list is shifted so that there isn't a null where the object used to be.
Created in NX5.0.0.
License requirements : None
index | index of item to be removed from the list |
void NXOpen::ObjectList::Erase | ( | int | index, |
NXOpen::ObjectList::DeleteOption | deleteOption | ||
) |
Erases the object at the given position from the list.
The list is shifted so that there isn't a null where the object used to be.
Created in NX5.0.0.
License requirements : None
index | index of item to be removed from the list |
deleteOption | whether to delete the object |
void NXOpen::ObjectList::Erase | ( | NXOpen::TaggedObject * | obj | ) |
Erases the object from the list, but does not delete the object.
The list is shifted so that there isn't a null where the object used to exist.
Created in NX5.0.0.
License requirements : None
obj | object to be removed from the list |
void NXOpen::ObjectList::Erase | ( | NXOpen::TaggedObject * | obj, |
NXOpen::ObjectList::DeleteOption | deleteOption | ||
) |
Erases the object from the list.
The list is shifted so that there isn't a null where the object used to exist.
Created in NX5.0.0.
License requirements : None
obj | object to be removed from the list |
deleteOption | whether to delete the object |
int NXOpen::ObjectList::FindIndex | ( | NXOpen::TaggedObject * | obj | ) |
Finds the index where the input object appears.
If it does not appear, -1 is returned.
obj | Object to find index for |
NXOpen::TaggedObject* NXOpen::ObjectList::FindItem | ( | int | index | ) |
Returns the object at the input index.
May be NULL.
index | index of object to return |
std::vector<NXOpen::TaggedObject *> NXOpen::ObjectList::GetContents | ( | ) |
Gets the contents of the entire list.
void NXOpen::ObjectList::Insert | ( | int | location, |
NXOpen::TaggedObject * | object | ||
) |
Inserts an object at the specified location
Created in NX5.0.0.
License requirements : None
location | location at which to insert the object |
object | object to be inserted |
int NXOpen::ObjectList::Length | ( | ) |
Returns the length of the list
Created in NX5.0.0.
License requirements : None
void NXOpen::ObjectList::SetContents | ( | const std::vector< NXOpen::TaggedObject * > & | objects | ) |
Sets the contents of the entire list.
This overwrites the previous contents of this list, but does not delete any objects that were originally on the list.
Created in NX5.0.0.
License requirements : None
objects | The list contents |
void NXOpen::ObjectList::Swap | ( | int | index1, |
int | index2 | ||
) |
Exchanges the position of two objects inside the list.
The first object is placed where the second used to be, and second object where the first used to be.
Created in NX5.0.0.
License requirements : None
index1 | location of the first item |
index2 | location of the second item |
void NXOpen::ObjectList::Swap | ( | NXOpen::TaggedObject * | object1, |
NXOpen::TaggedObject * | object2 | ||
) |
Exchanges the position of two objects inside the list.
The first object is placed where the second used to be, and second object where the first used to be.
Created in NX5.0.0.
License requirements : None
object1 | first item |
object2 | second item |