1 #include <Interface_Protocol.ixx>
3 // Gestion du Protocol actif : tres simple, une variable statique
6 static Handle(Interface_Protocol)& theactive()
8 static Handle(Interface_Protocol) theact;
13 //=======================================================================
16 //=======================================================================
18 Handle(Interface_Protocol) Interface_Protocol::Active ()
24 //=======================================================================
25 //function : SetActive
27 //=======================================================================
29 void Interface_Protocol::SetActive(const Handle(Interface_Protocol)& aprotocol)
31 theactive() = aprotocol;
35 //=======================================================================
36 //function : ClearActive
38 //=======================================================================
40 void Interface_Protocol::ClearActive ()
42 theactive().Nullify();
46 // === Typage (formules fournies par defaut)
49 //=======================================================================
50 //function : CaseNumber
52 //=======================================================================
54 Standard_Integer Interface_Protocol::CaseNumber
55 (const Handle(Standard_Transient)& obj) const
57 if (obj.IsNull()) return 0;
58 return TypeNumber(Type(obj));
62 //=======================================================================
63 //function : IsDynamicType
65 //=======================================================================
67 Standard_Boolean Interface_Protocol::IsDynamicType
68 (const Handle(Standard_Transient)& /*obj*/) const
74 //=======================================================================
77 //=======================================================================
79 Standard_Integer Interface_Protocol::NbTypes
80 (const Handle(Standard_Transient)& /*obj*/) const
86 //=======================================================================
89 //=======================================================================
91 Handle(Standard_Type) Interface_Protocol::Type
92 (const Handle(Standard_Transient)& obj,
93 const Standard_Integer /*nt*/) const
95 if (obj.IsNull()) return STANDARD_TYPE(Standard_Transient);
96 return obj->DynamicType();
100 //=======================================================================
101 //function : GlobalCheck
103 //=======================================================================
105 Standard_Boolean Interface_Protocol::GlobalCheck(const Interface_Graph& /*graph*/,
106 Handle(Interface_Check)& /*ach*/) const
108 return Standard_True;