Removed useless user-defined copy constructors and assignment operators in BOPCol_NCVector, NCollection_Mat4, NCollection_Vec*
User-defined assignment operator matching copy constructor added in NCollection_StdAllocator.
Class VrmlData_DataMapOfShapeAppearance redefined as simple typedef to NCollection_DataMap<>.
: NCollection_Vector<Type>(theIncrement, theAlloc)
{}
//
- BOPCol_NCVector(const BOPCol_NCVector& theOther)
- : NCollection_Vector<Type>(theOther)
- {}
- //
Type& Append1 ()
{
Type& anAppended = *(Type*)this->expandV (this->myLength);
InitIdentity();
}
- //! Copy constructor.
- //! @param theOther [in] the matrix to copy values from.
- NCollection_Mat4 (const NCollection_Mat4& theOther)
- {
- std::memcpy (this, &theOther, sizeof (NCollection_Mat4));
- }
-
- //! Assignment operator.
- //! @param theOther [in] the matrix to copy values from.
- const NCollection_Mat4& operator= (const NCollection_Mat4& theOther)
- {
- std::memcpy (this, &theOther, sizeof (NCollection_Mat4));
- return *this;
- }
-
//! Get element at the specified row and column.
//! @param theRow [in] the row.to address.
//! @param theCol [in] the column to address.
NCollection_StdAllocator( const Handle(NCollection_BaseAllocator)& theAlloc) throw()
{ myAlloc = theAlloc; }
- //! Constructor.
- /*! Copies Allocator() from \a X.*/
- NCollection_StdAllocator( const NCollection_StdAllocator& X) throw() { myAlloc = X.myAlloc; }
-
- //! Destructor.
- /*! Empty implementation.*/
- ~NCollection_StdAllocator() throw() {}
-
- //! Constructor.
+ //! Copy constructor.
/*! Copies Allocator() from \a Y.*/
template<typename U> NCollection_StdAllocator( const NCollection_StdAllocator<U>& Y) throw()
{ myAlloc = Y.Allocator(); }
+ //! Assignment operator
+ template<typename U> NCollection_StdAllocator& operator= (const NCollection_StdAllocator<U>& Y) throw()
+ { myAlloc = Y.Allocator(); return *this; }
+
//! Returns an object address.
/*! Returns &x.*/
pointer address( reference x ) const { return &x; }
/*! Returns an object specified in the constructor.*/
const Handle(NCollection_BaseAllocator)& Allocator() const { return myAlloc; }
+ //! Assignment operator
+ NCollection_StdAllocator& operator=(const NCollection_StdAllocator& X) throw()
+ {
+ myAlloc = X.myAlloc;
+ return *this;
+ }
+
protected:
Handle(NCollection_BaseAllocator) myAlloc;
};
v[1] = theY;
}
- //! Copy constructor.
- NCollection_Vec2 (const NCollection_Vec2& theVec2)
- {
- v[0] = theVec2[0];
- v[1] = theVec2[1];
- }
-
- //! Assignment operator.
- const NCollection_Vec2& operator= (const NCollection_Vec2& theVec2)
- {
- v[0] = theVec2[0];
- v[1] = theVec2[1];
- return *this;
- }
-
//! Alias to 1st component as X coordinate in XY.
Element_t x() const { return v[0]; }
v[2] = Element_t(0);
}
- //! Copy constructor.
- NCollection_Vec3 (const NCollection_Vec3& theVec3)
- {
- std::memcpy (this, &theVec3, sizeof(NCollection_Vec3));
- }
-
- //! Assignment operator.
- const NCollection_Vec3& operator= (const NCollection_Vec3& theVec3)
- {
- std::memcpy (this, &theVec3, sizeof(NCollection_Vec3));
- return *this;
- }
-
//! Alias to 1st component as X coordinate in XYZ.
Element_t x() const { return v[0]; }
v[3] = theAlpha;
}
- //! Copy constructor.
- NCollection_Vec4 (const NCollection_Vec4& theVec4)
- {
- std::memcpy (this, &theVec4, sizeof(NCollection_Vec4));
- }
-
- //! Assignment operator.
- const NCollection_Vec4& operator= (const NCollection_Vec4& theVec4)
- {
- std::memcpy (this, &theVec4, sizeof(NCollection_Vec4));
- return *this;
- }
-
//! Alias to 1st component as X coordinate in XYZW.
Element_t x() const { return v[0]; }
#include <VrmlData_Appearance.hxx>
#include <TopoDS_TShape.hxx>
-/**
- * Data Map that provides the link between each Shape obtained in VRML import
- * and the corresponding Appearance.
- */
-class VrmlData_DataMapOfShapeAppearance
- : public NCollection_DataMap<Handle(TopoDS_TShape), Handle(VrmlData_Appearance)>
-{
-public:
- //! Constructor
- inline VrmlData_DataMapOfShapeAppearance
- (const Standard_Integer NbBuckets=1,
- const Handle(NCollection_BaseAllocator)& theAllocator = 0L)
- : NCollection_DataMap<Handle(TopoDS_TShape),
- Handle(VrmlData_Appearance)> (NbBuckets, theAllocator)
- {}
-
- //! Copy constructor
- inline VrmlData_DataMapOfShapeAppearance
- (const VrmlData_DataMapOfShapeAppearance& theOther)
- : NCollection_DataMap<Handle(TopoDS_TShape),
- Handle(VrmlData_Appearance)> (theOther)
- {}
-
-
- friend Standard_Boolean IsEqual (const Handle(TopoDS_TShape)& one,
- const Handle(TopoDS_TShape)& two);
-
-};
-
-//=======================================================================
-//function : IsEqual
-//purpose : for NCollection_DataMap interface
-//=======================================================================
-inline Standard_Boolean IsEqual (const Handle(TopoDS_TShape)& one,
- const Handle(TopoDS_TShape)& two)
-{
- return one == two;
-}
-
+typedef NCollection_DataMap<Handle(TopoDS_TShape), Handle(VrmlData_Appearance)> VrmlData_DataMapOfShapeAppearance;
#endif
#define VrmlData_Group_HeaderFile
#include <VrmlData_ListOfNode.hxx>
+#include <VrmlData_DataMapOfShapeAppearance.hxx>
#include <Bnd_B3f.hxx>
#include <gp_Trsf.hxx>
class TopoDS_Shape;
-class VrmlData_DataMapOfShapeAppearance;
/**
* Implementation of node "Group"
#include <TCollection_ExtendedString.hxx>
#include <NCollection_IncAllocator.hxx>
#include <Standard_Mutex.hxx>
+#include <VrmlData_DataMapOfShapeAppearance.hxx>
struct VrmlData_InBuffer;
-class VrmlData_DataMapOfShapeAppearance;
/**
* Block of comments describing class VrmlData_Scene