Fixed issue with MakeHeader.
Fix isn't for review or integration. Only for the internal usage.
Need to adapt into work env.
Handle(StepData_Protocol) stepro = Handle(StepData_Protocol)::DownCast
( model->Protocol());
if (!stepro.IsNull()) sch = new TCollection_HAsciiString
- (stepro->SchemaName());
+ (stepro->SchemaName(model));
if (!sch.IsNull()) schid->SetValue (1,sch);
}
header.AddItem(fs);
#include <HeaderSection_Protocol.hxx>
+#include <StepData_StepModel.hxx>
#include <StepShape_AdvancedBrepShapeRepresentation.hxx>
#include <StepShape_AdvancedFace.hxx>
// Removed from CC1-Rev2 to Rev4 : <StepVisual_AnnotationCurveOccurrence.hxx>
}
+//=======================================================================
+//function : SchemaName
+//purpose :
+//=======================================================================
+Standard_CString StepAP214_Protocol::SchemaName(const Handle(Interface_InterfaceModel)& theModel) const
+{
+ Handle(StepData_StepModel) aModel = Handle(StepData_StepModel)::DownCast(theModel);
+ StepData_ConfParameters aParam;
+ if (!aModel.IsNull())
+ {
+ aParam = aModel->InternalParameters;
+ }
+ switch (aModel->InternalParameters.WriteSchema)
+ {
+ case StepData_ConfParameters::WriteMode_StepSchema_AP214CD:
+ return schemaAP214CD;
+ break;
+ case StepData_ConfParameters::WriteMode_StepSchema_AP214DIS:
+ return schemaAP214DIS;
+ break;
+ case StepData_ConfParameters::WriteMode_StepSchema_AP203:
+ return schemaAP203;
+ break;
+ case StepData_ConfParameters::WriteMode_StepSchema_AP214IS:
+ return schemaAP214IS;
+ break;
+ case StepData_ConfParameters::WriteMode_StepSchema_AP242DIS:
+ return schemaAP242DIS;
+ break;
+ }
+ return "";
+}
+
//=======================================================================
//function : SchemaName
//purpose :
//! Returns a Case Number for each of the StepAP214 Entities
Standard_EXPORT virtual Standard_Integer TypeNumber (const Handle(Standard_Type)& atype) const Standard_OVERRIDE;
+ Standard_EXPORT virtual Standard_CString SchemaName(const Handle(Interface_InterfaceModel)& theModel) const Standard_OVERRIDE;
+
Standard_EXPORT virtual Standard_CString SchemaName() const Standard_OVERRIDE;
//! Returns count of Protocol used as Resources (level one)
return 0;
}
+Standard_CString StepData_Protocol::SchemaName() const
+{
+ return thename;
+}
-Standard_CString StepData_Protocol::SchemaName () const
+Standard_CString StepData_Protocol::SchemaName (const Handle(Interface_InterfaceModel)& theModel) const
{
+ (void)theModel;
return thename;
}
//! To be redefined by each sub-class
//! Here, SchemaName returns "(DEFAULT)"
//! was C++ : return const
+ Standard_EXPORT virtual Standard_CString SchemaName(const Handle(Interface_InterfaceModel)& theModel) const;
+
+ //! Returns the Schema Name attached to each class of Protocol
+ //! To be redefined by each sub-class
+ //! Here, SchemaName returns "(DEFAULT)"
+ //! was C++ : return const
+ Standard_DEPRECATED("USED old static interface to extract active schema.\n"\
+ "Recommended to use method with input model to extract from current session")
Standard_EXPORT virtual Standard_CString SchemaName() const;
//! Creates an empty Model for Step Norm