View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0013596 | Open CASCADE | OCCT:Foundation Classes | public | 2006-10-09 18:06 | 2012-01-13 15:12 |
Reporter | Assigned To | ||||
Priority | normal | Severity | trivial | ||
Status | closed | Resolution | fixed | ||
OS | All | ||||
Fixed in Version | 6.2.0 | ||||
Summary | 0013596: Using C++ Namespace with Handle types | ||||
Description | Currently it is impossible to define a Handle type inside a namespace. The cause of the problem are the type declarations inside macros (file Standard_DefineHandle.hxx): class Standard_Transient; class Standard_Persistent; class Handle_Standard_Type; class Handle_##C2; These statements declare classes in the same namespace where the Handle class is created, which is wrong. The problem can be solved by avoiding the above declarations in the bodies of macros, in file Standard_DefineHandle.hxx. | ||||
Additional information and documentation updates | Documentation remark, added by AGV 2007-02-15 12:32:01: New features: none Improvements: With this improvement it is possible to declare transient classes in namespaces: ========== in *.H ==================== #include <Standard_DefineHandle.hxx> namespace Foo { class Bar : public Standard_Transient { ... public: DEFINE_STANDARD_RTTI (Bar) }; // end of class Bar // Definition of HANDLE object using Standard_DefineHandle.hxx DEFINE_STANDARD_HANDLE (Bar, Standard_Transient ) } // end of namespace Foo ========== in *.CPP ==================== namespace Foo { IMPLEMENT_STANDARD_HANDLE (Bar, Standard_Transient) IMPLEMENT_STANDARD_RTTIEXT(Bar, Standard_Transient) } ... Foo::Handle_Bar anObject = new Foo::Bar(); using namespace Foo; Handle(Bar) aCopyObject = anObject; Changes: none Modified entities: Standard | ||||
Tags | No tags attached. | ||||
Test case number | |||||
Date Modified | Username | Field | Change |
---|---|---|---|
2006-10-12 12:51 | bugmaster | Assigned To | bugmaster => agv |
2006-10-12 12:51 | bugmaster | Status | new => assigned |
2006-10-31 16:52 | bugmaster | Status | assigned => verified |
2007-06-01 12:04 | bugmaster | Status | verified => closed |
2007-06-01 12:04 | bugmaster | Resolution | @0@ => fixed |
2011-08-02 11:23 | bugmaster | Category | OCCT:FDC => OCCT:Foundation Classes |
2012-01-13 15:12 |
|
Description Updated | |
2012-01-13 15:12 |
|
Additional Information Updated |