1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-14 13:30:48 +03:00

0024814: Avoid using explicit names of Handle classes

Sources corrected replacing Handle_XXX by Handle(XXX)
This commit is contained in:
abv
2014-04-09 18:48:28 +04:00
parent 6fc9d72d9d
commit 857ffd5e57
211 changed files with 697 additions and 697 deletions

View File

@@ -46,7 +46,7 @@ NIS_DrawList::NIS_DrawList ()
//purpose : Constructor
//=======================================================================
NIS_DrawList::NIS_DrawList (const Handle_NIS_View& theView)
NIS_DrawList::NIS_DrawList (const Handle(NIS_View)& theView)
: myView (theView)
{
#ifdef ARRAY_LISTS
@@ -100,7 +100,7 @@ void NIS_DrawList::ClearListID (const Standard_Integer theType)
//purpose : Set myListID to 0.
//=======================================================================
void NIS_DrawList::ClearListID (const Handle_NIS_View& theView)
void NIS_DrawList::ClearListID (const Handle(NIS_View)& theView)
{
#ifdef ARRAY_LISTS
if (myListID > 0)
@@ -180,10 +180,10 @@ void NIS_DrawList::Call (const Standard_Integer theType)
Standard_Boolean NIS_DrawList::SetDynHilighted
(const Standard_Boolean isHili,
const Handle_NIS_InteractiveObject& theObj)
const Handle(NIS_InteractiveObject)& theObj)
{
Standard_Boolean aResult (Standard_False);
NCollection_List<Handle_NIS_InteractiveObject>::Iterator anIt(myDynHilighted);
NCollection_List<Handle(NIS_InteractiveObject)>::Iterator anIt(myDynHilighted);
for (; anIt.More(); anIt.Next())
if (anIt.Value() == theObj)
break;

View File

@@ -49,7 +49,7 @@ class NIS_DrawList
/**
* Constructor
*/
Standard_EXPORT NIS_DrawList (const Handle_NIS_View& theView);
Standard_EXPORT NIS_DrawList (const Handle(NIS_View)& theView);
/**
* Destructor.
@@ -80,7 +80,7 @@ class NIS_DrawList
* @return
* Previous value of myListID
*/
Standard_EXPORT void ClearListID (const Handle_NIS_View& theView=NULL);
Standard_EXPORT void ClearListID (const Handle(NIS_View)& theView=NULL);
/**
* This method is called to start recording a new list. It must be eventually
@@ -121,14 +121,14 @@ class NIS_DrawList
/**
* Query if the given list should be processed by Dynamic Hilighting.
*/
inline const NCollection_List<Handle_NIS_InteractiveObject>&
inline const NCollection_List<Handle(NIS_InteractiveObject)>&
DynHilightedList() const
{ return myDynHilighted; }
/**
* Query the View.
*/
inline const Handle_NIS_View& GetView () const
inline const Handle(NIS_View)& GetView () const
{ return myView; }
/**
@@ -136,7 +136,7 @@ class NIS_DrawList
*/
Standard_EXPORT Standard_Boolean SetDynHilighted
(const Standard_Boolean isHilight,
const Handle_NIS_InteractiveObject& theObj);
const Handle(NIS_InteractiveObject)& theObj);
protected:
// ---------- PROTECTED METHODS ----------
@@ -156,14 +156,14 @@ class NIS_DrawList
private:
// ---------- PRIVATE FIELDS ----------
Handle_NIS_View myView;
Handle(NIS_View) myView;
#ifdef ARRAY_LISTS
Standard_Integer myListID;
#else
Standard_Integer myListID[5];
#endif
Standard_Boolean myIsUpdated[5];
NCollection_List<Handle_NIS_InteractiveObject> myDynHilighted;
NCollection_List<Handle(NIS_InteractiveObject)> myDynHilighted;
};

View File

@@ -41,7 +41,7 @@ NIS_Drawer::~NIS_Drawer ()
//purpose :
//=======================================================================
void NIS_Drawer::Assign (const Handle_NIS_Drawer& theOther)
void NIS_Drawer::Assign (const Handle(NIS_Drawer)& theOther)
{
if (theOther->IsKind(DynamicType()) == Standard_False)
Standard_TypeMismatch::Raise ("NIS_Drawer::Assign");
@@ -67,7 +67,7 @@ Standard_Integer NIS_Drawer::HashCode(const Standard_Integer theN) const
//purpose :
//=======================================================================
Standard_Boolean NIS_Drawer::IsEqual (const Handle_NIS_Drawer& theOther) const
Standard_Boolean NIS_Drawer::IsEqual (const Handle(NIS_Drawer)& theOther) const
{
Standard_Boolean aResult (Standard_False);
if (theOther.IsNull() == Standard_False)
@@ -105,7 +105,7 @@ void NIS_Drawer::AfterDraw (const DrawType, const NIS_DrawList&)
//purpose :
//=======================================================================
void NIS_Drawer::UpdateExListId (const Handle_NIS_View& theView) const
void NIS_Drawer::UpdateExListId (const Handle(NIS_View)& theView) const
{
if (theView.IsNull()) {
if (myCtx) {
@@ -136,7 +136,7 @@ void NIS_Drawer::UpdateExListId (const Handle_NIS_View& theView) const
//=======================================================================
void NIS_Drawer::redraw (const DrawType theType,
const Handle_NIS_View& theView)
const Handle(NIS_View)& theView)
{
if (myCtx &&
myMapID.IsEmpty() == Standard_False &&
@@ -145,7 +145,7 @@ void NIS_Drawer::redraw (const DrawType theType,
NCollection_List<NIS_DrawList*>::Iterator anIter (myLists);
for (; anIter.More(); anIter.Next()) {
NIS_DrawList& aDrawList = * anIter.ChangeValue();
const Handle_NIS_View& aView = aDrawList.GetView();
const Handle(NIS_View)& aView = aDrawList.GetView();
if (aView == theView || aView.IsNull()) {
if (aDrawList.IsUpdated(theType)) {
// Get the IDs of objects concerned
@@ -251,8 +251,8 @@ void NIS_Drawer::SetUpdated (const DrawType theType1,
void NIS_Drawer::SetDynamicHilighted
(const Standard_Boolean isHilighted,
const Handle_NIS_InteractiveObject& theObj,
const Handle_NIS_View& theView)
const Handle(NIS_InteractiveObject)& theObj,
const Handle(NIS_View)& theView)
{
if (myCtx && theObj.IsNull() == Standard_False) {
NCollection_List<NIS_DrawList*>::Iterator anIter (myLists);
@@ -316,7 +316,7 @@ void NIS_Drawer::addObject (const NIS_InteractiveObject * theObj,
if (isShareList)
myLists.Append (createDefaultList(NULL));
else {
NCollection_List<Handle_NIS_View>::Iterator anIter(GetContext()->myViews);
NCollection_List<Handle(NIS_View)>::Iterator anIter(GetContext()->myViews);
for (; anIter.More(); anIter.Next())
myLists.Append (createDefaultList(anIter.Value()));
}
@@ -377,7 +377,7 @@ void NIS_Drawer::prepareList(const NIS_Drawer::DrawType theType,
// Dynamic hilighting is treated in a separate loop because the hilighted
// instances are contained in the special list rather than in the Context
if (theType == NIS_Drawer::Draw_DynHilighted) {
NCollection_List<Handle_NIS_InteractiveObject>::Iterator
NCollection_List<Handle(NIS_InteractiveObject)>::Iterator
anIter (theDrawList.DynHilightedList());
if (anIter.More()) {
BeforeDraw (theType, theDrawList);
@@ -408,7 +408,7 @@ void NIS_Drawer::prepareList(const NIS_Drawer::DrawType theType,
//purpose :
//=======================================================================
NIS_DrawList* NIS_Drawer::createDefaultList
(const Handle_NIS_View& theView) const
(const Handle(NIS_View)& theView) const
{
return new NIS_DrawList(theView);
}

View File

@@ -29,9 +29,9 @@
#pragma warning (disable:4480)
#endif
class Handle_NIS_InteractiveObject;
class Handle_NIS_View;
class Handle_NIS_Drawer;
class Handle(NIS_InteractiveObject);
class Handle(NIS_View);
class Handle(NIS_Drawer);
class NIS_InteractiveContext;
class NIS_View;
template <class A> class NCollection_Vector;
@@ -153,7 +153,7 @@ class NIS_Drawer : public Standard_Transient
* Copy the relevant information from another instance of Drawer.
* raises exception if theOther has incompatible type (test IsKind).
*/
Standard_EXPORT virtual void Assign (const Handle_NIS_Drawer& theOther);
Standard_EXPORT virtual void Assign (const Handle(NIS_Drawer)& theOther);
/**
* Create a3D bounding box of drawn objects.
@@ -193,8 +193,8 @@ class NIS_Drawer : public Standard_Transient
*/
Standard_EXPORT void SetDynamicHilighted
(const Standard_Boolean isHilighted,
const Handle_NIS_InteractiveObject& theObj,
const Handle_NIS_View& theView = 0L);
const Handle(NIS_InteractiveObject)& theObj,
const Handle(NIS_View)& theView = 0L);
/**
* Hash value, for Map interface.
@@ -206,7 +206,7 @@ class NIS_Drawer : public Standard_Transient
* Matching two instances, for Map interface.
*/
Standard_EXPORT virtual Standard_Boolean
IsEqual (const Handle_NIS_Drawer& theOth) const;
IsEqual (const Handle(NIS_Drawer)& theOth) const;
/**
* Obtain the iterator of IDs of associated objects.
@@ -227,7 +227,7 @@ protected:
* Called to add draw list IDs to ex-list Ids of view. These draw lists are
* eventually released in the callback function, before anything is displayed
*/
Standard_EXPORT void UpdateExListId (const Handle_NIS_View& theView) const;
Standard_EXPORT void UpdateExListId (const Handle(NIS_View)& theView) const;
// ---------- PROTECTED METHODS ----------
@@ -248,12 +248,12 @@ protected:
/**
* Main function: display the given interactive object in the given view.
*/
Standard_EXPORT virtual void Draw (const Handle_NIS_InteractiveObject&,
Standard_EXPORT virtual void Draw (const Handle(NIS_InteractiveObject)&,
const DrawType theType,
const NIS_DrawList& theDrawList)= 0;
Standard_EXPORT virtual void redraw (const DrawType theType,
const Handle_NIS_View& theView);
const Handle(NIS_View)& theView);
Standard_EXPORT void addObject (const NIS_InteractiveObject * theObj,
const Standard_Boolean isShareList,
@@ -263,7 +263,7 @@ protected:
const Standard_Boolean isUpVws);
Standard_EXPORT virtual NIS_DrawList*
createDefaultList (const Handle_NIS_View&) const;
createDefaultList (const Handle(NIS_View)&) const;
protected:
//! Get the number of interactive objects in this drawer
@@ -317,7 +317,7 @@ DEFINE_STANDARD_HANDLE (NIS_Drawer, Standard_Transient)
//purpose :
//=======================================================================
inline Standard_Integer HashCode (const Handle_NIS_Drawer& theDrawer,
inline Standard_Integer HashCode (const Handle(NIS_Drawer)& theDrawer,
const Standard_Integer theN)
{ return theDrawer.IsNull() ? 0 : theDrawer->HashCode (theN); }
@@ -326,8 +326,8 @@ inline Standard_Integer HashCode (const Handle_NIS_Drawer& theDrawer,
//purpose :
//=======================================================================
inline Standard_Boolean IsEqual (const Handle_NIS_Drawer& theDrawer1,
const Handle_NIS_Drawer& theDrawer2)
inline Standard_Boolean IsEqual (const Handle(NIS_Drawer)& theDrawer1,
const Handle(NIS_Drawer)& theDrawer2)
{ return theDrawer1.IsNull()? Standard_False: theDrawer1->IsEqual(theDrawer2); }
#ifdef WNT

View File

@@ -23,7 +23,7 @@
IMPLEMENT_STANDARD_HANDLE (NIS_InteractiveContext, Standard_Transient)
IMPLEMENT_STANDARD_RTTIEXT (NIS_InteractiveContext, Standard_Transient)
static void markAllDrawersUpdated (const NCollection_Map<Handle_NIS_Drawer>&);
static void markAllDrawersUpdated (const NCollection_Map<Handle(NIS_Drawer)>&);
//=======================================================================
//function : NIS_InteractiveContext()
@@ -50,13 +50,13 @@ NIS_InteractiveContext::NIS_InteractiveContext ()
NIS_InteractiveContext::~NIS_InteractiveContext ()
{
// Unregister this context in all referred views
NCollection_List<Handle_NIS_View>::Iterator anIterV (myViews);
NCollection_List<Handle(NIS_View)>::Iterator anIterV (myViews);
for (; anIterV.More(); anIterV.Next())
if (anIterV.Value().IsNull() == Standard_False)
anIterV.Value()->RemoveContext(this);
// // Unregister this context in all referred drawers
// NCollection_Map<Handle_NIS_Drawer>::Iterator anIterD (myDrawers);
// NCollection_Map<Handle(NIS_Drawer)>::Iterator anIterD (myDrawers);
// for (; anIterD.More(); anIterD.Next())
// if (anIterD.Value().IsNull() == Standard_False)
// anIterD.Value()->myCtx = 0L;
@@ -68,17 +68,17 @@ NIS_InteractiveContext::~NIS_InteractiveContext ()
//purpose :
//=======================================================================
void NIS_InteractiveContext::AttachView (const Handle_NIS_View& theView)
void NIS_InteractiveContext::AttachView (const Handle(NIS_View)& theView)
{
if (theView.IsNull() == Standard_False) {
NCollection_List<Handle_NIS_View>::Iterator anIter (myViews);
NCollection_List<Handle(NIS_View)>::Iterator anIter (myViews);
for (; anIter.More(); anIter.Next())
if (anIter.Value() == theView)
break;
if (anIter.More() == Standard_False) {
myViews.Append (theView);
theView->AddContext (this);
NCollection_Map<Handle_NIS_Drawer>::Iterator anIterD (myDrawers);
NCollection_Map<Handle(NIS_Drawer)>::Iterator anIterD (myDrawers);
for (; anIterD.More(); anIterD.Next()) {
const Handle(NIS_Drawer)& aDrawer = anIterD.Value();
if (aDrawer.IsNull() == Standard_False)
@@ -93,15 +93,15 @@ void NIS_InteractiveContext::AttachView (const Handle_NIS_View& theView)
//purpose :
//=======================================================================
void NIS_InteractiveContext::DetachView (const Handle_NIS_View& theView)
void NIS_InteractiveContext::DetachView (const Handle(NIS_View)& theView)
{
if (theView.IsNull() == Standard_False) {
NCollection_List<Handle_NIS_View>::Iterator anIter (myViews);
NCollection_List<Handle(NIS_View)>::Iterator anIter (myViews);
for (; anIter.More(); anIter.Next())
if (anIter.Value() == theView) {
myViews.Remove(anIter);
theView->RemoveContext(this);
NCollection_Map<Handle_NIS_Drawer>::Iterator anIterD (myDrawers);
NCollection_Map<Handle(NIS_Drawer)>::Iterator anIterD (myDrawers);
for (; anIterD.More(); anIterD.Next()) {
const Handle(NIS_Drawer)& aDrawer = anIterD.Value();
if (aDrawer.IsNull() == Standard_False) {
@@ -124,12 +124,12 @@ void NIS_InteractiveContext::DetachView (const Handle_NIS_View& theView)
//purpose :
//=======================================================================
const Handle_NIS_InteractiveObject& NIS_InteractiveContext::GetObject
const Handle(NIS_InteractiveObject)& NIS_InteractiveContext::GetObject
(const Standard_Integer theID) const
{
if (!myObjects.IsBound(theID))
{
static Handle_NIS_InteractiveObject aNull;
static Handle(NIS_InteractiveObject) aNull;
return aNull;
}
return myObjects(theID);
@@ -143,7 +143,7 @@ const Handle_NIS_InteractiveObject& NIS_InteractiveContext::GetObject
void NIS_InteractiveContext::redraw (const Handle(NIS_View)& theView,
const NIS_Drawer::DrawType theType)
{
NCollection_Map <Handle_NIS_Drawer>::Iterator anIter (myDrawers);
NCollection_Map <Handle(NIS_Drawer)>::Iterator anIter (myDrawers);
for (; anIter.More(); anIter.Next())
if (anIter.Value().IsNull() == Standard_False)
anIter.Value()->redraw (theType, theView);
@@ -157,7 +157,7 @@ void NIS_InteractiveContext::redraw (const Handle(NIS_View)& theView,
void NIS_InteractiveContext::GetBox (Bnd_B3f& theBox,
const NIS_View * theView) const
{
NCollection_Map <Handle_NIS_Drawer>::Iterator anIterD (myDrawers);
NCollection_Map <Handle(NIS_Drawer)>::Iterator anIterD (myDrawers);
for (; anIterD.More(); anIterD.Next())
if (anIterD.Value().IsNull() == Standard_False)
theBox.Add(anIterD.Value()->GetBox(theView));
@@ -169,8 +169,8 @@ void NIS_InteractiveContext::GetBox (Bnd_B3f& theBox,
//=======================================================================
void NIS_InteractiveContext::Display
(Handle_NIS_InteractiveObject& theObj,
const Handle_NIS_Drawer& theDrawer,
(Handle(NIS_InteractiveObject)& theObj,
const Handle(NIS_Drawer)& theDrawer,
const Standard_Boolean isUpdateViews)
{
if (theObj.IsNull())
@@ -192,8 +192,8 @@ void NIS_InteractiveContext::Display
//=======================================================================
void NIS_InteractiveContext::DisplayOnTop
(Handle_NIS_InteractiveObject& theObj,
const Handle_NIS_Drawer& theDrawer,
(Handle(NIS_InteractiveObject)& theObj,
const Handle(NIS_Drawer)& theDrawer,
const Standard_Boolean isUpdateViews)
{
if (theObj.IsNull())
@@ -216,7 +216,7 @@ void NIS_InteractiveContext::DisplayOnTop
//purpose :
//=======================================================================
void NIS_InteractiveContext::Erase (const Handle_NIS_InteractiveObject& theObj,
void NIS_InteractiveContext::Erase (const Handle(NIS_InteractiveObject)& theObj,
const Standard_Boolean isUpdateViews)
{
if (theObj->IsHidden() == Standard_False) {
@@ -225,7 +225,7 @@ void NIS_InteractiveContext::Erase (const Handle_NIS_InteractiveObject& theObj,
if (aDrawer.IsNull() == Standard_False) {
// Unhilight the erased object
if (theObj->IsDynHilighted()) {
NCollection_List<Handle_NIS_View>::Iterator anIterV (myViews);
NCollection_List<Handle(NIS_View)>::Iterator anIterV (myViews);
for (; anIterV.More(); anIterV.Next())
if (anIterV.Value().IsNull() == Standard_False)
anIterV.Value()->DynamicUnhilight (theObj);
@@ -242,7 +242,7 @@ void NIS_InteractiveContext::Erase (const Handle_NIS_InteractiveObject& theObj,
//purpose :
//=======================================================================
void NIS_InteractiveContext::Remove (const Handle_NIS_InteractiveObject& theObj,
void NIS_InteractiveContext::Remove (const Handle(NIS_InteractiveObject)& theObj,
const Standard_Boolean isUpdateViews)
{
if (theObj.IsNull() == Standard_False) {
@@ -252,7 +252,7 @@ void NIS_InteractiveContext::Remove (const Handle_NIS_InteractiveObject& theObj,
if (aDrawer->myCtx == this) {
// Remove the hilighting if the object has been hilighted
if (theObj->IsDynHilighted()) {
NCollection_List<Handle_NIS_View>::Iterator anIterV (myViews);
NCollection_List<Handle(NIS_View)>::Iterator anIterV (myViews);
for (; anIterV.More(); anIterV.Next())
if (anIterV.Value().IsNull() == Standard_False)
anIterV.Value()->DynamicUnhilight (theObj);
@@ -278,7 +278,7 @@ void NIS_InteractiveContext::Remove (const Handle_NIS_InteractiveObject& theObj,
void NIS_InteractiveContext::DisplayAll ()
{
// UnHide all objects in the Context
NCollection_SparseArray <Handle_NIS_InteractiveObject>::ConstIterator
NCollection_SparseArray <Handle(NIS_InteractiveObject)>::ConstIterator
anIter(myObjects);
for (; anIter.More(); anIter.Next()) {
const Handle(NIS_InteractiveObject)& anObj = anIter.Value();
@@ -288,7 +288,7 @@ void NIS_InteractiveContext::DisplayAll ()
}
// Update status of objects in Drawers (particularly cancel dyn. hilighting)
NCollection_Map<Handle_NIS_Drawer>::Iterator anIterD (myDrawers);
NCollection_Map<Handle(NIS_Drawer)>::Iterator anIterD (myDrawers);
for (; anIterD.More(); anIterD.Next()) {
const Handle(NIS_Drawer)& aDrawer = anIterD.Value();
if (aDrawer.IsNull() == Standard_False) {
@@ -308,7 +308,7 @@ void NIS_InteractiveContext::DisplayAll ()
void NIS_InteractiveContext::EraseAll ()
{
// Hide all objects in the Context
NCollection_SparseArray <Handle_NIS_InteractiveObject>::ConstIterator
NCollection_SparseArray <Handle(NIS_InteractiveObject)>::ConstIterator
anIter(myObjects);
for (; anIter.More(); anIter.Next()) {
const Handle(NIS_InteractiveObject)& anObj = anIter.Value();
@@ -316,7 +316,7 @@ void NIS_InteractiveContext::EraseAll ()
if (anObj->IsHidden() == Standard_False)
anObj->myIsHidden = Standard_True;
if (anObj->IsDynHilighted()) {
NCollection_List<Handle_NIS_View>::Iterator anIterV (myViews);
NCollection_List<Handle(NIS_View)>::Iterator anIterV (myViews);
for (; anIterV.More(); anIterV.Next())
if (anIterV.Value().IsNull() == Standard_False)
anIterV.Value()->DynamicUnhilight (anObj);
@@ -325,7 +325,7 @@ void NIS_InteractiveContext::EraseAll ()
}
// Update status of objects in Drawers (particularly cancel dyn. hilighting)
NCollection_Map<Handle_NIS_Drawer>::Iterator anIterD (myDrawers);
NCollection_Map<Handle(NIS_Drawer)>::Iterator anIterD (myDrawers);
for (; anIterD.More(); anIterD.Next()) {
const Handle(NIS_Drawer)& aDrawer = anIterD.Value();
if (aDrawer.IsNull() == Standard_False) {
@@ -350,13 +350,13 @@ void NIS_InteractiveContext::EraseAll ()
void NIS_InteractiveContext::RemoveAll ()
{
// Remove objects from the Context
NCollection_SparseArray <Handle_NIS_InteractiveObject>::Iterator
NCollection_SparseArray <Handle(NIS_InteractiveObject)>::Iterator
anIter(myObjects);
for (; anIter.More(); anIter.Next()) {
Handle(NIS_InteractiveObject)& anObj = anIter.ChangeValue();
if (anObj.IsNull() == Standard_False) {
if (anObj->IsDynHilighted()) {
NCollection_List<Handle_NIS_View>::Iterator anIterV (myViews);
NCollection_List<Handle(NIS_View)>::Iterator anIterV (myViews);
for (; anIterV.More(); anIterV.Next())
if (anIterV.Value().IsNull() == Standard_False)
anIterV.Value()->DynamicUnhilight (anObj);
@@ -368,7 +368,7 @@ void NIS_InteractiveContext::RemoveAll ()
}
// Mark all draw lists to be removed in the view callback
NCollection_Map<Handle_NIS_Drawer>::Iterator anIterD (myDrawers);
NCollection_Map<Handle(NIS_Drawer)>::Iterator anIterD (myDrawers);
for (; anIterD.More(); anIterD.Next()) {
const Handle(NIS_Drawer)& aDrawer = anIterD.Value();
if (aDrawer.IsNull() == Standard_False) {
@@ -400,7 +400,7 @@ void NIS_InteractiveContext::RemoveAll ()
void NIS_InteractiveContext::RebuildViews ()
{
const Handle_NIS_Allocator aNewAlloc = compactObjects();
const Handle(NIS_Allocator) aNewAlloc = compactObjects();
// Recalculate all DrawLists in all drawers
markAllDrawersUpdated(myDrawers);
@@ -410,7 +410,7 @@ void NIS_InteractiveContext::RebuildViews ()
if (aNewAlloc.IsNull() == Standard_False)
myAllocator = aNewAlloc;
NCollection_List<Handle_NIS_View>::Iterator anIterV(myViews);
NCollection_List<Handle(NIS_View)>::Iterator anIterV(myViews);
for (; anIterV.More(); anIterV.Next()) {
const Handle(NIS_View)& aView = anIterV.Value();
if (aView.IsNull() == Standard_False)
@@ -426,11 +426,11 @@ void NIS_InteractiveContext::RebuildViews ()
void NIS_InteractiveContext::UpdateViews ()
{
const Handle_NIS_Allocator aNewAlloc = compactObjects();
const Handle(NIS_Allocator) aNewAlloc = compactObjects();
if (aNewAlloc.IsNull() == Standard_False)
myAllocator = aNewAlloc;
NCollection_List<Handle_NIS_View>::Iterator anIterV(myViews);
NCollection_List<Handle(NIS_View)>::Iterator anIterV(myViews);
for (; anIterV.More(); anIterV.Next()) {
const Handle(NIS_View)& aView = anIterV.Value();
if (aView.IsNull() == Standard_False)
@@ -444,7 +444,7 @@ void NIS_InteractiveContext::UpdateViews ()
//=======================================================================
Standard_Boolean NIS_InteractiveContext::SetSelected
(const Handle_NIS_InteractiveObject& theObj,
(const Handle(NIS_InteractiveObject)& theObj,
const Standard_Boolean isSelected)
{
Standard_Boolean aResult (Standard_False);
@@ -473,7 +473,7 @@ Standard_Boolean NIS_InteractiveContext::SetSelected
//=======================================================================
Standard_Boolean NIS_InteractiveContext::ProcessSelection
(const Handle_NIS_InteractiveObject& theObj,
(const Handle(NIS_InteractiveObject)& theObj,
const Standard_Boolean isMultiple)
{
Standard_Boolean aResult (Standard_False);
@@ -584,7 +584,7 @@ void NIS_InteractiveContext::ProcessSelection
//=======================================================================
Standard_Boolean NIS_InteractiveContext::IsSelected
(const Handle_NIS_InteractiveObject& theObj)
(const Handle(NIS_InteractiveObject)& theObj)
{
Standard_Boolean aResult (Standard_False);
if (theObj.IsNull() == Standard_False) {
@@ -654,7 +654,7 @@ void NIS_InteractiveContext::SetSelected
//=======================================================================
Standard_Real NIS_InteractiveContext::selectObject
(Handle_NIS_InteractiveObject& theSel,
(Handle(NIS_InteractiveObject)& theSel,
NCollection_List<DetectedEnt>& theDetected,
const gp_Ax1& theAxis,
const Standard_Real theOver,
@@ -665,7 +665,7 @@ Standard_Real NIS_InteractiveContext::selectObject
if (mySelectionMode != Mode_NoSelection || isOnlySel == Standard_False)
{
DetectedEnt anEnt;
NCollection_SparseArray <Handle_NIS_InteractiveObject>::ConstIterator
NCollection_SparseArray <Handle(NIS_InteractiveObject)>::ConstIterator
anIter(myObjects);
for (; anIter.More(); anIter.Next()) {
const Handle(NIS_InteractiveObject)& anObj = anIter.Value();
@@ -747,7 +747,7 @@ Standard_Boolean NIS_InteractiveContext::selectObjects
{
Standard_Boolean aResult (Standard_False);
if (mySelectionMode != Mode_NoSelection) {
NCollection_SparseArray <Handle_NIS_InteractiveObject>::ConstIterator
NCollection_SparseArray <Handle(NIS_InteractiveObject)>::ConstIterator
anIter(myObjects);
for (; anIter.More(); anIter.Next()) {
const Handle(NIS_InteractiveObject)& anObj = anIter.Value();
@@ -789,7 +789,7 @@ Standard_Boolean NIS_InteractiveContext::selectObjects
Standard_Boolean aResult (Standard_False);
if (mySelectionMode != Mode_NoSelection) {
NCollection_SparseArray <Handle_NIS_InteractiveObject>::ConstIterator
NCollection_SparseArray <Handle(NIS_InteractiveObject)>::ConstIterator
anIter(myObjects);
for (; anIter.More(); anIter.Next()) {
@@ -892,9 +892,9 @@ void NIS_InteractiveContext::selectObj
//purpose :
//=======================================================================
const Handle_NIS_Drawer& NIS_InteractiveContext::drawerForDisplay
(const Handle_NIS_InteractiveObject& theObj,
const Handle_NIS_Drawer& theDrawer)
const Handle(NIS_Drawer)& NIS_InteractiveContext::drawerForDisplay
(const Handle(NIS_InteractiveObject)& theObj,
const Handle(NIS_Drawer)& theDrawer)
{
Handle(NIS_Drawer) aDrawer;
if (theDrawer.IsNull() == Standard_False) {
@@ -917,7 +917,7 @@ const Handle_NIS_Drawer& NIS_InteractiveContext::drawerForDisplay
//=======================================================================
void NIS_InteractiveContext::objectForDisplay
(Handle_NIS_InteractiveObject& theObj,
(Handle(NIS_InteractiveObject)& theObj,
const NIS_Drawer::DrawType theDrawType)
{
if (theObj->ID() == 0) {
@@ -937,11 +937,11 @@ void NIS_InteractiveContext::objectForDisplay
//purpose :
//=======================================================================
Handle_NIS_Allocator NIS_InteractiveContext::compactObjects()
Handle(NIS_Allocator) NIS_InteractiveContext::compactObjects()
{
Handle(NIS_Allocator) aNewAlloc;
NCollection_List<Handle_NIS_View>::Iterator anIterV;
NCollection_List<Handle(NIS_View)>::Iterator anIterV;
// Check if the memory used by objects has to be compacted.
const Standard_Size nAllocated = myAllocator->NAllocated();
@@ -959,7 +959,7 @@ Handle_NIS_Allocator NIS_InteractiveContext::compactObjects()
// Compact the memory: clone all objects to a new allocator, release
// the old allocator instance.
aNewAlloc = new NIS_Allocator;
NCollection_SparseArray<Handle_NIS_InteractiveObject>::Iterator
NCollection_SparseArray<Handle(NIS_InteractiveObject)>::Iterator
anIter(myObjects);
for (; anIter.More(); anIter.Next()) {
if (anIter.Value().IsNull() == Standard_False) {
@@ -979,9 +979,9 @@ Handle_NIS_Allocator NIS_InteractiveContext::compactObjects()
//purpose :
//=======================================================================
void markAllDrawersUpdated (const NCollection_Map<Handle_NIS_Drawer>& lstDrv)
void markAllDrawersUpdated (const NCollection_Map<Handle(NIS_Drawer)>& lstDrv)
{
NCollection_Map<Handle_NIS_Drawer>::Iterator anIterD (lstDrv);
NCollection_Map<Handle(NIS_Drawer)>::Iterator anIterD (lstDrv);
for (; anIterD.More(); anIterD.Next()) {
const Handle(NIS_Drawer)& aDrawer = anIterD.Value();
if (aDrawer.IsNull() == Standard_False) {

View File

@@ -147,18 +147,18 @@ class NIS_InteractiveContext : public Standard_Transient
/**
* Associate this Context with the given View.
*/
Standard_EXPORT void AttachView (const Handle_NIS_View& theView);
Standard_EXPORT void AttachView (const Handle(NIS_View)& theView);
/**
* Stop the association of the Context with the given View.
*/
Standard_EXPORT void DetachView (const Handle_NIS_View& theView);
Standard_EXPORT void DetachView (const Handle(NIS_View)& theView);
//@}
/**
* Query the InteractiveObject instance by its ID.
*/
Standard_EXPORT const Handle_NIS_InteractiveObject&
Standard_EXPORT const Handle(NIS_InteractiveObject)&
GetObject (const Standard_Integer theID) const;
/**
@@ -183,9 +183,9 @@ class NIS_InteractiveContext : public Standard_Transient
* Access to Drawers, can be used for specific operations where it is not
* desirale to iterate InteractiveObjects.
*/
inline NCollection_Map<Handle_NIS_Drawer>::Iterator
inline NCollection_Map<Handle(NIS_Drawer)>::Iterator
GetDrawers () const
{ return NCollection_Map<Handle_NIS_Drawer>::Iterator(myDrawers); }
{ return NCollection_Map<Handle(NIS_Drawer)>::Iterator(myDrawers); }
// ================ BEGIN Mangement of Objects ================
///@name Management of Objects
@@ -210,8 +210,8 @@ class NIS_InteractiveContext : public Standard_Transient
* to False if you have to make a number of similar calls, then you would
* call UpdateViews() in the end.
*/
Standard_EXPORT void Display (Handle_NIS_InteractiveObject& theObj,
const Handle_NIS_Drawer& theDrawer = NULL,
Standard_EXPORT void Display (Handle(NIS_InteractiveObject)& theObj,
const Handle(NIS_Drawer)& theDrawer = NULL,
const Standard_Boolean isUpdateViews
= Standard_True);
@@ -234,8 +234,8 @@ class NIS_InteractiveContext : public Standard_Transient
* to False if you have to make a number of similar calls, then you would
* call UpdateViews() in the end.
*/
Standard_EXPORT void DisplayOnTop (Handle_NIS_InteractiveObject& theObj,
const Handle_NIS_Drawer& theDrawer = NULL,
Standard_EXPORT void DisplayOnTop (Handle(NIS_InteractiveObject)& theObj,
const Handle(NIS_Drawer)& theDrawer = NULL,
const Standard_Boolean isUpdateViews
= Standard_True);
@@ -249,7 +249,7 @@ class NIS_InteractiveContext : public Standard_Transient
* to False if you have to make a number of similar calls, then you would
* call UpdateViews() in the end.
*/
Standard_EXPORT void Erase (const Handle_NIS_InteractiveObject& theObj,
Standard_EXPORT void Erase (const Handle(NIS_InteractiveObject)& theObj,
const Standard_Boolean isUpdateViews
= Standard_True);
@@ -263,7 +263,7 @@ class NIS_InteractiveContext : public Standard_Transient
* to False if you have to make a number of similar calls, then you would
* call UpdateViews() in the end.
*/
Standard_EXPORT void Remove (const Handle_NIS_InteractiveObject& theObj,
Standard_EXPORT void Remove (const Handle(NIS_InteractiveObject)& theObj,
const Standard_Boolean isUpdateViews
= Standard_True);
@@ -319,14 +319,14 @@ class NIS_InteractiveContext : public Standard_Transient
* Query the current selection filter. Use the method SetFilter to install it.
* By default returns a NULL handle.
*/
inline const Handle_NIS_SelectFilter&
inline const Handle(NIS_SelectFilter)&
GetFilter () const
{ return mySelectFilter; }
/**
* Install a selection filter.
*/
inline void SetFilter (const Handle_NIS_SelectFilter& theFilter)
inline void SetFilter (const Handle(NIS_SelectFilter)& theFilter)
{ mySelectFilter = theFilter; }
/**
@@ -361,7 +361,7 @@ class NIS_InteractiveContext : public Standard_Transient
* True if the selection status has been changed, False if nothing changed
*/
Standard_EXPORT Standard_Boolean
ProcessSelection(const Handle_NIS_InteractiveObject& O,
ProcessSelection(const Handle(NIS_InteractiveObject)& O,
const Standard_Boolean isMultiple
= Standard_False);
@@ -389,7 +389,7 @@ class NIS_InteractiveContext : public Standard_Transient
* True if the selection status has been changed, False if noithing changed
*/
Standard_EXPORT Standard_Boolean
SetSelected (const Handle_NIS_InteractiveObject& theObj,
SetSelected (const Handle(NIS_InteractiveObject)& theObj,
const Standard_Boolean isSelected
= Standard_True);
@@ -410,7 +410,7 @@ class NIS_InteractiveContext : public Standard_Transient
* Query if the given object is selected.
*/
Standard_EXPORT Standard_Boolean
IsSelected (const Handle_NIS_InteractiveObject& theOb);
IsSelected (const Handle(NIS_InteractiveObject)& theOb);
/**
* Reset all previous selection.
@@ -467,7 +467,7 @@ class NIS_InteractiveContext : public Standard_Transient
// ---------- PROTECTED METHODS ----------
Standard_EXPORT void redraw (const Handle_NIS_View& theView,
Standard_EXPORT void redraw (const Handle(NIS_View)& theView,
const NIS_Drawer::DrawType theType);
/**
@@ -487,7 +487,7 @@ class NIS_InteractiveContext : public Standard_Transient
* The ray distance of the intersection point between the ray and theSel.
*/
Standard_EXPORT Standard_Real
selectObject (Handle_NIS_InteractiveObject& theSel,
selectObject (Handle(NIS_InteractiveObject)& theSel,
NCollection_List<DetectedEnt>& theDet,
const gp_Ax1& theAxis,
const Standard_Real theOver,
@@ -546,20 +546,20 @@ class NIS_InteractiveContext : public Standard_Transient
const Standard_Boolean isFullyIn) const;
private:
void deselectObj (const Handle_NIS_InteractiveObject&,
void deselectObj (const Handle(NIS_InteractiveObject)&,
const Standard_Integer);
void selectObj (const Handle_NIS_InteractiveObject&,
void selectObj (const Handle(NIS_InteractiveObject)&,
const Standard_Integer);
const Handle_NIS_Drawer&
drawerForDisplay (const Handle_NIS_InteractiveObject&,
const Handle_NIS_Drawer&);
const Handle(NIS_Drawer)&
drawerForDisplay (const Handle(NIS_InteractiveObject)&,
const Handle(NIS_Drawer)&);
void objectForDisplay (Handle_NIS_InteractiveObject&,
void objectForDisplay (Handle(NIS_InteractiveObject)&,
const NIS_Drawer::DrawType);
Handle_NIS_Allocator
Handle(NIS_Allocator)
compactObjects ();
private:
@@ -568,7 +568,7 @@ private:
/**
* Allocator for all data associated with objects.
*/
Handle_NIS_Allocator myAllocator;
Handle(NIS_Allocator) myAllocator;
/**
* The last added object ID.
@@ -577,19 +577,19 @@ private:
/**
* Container of InteractiveObject instances.
*/
NCollection_SparseArray <Handle_NIS_InteractiveObject>
NCollection_SparseArray <Handle(NIS_InteractiveObject)>
myObjects;
/**
* List of Views.
*/
NCollection_List <Handle_NIS_View> myViews;
NCollection_List <Handle(NIS_View)> myViews;
/**
* Container of Drawers. There should be one or more Drawers for each type of
* contained InteractiveObject.
*/
NCollection_Map <Handle_NIS_Drawer> myDrawers;
NCollection_Map <Handle(NIS_Drawer)> myDrawers;
/**
* Three maps indicating the state of contained objects:
@@ -610,7 +610,7 @@ private:
/**
* Instance of selection filter used for interactive selections.
*/
Handle_NIS_SelectFilter mySelectFilter;
Handle(NIS_SelectFilter) mySelectFilter;
/**
* Current mode of selection.

View File

@@ -36,7 +36,7 @@ NIS_InteractiveObject::~NIS_InteractiveObject ( )
//purpose :
//=======================================================================
const Handle_NIS_Drawer& NIS_InteractiveObject::SetDrawer
const Handle(NIS_Drawer)& NIS_InteractiveObject::SetDrawer
(const Handle(NIS_Drawer)& theDrawer,
const Standard_Boolean setUpdated)
{
@@ -146,8 +146,8 @@ const Bnd_B3f& NIS_InteractiveObject::GetBox ()
//purpose :
//=======================================================================
void NIS_InteractiveObject::Clone (const Handle_NCollection_BaseAllocator&,
Handle_NIS_InteractiveObject& theDest) const
void NIS_InteractiveObject::Clone (const Handle(NCollection_BaseAllocator)&,
Handle(NIS_InteractiveObject)& theDest) const
{
if (theDest.IsNull() == Standard_False)
{
@@ -171,8 +171,8 @@ void NIS_InteractiveObject::Clone (const Handle_NCollection_BaseAllocator&,
//=======================================================================
void NIS_InteractiveObject::CloneWithID
(const Handle_NCollection_BaseAllocator& theAlloc,
Handle_NIS_InteractiveObject& theDest)
(const Handle(NCollection_BaseAllocator)& theAlloc,
Handle(NIS_InteractiveObject)& theDest)
{
Clone(theAlloc, theDest);
theDest->myID = myID;

View File

@@ -95,8 +95,8 @@
* the virtual method Clone() should be correctly defined for every interactive
* object subtype. Supposing that MyIOClass inherits MyBaseIOBase :
* @code
* void MyIOCalss::Clone (const Handle_NCollection_BaseAllocator& theAlloc,
* Handle_NIS_InteractiveObject& theDest) const
* void MyIOCalss::Clone (const Handle(NCollection_BaseAllocator)& theAlloc,
* Handle(NIS_InteractiveObject)& theDest) const
* {
* Handle(MyIOClass) aNewObj;
* if (theDest.IsNull()) {
@@ -170,15 +170,15 @@ class NIS_InteractiveObject : public Standard_Transient
* Reference to the finally stored or found Drawer instance inside
* the Context.
*/
Standard_EXPORT const Handle_NIS_Drawer&
SetDrawer (const Handle_NIS_Drawer& theDrawer,
Standard_EXPORT const Handle(NIS_Drawer)&
SetDrawer (const Handle(NIS_Drawer)& theDrawer,
const Standard_Boolean setUpdated
= Standard_True);
/**
* Query the current drawer.
*/
inline const Handle_NIS_Drawer&
inline const Handle(NIS_Drawer)&
GetDrawer () const
{ return myDrawer; }
@@ -263,14 +263,14 @@ class NIS_InteractiveObject : public Standard_Transient
* <tt>[in-out]</tt> The target object where the data are copied.
*/
Standard_EXPORT virtual void
Clone (const Handle_NCollection_BaseAllocator& theAll,
Handle_NIS_InteractiveObject& theDest) const;
Clone (const Handle(NCollection_BaseAllocator)& theAll,
Handle(NIS_InteractiveObject)& theDest) const;
/**
* The same as Clone() but also copies the ID.
*/
Standard_EXPORT void CloneWithID (const Handle_NCollection_BaseAllocator&,
Handle_NIS_InteractiveObject&);
Standard_EXPORT void CloneWithID (const Handle(NCollection_BaseAllocator)&,
Handle(NIS_InteractiveObject)&);
/**
* Intersect the InteractiveObject geometry with a line/ray.
@@ -379,7 +379,7 @@ class NIS_InteractiveObject : public Standard_Transient
private:
// ---------- PRIVATE FIELDS ----------
Handle_NIS_Drawer myDrawer;
Handle(NIS_Drawer) myDrawer;
Standard_Integer myID;
NIS_Drawer::DrawType myDrawType : 3;
NIS_Drawer::DrawType myBaseType : 3;

View File

@@ -25,7 +25,7 @@ void NIS_ObjectsIterator::Initialize
(const Handle(NIS_InteractiveContext)& theCtx)
{
if (theCtx.IsNull())
myIter = NCollection_SparseArray <Handle_NIS_InteractiveObject>::Iterator();
myIter = NCollection_SparseArray <Handle(NIS_InteractiveObject)>::Iterator();
else
for (myIter.Init (theCtx->myObjects); myIter.More(); myIter.Next())
if (myIter.Value().IsNull() == Standard_False)

View File

@@ -19,7 +19,7 @@
#include <NCollection_SparseArray.hxx>
#include <Handle_NIS_InteractiveObject.hxx>
class Handle_NIS_InteractiveContext;
class Handle(NIS_InteractiveContext);
/**
* Iterator of objects contained in a NIS_InteractiveContext instance. The
@@ -56,7 +56,7 @@ class NIS_ObjectsIterator
* @param theCtx
* Interactive context that is to be iterated for all objects.
*/
inline NIS_ObjectsIterator (const Handle_NIS_InteractiveContext& theCtx)
inline NIS_ObjectsIterator (const Handle(NIS_InteractiveContext)& theCtx)
{ Initialize (theCtx); }
/**
@@ -65,7 +65,7 @@ class NIS_ObjectsIterator
* Interactive context that is to be iterated for all objects.
*/
Standard_EXPORT void Initialize
(const Handle_NIS_InteractiveContext& theCtx);
(const Handle(NIS_InteractiveContext)& theCtx);
/**
* Query if the Iterator has an object (not yet finished the iteration
@@ -78,7 +78,7 @@ class NIS_ObjectsIterator
* Returns the current object at the iteration pointer. If the iteration is
* over (More() == False) this method returns NULL Handle.
*/
Standard_EXPORT const Handle_NIS_InteractiveObject&
Standard_EXPORT const Handle(NIS_InteractiveObject)&
Value () const;
/**
@@ -89,7 +89,7 @@ class NIS_ObjectsIterator
protected:
// ---------- PROTECTED FIELDS ----------
NCollection_SparseArray <Handle_NIS_InteractiveObject>::ConstIterator myIter;
NCollection_SparseArray <Handle(NIS_InteractiveObject)>::ConstIterator myIter;
};

View File

@@ -23,7 +23,7 @@ IMPLEMENT_STANDARD_RTTIEXT (NIS_SelectFilter, Standard_Transient)
//purpose :
//=======================================================================
Standard_Boolean NIS_SelectFilter::ActsOn (const Handle_Standard_Type&) const
Standard_Boolean NIS_SelectFilter::ActsOn (const Handle(Standard_Type)&) const
{
return Standard_True;
}

View File

@@ -20,7 +20,7 @@
#include <Standard_Transient.hxx>
class NIS_InteractiveObject;
class Handle_Standard_Type;
class Handle(Standard_Type);
/**
* Interface for selection filters. It can be used in NIS_InteractiveContext by methods SetFilter and GetFilter.
@@ -55,7 +55,7 @@ class NIS_SelectFilter : public Standard_Transient
* objects are excluded from Selection before any checking.
*/
Standard_EXPORT virtual Standard_Boolean
ActsOn (const Handle_Standard_Type& theType) const;
ActsOn (const Handle(Standard_Type)& theType) const;
protected:

View File

@@ -45,8 +45,8 @@ IMPLEMENT_STANDARD_RTTIEXT(NIS_Surface, NIS_InteractiveObject)
//purpose : Compare two triangulations, for NCollection_Map interface.
//=======================================================================
inline Standard_Boolean IsEqual(const Handle_Poly_Triangulation& theT0,
const Handle_Poly_Triangulation& theT1)
inline Standard_Boolean IsEqual(const Handle(Poly_Triangulation)& theT0,
const Handle(Poly_Triangulation)& theT1)
{
return (theT0 == theT1);
}
@@ -56,7 +56,7 @@ inline Standard_Boolean IsEqual(const Handle_Poly_Triangulation& theT0,
//purpose :
//=======================================================================
NIS_Surface::NIS_Surface(const Handle_NCollection_BaseAllocator& theAlloc)
NIS_Surface::NIS_Surface(const Handle(NCollection_BaseAllocator)& theAlloc)
: myAlloc (theAlloc),
mypNodes (NULL),
mypNormals (NULL),
@@ -77,7 +77,7 @@ NIS_Surface::NIS_Surface(const Handle_NCollection_BaseAllocator& theAlloc)
//=======================================================================
NIS_Surface::NIS_Surface (const Handle(Poly_Triangulation)& theTri,
const Handle_NCollection_BaseAllocator& theAlloc)
const Handle(NCollection_BaseAllocator)& theAlloc)
: myAlloc (theAlloc),
mypNodes (NULL),
mypNormals (NULL),
@@ -149,7 +149,7 @@ NIS_Surface::NIS_Surface (const Handle(Poly_Triangulation)& theTri,
NIS_Surface::NIS_Surface (const TopoDS_Shape& theShape,
const Standard_Real theDeflection,
const Handle_NCollection_BaseAllocator& theAlloc)
const Handle(NCollection_BaseAllocator)& theAlloc)
: myAlloc (theAlloc),
mypNodes (NULL),
mypNormals (NULL),
@@ -176,7 +176,7 @@ void NIS_Surface::Init (const TopoDS_Shape& theShape,
TopLoc_Location aLoc, aLocSurf;
// Count the nodes and triangles in faces
NCollection_Map<Handle_Poly_Triangulation> mapTri;
NCollection_Map<Handle(Poly_Triangulation)> mapTri;
TopExp_Explorer fexp (theShape, TopAbs_FACE);
for (; fexp.More(); fexp.Next())
{
@@ -505,8 +505,8 @@ NIS_Surface::DisplayMode NIS_Surface::GetDisplayMode () const
//purpose :
//=======================================================================
void NIS_Surface::Clone (const Handle_NCollection_BaseAllocator& theAlloc,
Handle_NIS_InteractiveObject& theDest) const
void NIS_Surface::Clone (const Handle(NCollection_BaseAllocator)& theAlloc,
Handle(NIS_InteractiveObject)& theDest) const
{
Handle(NIS_Surface) aNewObj;
if (theDest.IsNull()) {

View File

@@ -21,7 +21,7 @@
#include <gp_XYZ.hxx>
class Quantity_Color;
class Handle_Poly_Triangulation;
class Handle(Poly_Triangulation);
class TopoDS_Shape;
/**
@@ -52,8 +52,8 @@ public:
/**
* Constructor
*/
Standard_EXPORT NIS_Surface(const Handle_Poly_Triangulation& theTri,
const Handle_NCollection_BaseAllocator&
Standard_EXPORT NIS_Surface(const Handle(Poly_Triangulation)& theTri,
const Handle(NCollection_BaseAllocator)&
theAlloc =0L);
/**
* Constructor. Creates the presentation of all faces in 'theShape' object.
@@ -66,7 +66,7 @@ public:
*/
Standard_EXPORT NIS_Surface(const TopoDS_Shape& theShape,
const Standard_Real theDeflection,
const Handle_NCollection_BaseAllocator& theAl=0L);
const Handle(NCollection_BaseAllocator)& theAl=0L);
/**
* Destructor
@@ -193,8 +193,8 @@ public:
* passed NULL then the target should be created.
*/
Standard_EXPORT virtual void
Clone (const Handle_NCollection_BaseAllocator& theAll,
Handle_NIS_InteractiveObject& theDest) const;
Clone (const Handle(NCollection_BaseAllocator)& theAll,
Handle(NIS_InteractiveObject)& theDest) const;
/**
* Intersect the surface shading/wireframe geometry with a line/ray.
@@ -251,7 +251,7 @@ protected:
/**
* Allocator for method Clone().
*/
Standard_EXPORT NIS_Surface (const Handle_NCollection_BaseAllocator& theAl);
Standard_EXPORT NIS_Surface (const Handle(NCollection_BaseAllocator)& theAl);
/**
* Create a 3D bounding box of the object.
@@ -266,7 +266,7 @@ protected:
gp_XYZ& theNormal) const;
private:
Handle_NCollection_BaseAllocator myAlloc;
Handle(NCollection_BaseAllocator) myAlloc;
//! Array of nodes in triangles
Standard_ShortReal * mypNodes;
//! Array of normals (TriNodes)

View File

@@ -65,7 +65,7 @@ void NIS_SurfaceDrawer::SetColor(const Quantity_Color &theColor)
//purpose :
//=======================================================================
void NIS_SurfaceDrawer::Assign (const Handle_NIS_Drawer& theOther)
void NIS_SurfaceDrawer::Assign (const Handle(NIS_Drawer)& theOther)
{
if (theOther.IsNull() == Standard_False) {
NIS_Drawer::Assign (theOther);
@@ -88,7 +88,7 @@ void NIS_SurfaceDrawer::Assign (const Handle_NIS_Drawer& theOther)
//=======================================================================
Standard_Boolean NIS_SurfaceDrawer::IsEqual
(const Handle_NIS_Drawer& theOther)const
(const Handle(NIS_Drawer)& theOther)const
{
static const Standard_Real anEpsilon2 (1e-7);
Standard_Boolean aResult (Standard_False);
@@ -124,7 +124,7 @@ Standard_Boolean NIS_SurfaceDrawer::IsEqual
//=======================================================================
void NIS_SurfaceDrawer::redraw (const DrawType theType,
const Handle_NIS_View& theView)
const Handle(NIS_View)& theView)
{
glMatrixMode( GL_MODELVIEW );
glPushMatrix();
@@ -241,7 +241,7 @@ void NIS_SurfaceDrawer::AfterDraw (const DrawType theType,
//purpose :
//=======================================================================
void NIS_SurfaceDrawer::Draw (const Handle_NIS_InteractiveObject& theObj,
void NIS_SurfaceDrawer::Draw (const Handle(NIS_InteractiveObject)& theObj,
const DrawType theType,
const NIS_DrawList&)
{

View File

@@ -90,7 +90,7 @@ class NIS_SurfaceDrawer : public NIS_Drawer
* Copy the relevant information from another instance of Drawer.
* raises exception if theOther has incompatible type (test IsKind).
*/
Standard_EXPORT virtual void Assign (const Handle_NIS_Drawer& theOther);
Standard_EXPORT virtual void Assign (const Handle(NIS_Drawer)& theOther);
/**
* Called before execution of Draw(), once per group of interactive objects.
@@ -107,7 +107,7 @@ class NIS_SurfaceDrawer : public NIS_Drawer
/**
* Main function: display the given interactive object in the given view.
*/
Standard_EXPORT virtual void Draw (const Handle_NIS_InteractiveObject&,
Standard_EXPORT virtual void Draw (const Handle(NIS_InteractiveObject)&,
const DrawType theType,
const NIS_DrawList& theDrawList);
@@ -115,11 +115,11 @@ class NIS_SurfaceDrawer : public NIS_Drawer
* Matching two instances, for Map interface.
*/
Standard_EXPORT virtual Standard_Boolean
IsEqual (const Handle_NIS_Drawer& theOth)const;
IsEqual (const Handle(NIS_Drawer)& theOth)const;
protected:
Standard_EXPORT virtual void redraw (const DrawType theType,
const Handle_NIS_View& theView);
const Handle(NIS_View)& theView);
private:

View File

@@ -682,8 +682,8 @@ void NIS_Triangulated::SetLineWidth (const Standard_Real theWidth)
//purpose :
//=======================================================================
void NIS_Triangulated::Clone (const Handle_NCollection_BaseAllocator& theAlloc,
Handle_NIS_InteractiveObject& theDest) const
void NIS_Triangulated::Clone (const Handle(NCollection_BaseAllocator)& theAlloc,
Handle(NIS_InteractiveObject)& theDest) const
{
Handle(NIS_Triangulated) aNewObj;
if (theDest.IsNull()) {

View File

@@ -19,9 +19,9 @@
#include <NIS_InteractiveObject.hxx>
#include <Quantity_Color.hxx>
class Handle_NIS_TriangulatedDrawer;
class Handle(NIS_TriangulatedDrawer);
class NCollection_BaseAllocator;
class Handle_NCollection_BaseAllocator;
class Handle(NCollection_BaseAllocator);
class NIS_TriangulatedDrawer;
/**
@@ -92,7 +92,7 @@ class NIS_Triangulated : public NIS_InteractiveObject
*/
Standard_EXPORT NIS_Triangulated(const Standard_Integer nNodes = 0,
const Standard_Boolean is2D = Standard_False,
const Handle_NCollection_BaseAllocator&
const Handle(NCollection_BaseAllocator)&
theAlloc = 0L);
/**
@@ -348,8 +348,8 @@ class NIS_Triangulated : public NIS_InteractiveObject
* passed NULL then the target should be created.
*/
Standard_EXPORT virtual void
Clone (const Handle_NCollection_BaseAllocator& theAll,
Handle_NIS_InteractiveObject& theDest) const;
Clone (const Handle(NCollection_BaseAllocator)& theAll,
Handle(NIS_InteractiveObject)& theDest) const;
/**
* Intersect the InteractiveObject geometry with a line/ray.

View File

@@ -61,7 +61,7 @@ NIS_TriangulatedDrawer::NIS_TriangulatedDrawer
//purpose :
//=======================================================================
void NIS_TriangulatedDrawer::Assign (const Handle_NIS_Drawer& theOther)
void NIS_TriangulatedDrawer::Assign (const Handle(NIS_Drawer)& theOther)
{
if (theOther.IsNull() == Standard_False) {
NIS_Drawer::Assign (theOther);
@@ -86,7 +86,7 @@ static const Standard_Integer nObjPerDrawer = 64;
//=======================================================================
Standard_Boolean NIS_TriangulatedDrawer::IsEqual
(const Handle_NIS_Drawer& theOther)const
(const Handle(NIS_Drawer)& theOther)const
{
static const Standard_Real anEpsilon2 (1e-7);
Standard_Boolean aResult (Standard_False);
@@ -226,7 +226,7 @@ void NIS_TriangulatedDrawer::AfterDraw (const DrawType theType,
//purpose :
//=======================================================================
void NIS_TriangulatedDrawer::Draw (const Handle_NIS_InteractiveObject& theObj,
void NIS_TriangulatedDrawer::Draw (const Handle(NIS_InteractiveObject)& theObj,
const DrawType /*theType*/,
const NIS_DrawList&)
{

View File

@@ -43,7 +43,7 @@ class NIS_TriangulatedDrawer : public NIS_Drawer
* Copy the relevant information from another instance of Drawer.
* raises exception if theOther has incompatible type (test IsKind).
*/
Standard_EXPORT virtual void Assign (const Handle_NIS_Drawer& theOther);
Standard_EXPORT virtual void Assign (const Handle(NIS_Drawer)& theOther);
/**
* Called before execution of Draw(), once per group of interactive objects.
@@ -60,7 +60,7 @@ class NIS_TriangulatedDrawer : public NIS_Drawer
/**
* Main function: display the given interactive object in the given view.
*/
Standard_EXPORT virtual void Draw (const Handle_NIS_InteractiveObject&,
Standard_EXPORT virtual void Draw (const Handle(NIS_InteractiveObject)&,
const DrawType theType,
const NIS_DrawList& theDrawList);
@@ -68,7 +68,7 @@ class NIS_TriangulatedDrawer : public NIS_Drawer
* Matching two instances, for Map interface.
*/
Standard_EXPORT virtual Standard_Boolean
IsEqual (const Handle_NIS_Drawer& theOth)const;
IsEqual (const Handle(NIS_Drawer)& theOth)const;
protected:
/**

View File

@@ -90,7 +90,7 @@ void NIS_View::RemoveContext (NIS_InteractiveContext * theCtx)
break;
}
NCollection_Map<Handle_NIS_Drawer>::Iterator anIterD (theCtx->GetDrawers ());
NCollection_Map<Handle(NIS_Drawer)>::Iterator anIterD (theCtx->GetDrawers ());
for (; anIterD.More(); anIterD.Next()) {
const Handle(NIS_Drawer)& aDrawer = anIterD.Value();
if (aDrawer.IsNull() == Standard_False) {
@@ -140,7 +140,7 @@ Bnd_B3f NIS_View::GetBndBox() const
Bnd_B3f aBox;
NCollection_List<NIS_InteractiveContext *>::Iterator anIterC (myContexts);
for (; anIterC.More(); anIterC.Next()) {
NCollection_Map<Handle_NIS_Drawer>::Iterator anIterD
NCollection_Map<Handle(NIS_Drawer)>::Iterator anIterD
(anIterC.Value()->myDrawers);
for (; anIterD.More(); anIterD.Next()) {
const Handle(NIS_Drawer)& aDrawer = anIterD.Value();
@@ -366,7 +366,7 @@ void NIS_View::DynamicHilight (const Standard_Integer theX,
//purpose :
//=======================================================================
void NIS_View::DynamicUnhilight(const Handle_NIS_InteractiveObject& theObj)
void NIS_View::DynamicUnhilight(const Handle(NIS_InteractiveObject)& theObj)
{
if (theObj == myDynHilighted && theObj.IsNull() == Standard_False) {
const Handle(NIS_View) aView (this);
@@ -532,7 +532,7 @@ void NIS_View::Select (const NCollection_List<gp_XY> &thePolygon,
//purpose :
//=======================================================================
Handle_NIS_InteractiveObject NIS_View::Pick (const Standard_Integer theX,
Handle(NIS_InteractiveObject) NIS_View::Pick (const Standard_Integer theX,
const Standard_Integer theY)
{
// Find the ray passing through the clicked point in the view window.
@@ -554,7 +554,7 @@ Handle_NIS_InteractiveObject NIS_View::Pick (const Standard_Integer theX,
//purpose :
//=======================================================================
Handle_NIS_InteractiveObject NIS_View::Pick
Handle(NIS_InteractiveObject) NIS_View::Pick
(const gp_Ax1& theAxis,
const Standard_Real theOver,
const Standard_Boolean isOnlySelectable)

View File

@@ -62,13 +62,13 @@ class NIS_View : public V3d_View
/**
* Attach the view to the window.
*/
Standard_EXPORT NIS_View (const Handle_V3d_Viewer& theViewer,
const Handle_Aspect_Window& theWindow = NULL);
Standard_EXPORT NIS_View (const Handle(V3d_Viewer)& theViewer,
const Handle(Aspect_Window)& theWindow = NULL);
/**
* Attach the view to the window.
*/
Standard_EXPORT void SetWindow(const Handle_Aspect_Window &theWindow);
Standard_EXPORT void SetWindow(const Handle(Aspect_Window) &theWindow);
/**
* Indicate whether to draw hilighted objects on top of all other ones
@@ -131,7 +131,7 @@ class NIS_View : public V3d_View
* Unhilights the hilighted object if it coincides with the given
* object instance.
*/
Standard_EXPORT void DynamicUnhilight(const Handle_NIS_InteractiveObject&);
Standard_EXPORT void DynamicUnhilight(const Handle(NIS_InteractiveObject)&);
/**
* Unhilights the currently hilighted object.
@@ -228,7 +228,7 @@ class NIS_View : public V3d_View
* the selected object picked by the minimal intersection distance among
* all contexts attached to this View.
*/
Standard_EXPORT Handle_NIS_InteractiveObject
Standard_EXPORT Handle(NIS_InteractiveObject)
Pick (const Standard_Integer theX,
const Standard_Integer theY);
@@ -247,7 +247,7 @@ class NIS_View : public V3d_View
* the selected object picked by the minimal intersection distance among
* all contexts attached to this View.
*/
Standard_EXPORT Handle_NIS_InteractiveObject
Standard_EXPORT Handle(NIS_InteractiveObject)
Pick (const gp_Ax1& theAxis,
const Standard_Real theOver,
const Standard_Boolean isOnlySel);
@@ -285,7 +285,7 @@ class NIS_View : public V3d_View
// ---------- PRIVATE FIELDS ----------
NCollection_List<NIS_InteractiveContext *> myContexts;
Handle_NIS_InteractiveObject myDynHilighted;
Handle(NIS_InteractiveObject) myDynHilighted;
Standard_Boolean myIsTopHilight : 1;
Standard_Boolean myDoHilightSelected : 1;
NCollection_Vector<NIS_InteractiveObject *> myDetected;