40687e51e2496a3507f31f01f7e1ccabc03a5857
[occt.git] / src / Standard / Standard_Transient.cxx
1 // Copyright (c) 1998-1999 Matra Datavision
2 // Copyright (c) 1999-2014 OPEN CASCADE SAS
3 //
4 // This file is part of Open CASCADE Technology software library.
5 //
6 // This library is free software; you can redistribute it and/or modify it under
7 // the terms of the GNU Lesser General Public License version 2.1 as published
8 // by the Free Software Foundation, with special exception defined in the file
9 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
10 // distribution for complete text of the license and disclaimer of any warranty.
11 //
12 // Alternatively, this file may be used under the terms of Open CASCADE
13 // commercial license or contractual agreement.
14
15 #include <Standard_Transient.hxx>
16
17 // The Initialization of the Standard_Transient variables
18 IMPLEMENT_STANDARD_TYPE(Standard_Transient)
19 IMPLEMENT_STANDARD_SUPERTYPE_ARRAY()
20 IMPLEMENT_STANDARD_SUPERTYPE_ARRAY_END()
21 IMPLEMENT_STANDARD_TYPE_END(Standard_Transient)
22
23 IMPLEMENT_STANDARD_RTTI(Standard_Transient)
24
25 //
26 // The Standard_Transient Methods
27 //
28
29 // The Method This 
30 //
31 Handle(Standard_Transient) Standard_Transient::This() const
32 {
33   return Handle(Standard_Transient)(this);
34 }
35
36 // Empty Destructor
37 //
38 Standard_Transient::~Standard_Transient()
39 {
40 }
41
42 //
43 //
44 Standard_Boolean Standard_Transient::IsInstance(const Handle(Standard_Type) &AType) const
45 {
46   return (Standard_Boolean) (AType ==  DynamicType());
47 }
48
49 //
50 //
51 Standard_Boolean Standard_Transient::IsInstance(const Standard_CString theTypeName) const
52 {
53   return IsSimilar ( DynamicType()->Name(), theTypeName );
54 }
55
56 //
57 //
58 Standard_Boolean Standard_Transient::IsKind (const Handle(Standard_Type)& aType) const
59 {
60   return DynamicType()->SubType ( aType );
61 }
62
63 //
64 //
65 Standard_Boolean Standard_Transient::IsKind (const Standard_CString theTypeName) const
66 {
67   return DynamicType()->SubType ( theTypeName );
68 }
69
70 void Standard_Transient::Delete() const
71
72   delete((Standard_Transient *)this); 
73 }