# Visualization
TKV3d
AIS

# AIS_Selection Class Reference

`#include <AIS_Selection.hxx>`

## Public Member Functions

Standard_EXPORT | AIS_Selection (const Standard_CString aName)

creates a new selection and make it current in the session.
the selection will be accessible later through its name
to make it again current.
Note that if a session has been created, a session with
the name "default" is created.
In this case, the is always a current selection which
is the last one created until SetCurrentSelection is used.
The class methods deals with the current selection.
Warning : Better Call AIS_Selection::CreateSelection.

void | Init ()
Standard_Boolean | More () const
void | Next ()
const Handle_Standard_Transient & | Value () const
Standard_Integer | NbStored () const
const AIS_NListTransient & | Objects () const
Standard_EXPORT const | Handle (Standard_Type)&DynamicType() const

## Static Public Member Functions

static Standard_EXPORT void | Remove (const Standard_CString aName)
static Standard_EXPORT Standard_Boolean | Find (const Standard_CString aName)
| returns True if a selection having this name exsits.
static Standard_EXPORT Standard_Boolean | CreateSelection (const Standard_CString aName)
| calls the private constructor and puts the new Selection in the list of existing selections. returns False if the selection exists.
static Standard_EXPORT Handle_AIS_Selection | Selection (const Standard_CString aName)
static Standard_EXPORT Standard_Boolean | SetCurrentSelection (const Standard_CString aName)
| returns False if There is no selection of name <aname>
static Standard_EXPORT Handle_AIS_Selection | CurrentSelection ()
static Standard_EXPORT void | Select ()
| removes all the object of the currentselection.
static Standard_EXPORT AIS_SelectStatus | Select (const Handle(Standard_Transient)&anObject)
| if the object is not yet in the current selection, it will be added. if the object is already in the current selection, it will be removed.
static Standard_EXPORT AIS_SelectStatus | AddSelect (const Handle(Standard_Transient)&anObject)
| the object is always add int the selection. faster when the number of objects selected is great.
static Standard_EXPORT void | ClearAndSelect (const Handle(Standard_Transient)&anObject)
| clears the selection and adds the object in the selection.
static Standard_EXPORT Standard_Boolean | IsSelected (const Handle(Standard_Transient)&anObject)
static Standard_EXPORT Standard_Integer | Extent ()
| returns the number of objects selected.
static Standard_EXPORT Handle_Standard_Transient | Single ()
| returns the single object selected. Warning: raises TypeMismatch from Standard if Extent is not equal to 1.
static Standard_EXPORT Standard_Integer | Index (const Standard_CString aName)

## Private Attributes

TCollection_AsciiString | myName
Standard_Integer | mycuri
AIS_NListTransient | myresult
AIS_NListIteratorOfListTransient | myIterator
AIS_NDataMapOfTransientIteratorOfListTransient | myResultMap
Standard_Integer | myNb

## Constructor & Destructor Documentation

Standard_EXPORT AIS_Selection::AIS_Selection | ( | const Standard_CString | aName | ) |

## Member Function Documentation

static Standard_EXPORT AIS_SelectStatus AIS_Selection::AddSelect | ( | const Handle(Standard_Transient)& | anObject | ) | `[static]`

static Standard_EXPORT void AIS_Selection::ClearAndSelect | ( | const Handle(Standard_Transient)& | anObject | ) | `[static]`

static Standard_EXPORT Standard_Boolean AIS_Selection::CreateSelection | ( | const Standard_CString | aName | ) | `[static]`

static Standard_EXPORT Handle_AIS_Selection AIS_Selection::CurrentSelection | ( |  | ) | `[static]`

static Standard_EXPORT Standard_Integer AIS_Selection::Extent | ( |  | ) | `[static]`

static Standard_EXPORT Standard_Boolean AIS_Selection::Find | ( | const Standard_CString | aName | ) | `[static]`

Standard_EXPORT const AIS_Selection::Handle | ( | Standard_Type |  | ) | const

static Standard_EXPORT Standard_Integer AIS_Selection::Index | ( | const Standard_CString | aName | ) | `[static]`

void AIS_Selection::Init | ( |  | ) | `[inline]`

static Standard_EXPORT Standard_Boolean AIS_Selection::IsSelected | ( | const Handle(Standard_Transient)& | anObject | ) | `[static]`

Standard_Boolean AIS_Selection::More | ( |  | ) | const`[inline]`

Standard_Integer AIS_Selection::NbStored | ( |  | ) | const`[inline]`

void AIS_Selection::Next | ( |  | ) | `[inline]`

const AIS_NListTransient & AIS_Selection::Objects | ( |  | ) | const`[inline]`

static Standard_EXPORT void AIS_Selection::Remove | ( | const Standard_CString | aName | ) | `[static]`

static Standard_EXPORT AIS_SelectStatus AIS_Selection::Select | ( | const Handle(Standard_Transient)& | anObject | ) | `[static]`

static Standard_EXPORT void AIS_Selection::Select | ( |  | ) | `[static]`

static Standard_EXPORT Handle_AIS_Selection AIS_Selection::Selection | ( | const Standard_CString | aName | ) | `[static]`

static Standard_EXPORT Standard_Boolean AIS_Selection::SetCurrentSelection | ( | const Standard_CString | aName | ) | `[static]`

static Standard_EXPORT Handle_Standard_Transient AIS_Selection::Single | ( |  | ) | `[static]`

const Handle_Standard_Transient& AIS_Selection::Value | ( |  | ) | const

## Field Documentation

Standard_Integer AIS_Selection::mycuri `[private]`

AIS_NListIteratorOfListTransient AIS_Selection::myIterator `[private]`

TCollection_AsciiString AIS_Selection::myName `[private]`

Standard_Integer AIS_Selection::myNb `[private]`

AIS_NListTransient AIS_Selection::myresult `[private]`

AIS_NDataMapOfTransientIteratorOfListTransient AIS_Selection::myResultMap `[private]`

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

- AIS_Selection.hxx
- AIS_Selection.lxx