#include <Interface_GeneralModule.hxx>
#include <Interface_GTool.hxx>
#include <Interface_InterfaceMismatch.hxx>
-#include <Interface_InterfaceModel.hxx>
+#include <DE_DataModel.hxx>
#include <Interface_Protocol.hxx>
#include <Interface_ReportEntity.hxx>
#include <Interface_SignType.hxx>
#include <TColStd_Array1OfTransient.hxx>
#include <TColStd_DataMapIteratorOfDataMapOfIntegerTransient.hxx>
-IMPLEMENT_STANDARD_RTTIEXT(Interface_InterfaceModel, Standard_Transient)
+IMPLEMENT_STANDARD_RTTIEXT(DE_DataModel, Standard_Transient)
// Un Modele d`Interface est un ensemble ferme d`Entites d`interface : chacune
// est dans un seul modele a la fois; elle y a un numero (Number) qui permet de
//=======================================================================
-//function : Interface_InterfaceModel
+//function : DE_DataModel
//purpose :
//=======================================================================
-Interface_InterfaceModel::Interface_InterfaceModel ()
+DE_DataModel::DE_DataModel ()
: haschecksem (Standard_False), isdispatch (Standard_False)
{
thecheckstx = new Interface_Check;
//purpose :
//=======================================================================
-void Interface_InterfaceModel::Destroy () // on fait un mimumum
+void DE_DataModel::Destroy () // on fait un mimumum
{
// Moins que Clear que, lui, est adapte a chaque norme
ClearEntities();
//purpose :
//=======================================================================
-void Interface_InterfaceModel::SetProtocol(const Handle(Interface_Protocol)& proto)
+void DE_DataModel::SetProtocol(const Handle(Interface_Protocol)& proto)
{
thegtool = new Interface_GTool(proto);
}
//purpose :
//=======================================================================
-Handle(Interface_Protocol) Interface_InterfaceModel::Protocol () const
+Handle(Interface_Protocol) DE_DataModel::Protocol () const
{
Handle(Interface_Protocol) proto;
if (!thegtool.IsNull()) return thegtool->Protocol();
//purpose :
//=======================================================================
-void Interface_InterfaceModel::SetGTool(const Handle(Interface_GTool)& gtool)
+void DE_DataModel::SetGTool(const Handle(Interface_GTool)& gtool)
{
thegtool = gtool;
}
//purpose :
//=======================================================================
-Handle(Interface_GTool) Interface_InterfaceModel::GTool () const
+Handle(Interface_GTool) DE_DataModel::GTool () const
{
return thegtool;
}
//purpose :
//=======================================================================
-void Interface_InterfaceModel::Clear ()
+void DE_DataModel::Clear ()
{
ClearEntities();
thecheckstx->Clear();
//purpose :
//=======================================================================
-Standard_Boolean& Interface_InterfaceModel::DispatchStatus ()
+Standard_Boolean& DE_DataModel::DispatchStatus ()
{
return isdispatch;
}
//purpose :
//=======================================================================
-void Interface_InterfaceModel::ClearEntities ()
+void DE_DataModel::ClearEntities ()
{
thereports.Clear();
therepch.Clear();
//purpose :
//=======================================================================
-Standard_Integer Interface_InterfaceModel::NbEntities () const
+Standard_Integer DE_DataModel::NbEntities () const
{
return theentities.Extent();
}
//purpose :
//=======================================================================
-Standard_Boolean Interface_InterfaceModel::Contains
+Standard_Boolean DE_DataModel::Contains
(const Handle(Standard_Transient)& anentity) const
{
if (theentities.Contains(anentity)) return Standard_True;
//purpose :
//=======================================================================
-Standard_Integer Interface_InterfaceModel::Number
+Standard_Integer DE_DataModel::Number
(const Handle(Standard_Transient)& anentity) const
{
if (anentity.IsNull()) return 0;
}
/*
-Standard_Integer Interface_InterfaceModel::DENumber
+Standard_Integer DE_DataModel::DENumber
(const Handle(Standard_Transient)& anentity) const
{
if (anentity.IsNull()) return 0;
//purpose :
//=======================================================================
-const Handle(Standard_Transient)& Interface_InterfaceModel::Value
+const Handle(Standard_Transient)& DE_DataModel::Value
(const Standard_Integer num) const
{
return theentities.FindKey(num);
//purpose :
//=======================================================================
-Standard_Integer Interface_InterfaceModel::NbTypes
+Standard_Integer DE_DataModel::NbTypes
(const Handle(Standard_Transient)& ent) const
{
if (Protocol().IsNull()) return 1;
//purpose :
//=======================================================================
-Handle(Standard_Type) Interface_InterfaceModel::Type
+Handle(Standard_Type) DE_DataModel::Type
(const Handle(Standard_Transient)& ent, const Standard_Integer nt) const
{
if (Protocol().IsNull()) return ent->DynamicType();
//purpose :
//=======================================================================
-Standard_CString Interface_InterfaceModel::TypeName
+Standard_CString DE_DataModel::TypeName
(const Handle(Standard_Transient)& ent, const Standard_Boolean complet) const
{
if (!thegtool.IsNull()) return thegtool->SignValue (ent,this);
Standard_CString tn = ent->DynamicType()->Name();
if (complet) return tn;
- return Interface_InterfaceModel::ClassName(tn);
+ return DE_DataModel::ClassName(tn);
}
//purpose :
//=======================================================================
-Standard_CString Interface_InterfaceModel::ClassName(const Standard_CString typnam)
+Standard_CString DE_DataModel::ClassName(const Standard_CString typnam)
{
return Interface_SignType::ClassName (typnam);
}
//purpose :
//=======================================================================
-Interface_DataState Interface_InterfaceModel::EntityState
+Interface_DataState DE_DataModel::EntityState
(const Standard_Integer num) const
{
Handle(Interface_ReportEntity) rep;
//purpose :
//=======================================================================
-Standard_Boolean Interface_InterfaceModel::IsReportEntity
+Standard_Boolean DE_DataModel::IsReportEntity
(const Standard_Integer num, const Standard_Boolean semantic) const
{
return (semantic ? therepch.IsBound(num) : thereports.IsBound(num));
//purpose :
//=======================================================================
-Handle(Interface_ReportEntity) Interface_InterfaceModel::ReportEntity
+Handle(Interface_ReportEntity) DE_DataModel::ReportEntity
(const Standard_Integer num, const Standard_Boolean semantic) const
{
Handle(Interface_ReportEntity) rep;
//purpose :
//=======================================================================
-Standard_Boolean Interface_InterfaceModel::IsErrorEntity
+Standard_Boolean DE_DataModel::IsErrorEntity
(const Standard_Integer num) const
{
Handle(Interface_ReportEntity) rep = ReportEntity(num);
//purpose :
//=======================================================================
-Standard_Boolean Interface_InterfaceModel::IsRedefinedContent
+Standard_Boolean DE_DataModel::IsRedefinedContent
(const Standard_Integer num) const
{
Handle(Interface_ReportEntity) rep = ReportEntity(num);
//purpose :
//=======================================================================
-Standard_Boolean Interface_InterfaceModel::ClearReportEntity
+Standard_Boolean DE_DataModel::ClearReportEntity
(const Standard_Integer num)
{
if (!thereports.IsBound(num)) return Standard_False;
//purpose :
//=======================================================================
-Standard_Boolean Interface_InterfaceModel::SetReportEntity
+Standard_Boolean DE_DataModel::SetReportEntity
(const Standard_Integer num, const Handle(Interface_ReportEntity)& rep)
{
Standard_Integer nm = num;
//purpose :
//=======================================================================
-Standard_Boolean Interface_InterfaceModel::AddReportEntity
+Standard_Boolean DE_DataModel::AddReportEntity
(const Handle(Interface_ReportEntity)& rep, const Standard_Boolean semantic)
{
if (rep.IsNull()) return Standard_False;
//purpose :
//=======================================================================
-Standard_Boolean Interface_InterfaceModel::IsUnknownEntity
+Standard_Boolean DE_DataModel::IsUnknownEntity
(const Standard_Integer num) const
{
Handle(Interface_ReportEntity) rep = ReportEntity(num);
//purpose :
//=======================================================================
-void Interface_InterfaceModel::FillSemanticChecks
+void DE_DataModel::FillSemanticChecks
(const Interface_CheckIterator& checks, const Standard_Boolean clear)
{
if (!checks.Model().IsNull()) {
//purpose :
//=======================================================================
-Standard_Boolean Interface_InterfaceModel::HasSemanticChecks () const
+Standard_Boolean DE_DataModel::HasSemanticChecks () const
{
return haschecksem;
}
//purpose :
//=======================================================================
-const Handle(Interface_Check)& Interface_InterfaceModel::Check
+const Handle(Interface_Check)& DE_DataModel::Check
(const Standard_Integer num, const Standard_Boolean syntactic) const
{
if (num == 0) {
//purpose :
//=======================================================================
-void Interface_InterfaceModel::Reservate (const Standard_Integer nbent)
+void DE_DataModel::Reservate (const Standard_Integer nbent)
{
if (nbent > theentities.NbBuckets()) theentities.ReSize (nbent);
if (nbent < -thereports.NbBuckets()) thereports.ReSize (-nbent);
//purpose :
//=======================================================================
-void Interface_InterfaceModel::AddEntity(const Handle(Standard_Transient)& anentity)
+void DE_DataModel::AddEntity(const Handle(Standard_Transient)& anentity)
{
//Standard_Integer newnum; svv #2
if (!anentity->IsKind(typerep())) theentities.Add(anentity);
//purpose :
//=======================================================================
-void Interface_InterfaceModel::AddWithRefs(const Handle(Standard_Transient)& anent,
+void DE_DataModel::AddWithRefs(const Handle(Standard_Transient)& anent,
const Handle(Interface_Protocol)& proto,
const Standard_Integer level,
const Standard_Boolean listall)
//purpose :
//=======================================================================
-void Interface_InterfaceModel::AddWithRefs(const Handle(Standard_Transient)& anent,
+void DE_DataModel::AddWithRefs(const Handle(Standard_Transient)& anent,
const Standard_Integer level,
const Standard_Boolean listall)
{
//purpose :
//=======================================================================
-void Interface_InterfaceModel::AddWithRefs(const Handle(Standard_Transient)& anent,
+void DE_DataModel::AddWithRefs(const Handle(Standard_Transient)& anent,
const Interface_GeneralLib& lib,
const Standard_Integer level,
const Standard_Boolean listall)
//purpose :
//=======================================================================
-void Interface_InterfaceModel::ReplaceEntity(const Standard_Integer nument,
+void DE_DataModel::ReplaceEntity(const Standard_Integer nument,
const Handle(Standard_Transient)& anent)
{
theentities.Substitute(nument,anent);
//purpose :
//=======================================================================
-void Interface_InterfaceModel::ReverseOrders (const Standard_Integer after)
+void DE_DataModel::ReverseOrders (const Standard_Integer after)
{
Standard_Integer nb = NbEntities(); //Standard_Integer num; svv #2
if (nb < 2 || after >= nb) return;
//purpose :
//=======================================================================
-void Interface_InterfaceModel::ChangeOrder(const Standard_Integer oldnum,
+void DE_DataModel::ChangeOrder(const Standard_Integer oldnum,
const Standard_Integer newnum,
const Standard_Integer cnt) //szv#4:S4163:12Mar99 `count` hid one from this
{
//purpose :
//=======================================================================
-void Interface_InterfaceModel::GetFromTransfer
+void DE_DataModel::GetFromTransfer
(const Interface_EntityIterator& aniter)
{
theentities.Clear(); theentities.ReSize (aniter.NbEntities());
//purpose :
//=======================================================================
-Standard_Boolean Interface_InterfaceModel::SetCategoryNumber
+Standard_Boolean DE_DataModel::SetCategoryNumber
(const Standard_Integer num, const Standard_Integer val)
{
Standard_Integer i,nb = NbEntities();
//purpose :
//=======================================================================
-Standard_Integer Interface_InterfaceModel::CategoryNumber
+Standard_Integer DE_DataModel::CategoryNumber
(const Standard_Integer num) const
{
if (thecategory.IsNull()) return 0;
//purpose :
//=======================================================================
-void Interface_InterfaceModel::FillIterator(Interface_EntityIterator& iter) const
+void DE_DataModel::FillIterator(Interface_EntityIterator& iter) const
{
Standard_Integer nb = NbEntities();
for (Standard_Integer i = 1; i <= nb; i ++)
//purpose :
//=======================================================================
-Interface_EntityIterator Interface_InterfaceModel::Entities () const
+Interface_EntityIterator DE_DataModel::Entities () const
{
Interface_EntityIterator iter;
FillIterator(iter);
//purpose :
//=======================================================================
-Interface_EntityIterator Interface_InterfaceModel::Reports
+Interface_EntityIterator DE_DataModel::Reports
(const Standard_Boolean semantic) const
{
Interface_EntityIterator iter;
//purpose :
//=======================================================================
-Interface_EntityIterator Interface_InterfaceModel::Redefineds () const
+Interface_EntityIterator DE_DataModel::Redefineds () const
{
Interface_EntityIterator iter;
TColStd_DataMapIteratorOfDataMapOfIntegerTransient itmap (thereports);
//purpose :
//=======================================================================
-const Handle(Interface_Check)& Interface_InterfaceModel::GlobalCheck
+const Handle(Interface_Check)& DE_DataModel::GlobalCheck
(const Standard_Boolean syntactic) const
{
if (syntactic) return thecheckstx;
//purpose :
//=======================================================================
-void Interface_InterfaceModel::SetGlobalCheck(const Handle(Interface_Check)& ach)
+void DE_DataModel::SetGlobalCheck(const Handle(Interface_Check)& ach)
{
thecheckstx = ach;
}
//purpose :
//=======================================================================
-void Interface_InterfaceModel::VerifyCheck (Handle(Interface_Check)& /*ach*/) const
+void DE_DataModel::VerifyCheck (Handle(Interface_Check)& /*ach*/) const
{
}
//purpose :
//=======================================================================
-void Interface_InterfaceModel::Print(const Handle(Standard_Transient)& ent,
+void DE_DataModel::Print(const Handle(Standard_Transient)& ent,
Standard_OStream& S,
const Standard_Integer mode) const
{
//purpose :
//=======================================================================
-void Interface_InterfaceModel::PrintToLog(const Handle(Standard_Transient)& ent,
+void DE_DataModel::PrintToLog(const Handle(Standard_Transient)& ent,
Standard_OStream& S) const
{
PrintLabel (ent,S);
//purpose :
//=======================================================================
-Standard_Integer Interface_InterfaceModel::NextNumberForLabel
+Standard_Integer DE_DataModel::NextNumberForLabel
(const Standard_CString label, const Standard_Integer fromnum,
const Standard_Boolean exact) const
{
//purpose :
//=======================================================================
-Standard_Boolean Interface_InterfaceModel::HasTemplate
+Standard_Boolean DE_DataModel::HasTemplate
(const Standard_CString name)
{
return atemp.IsBound(name);
//purpose :
//=======================================================================
-Handle(Interface_InterfaceModel) Interface_InterfaceModel::Template
+Handle(DE_DataModel) DE_DataModel::Template
(const Standard_CString name)
{
- Handle(Interface_InterfaceModel) model,newmod;
+ Handle(DE_DataModel) model,newmod;
if (!HasTemplate(name)) return model;
- model = Handle(Interface_InterfaceModel)::DownCast(atemp.ChangeFind(name));
+ model = Handle(DE_DataModel)::DownCast(atemp.ChangeFind(name));
newmod = model->NewEmptyModel();
newmod->GetFromAnother (model);
return newmod;
//purpose :
//=======================================================================
-Standard_Boolean Interface_InterfaceModel::SetTemplate
- (const Standard_CString name, const Handle(Interface_InterfaceModel)& model)
+Standard_Boolean DE_DataModel::SetTemplate
+ (const Standard_CString name, const Handle(DE_DataModel)& model)
{
return atemp.Bind(name, model);
}
//purpose :
//=======================================================================
-Handle(TColStd_HSequenceOfHAsciiString) Interface_InterfaceModel::ListTemplates ()
+Handle(TColStd_HSequenceOfHAsciiString) DE_DataModel::ListTemplates ()
{
Handle(TColStd_HSequenceOfHAsciiString) list = new
TColStd_HSequenceOfHAsciiString();
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
-#ifndef _Interface_InterfaceModel_HeaderFile
-#define _Interface_InterfaceModel_HeaderFile
+#ifndef _DE_DataModel_HeaderFile
+#define _DE_DataModel_HeaderFile
#include <Standard.hxx>
#include <Standard_Type.hxx>
+#include <Interface_EntityIterator.hxx>
+#include <Interface_DataState.hxx>
+#include <Interface_Check.hxx>
+#include <Interface_CheckIterator.hxx>
+#include <Interface_ReportEntity.hxx>
#include <TColStd_IndexedMapOfTransient.hxx>
#include <TColStd_DataMapOfIntegerTransient.hxx>
#include <Standard_Transient.hxx>
#include <Standard_Integer.hxx>
-#include <Interface_DataState.hxx>
#include <TColStd_HSequenceOfHAsciiString.hxx>
-class Interface_Check;
-class TCollection_HAsciiString;
-class Interface_GTool;
-class Interface_Protocol;
-class Interface_ReportEntity;
-class Interface_CheckIterator;
-class Interface_GeneralLib;
-class Interface_EntityIterator;
-
-class Interface_InterfaceModel;
-DEFINE_STANDARD_HANDLE(Interface_InterfaceModel, Standard_Transient)
+class TCollection_HAsciiString;
//! Defines an (Indexed) Set of data corresponding to a complete
//! Transfer by a File Interface, i.e. File Header and Transient
//! under another name).
//!
//! See also Graph, ShareTool, CheckTool for more
-class Interface_InterfaceModel : public Standard_Transient
+class DE_DataModel : public Standard_Transient
{
public:
-
- //! Clears the list of entities (service WhenDelete)
+
+ //! Defines empty InterfaceModel, ready to be filled
+ Standard_EXPORT DE_DataModel();
+
+ //! Clear
Standard_EXPORT void Destroy();
-~Interface_InterfaceModel()
-{
- Destroy();
-}
-
- //! Sets a Protocol for this Model
- //! It is also set by a call to AddWithRefs with Protocol
- //! It is used for : DumpHeader (as required), ClearEntities ...
- Standard_EXPORT void SetProtocol (const Handle(Interface_Protocol)& proto);
-
- //! Returns the Protocol which has been set by SetProtocol, or
- //! AddWithRefs with Protocol
- Standard_EXPORT virtual Handle(Interface_Protocol) Protocol() const;
-
- //! Sets a GTool for this model, which already defines a Protocol
- Standard_EXPORT void SetGTool (const Handle(Interface_GTool)& gtool);
-
- //! Returns the GTool, set by SetProtocol or by SetGTool
- Standard_EXPORT Handle(Interface_GTool) GTool() const;
-
- //! Returns the Dispatch Status, either for get or set
- //! A Model which is produced from Dispatch may share entities
- //! with the original (according to the Protocol), hence these
- //! non-copied entities should not be deleted
- Standard_EXPORT Standard_Boolean& DispatchStatus();
-
+
+ virtual ~DE_DataModel() { Destroy(); }
+
//! Erases contained data; used when a Model is copied to others :
//! the new copied ones begin from clear
//! Clear calls specific method ClearHeader (see below)
Standard_EXPORT virtual void Clear();
-
+
//! Clears the entities; uses the general service WhenDelete, in
//! addition to the standard Memory Manager; can be redefined
Standard_EXPORT virtual void ClearEntities();
-
+
//! Erases information about labels, if any : specific to each
//! norm
- Standard_EXPORT virtual void ClearLabels() = 0;
-
+ Standard_EXPORT virtual void ClearLabels();
+
//! Clears Model's header : specific to each norm
- Standard_EXPORT virtual void ClearHeader() = 0;
-
+ Standard_EXPORT virtual void ClearHeader();
+
//! Returns count of contained Entities
Standard_EXPORT Standard_Integer NbEntities() const;
-
+
//! Returns True if a Model contains an Entity (for a ReportEntity,
//! looks for the ReportEntity itself AND its Concerned Entity)
- Standard_EXPORT Standard_Boolean Contains (const Handle(Standard_Transient)& anentity) const;
-
+ Standard_EXPORT Standard_Boolean Contains(const Handle(Standard_Transient)& anentity) const;
+
//! Returns the Number of an Entity in the Model if it contains it.
//! Else returns 0. For a ReportEntity, looks at Concerned Entity.
//! Returns the Directory entry Number of an Entity in
//! the Model if it contains it. Else returns 0. For a
//! ReportEntity, looks at Concerned Entity.
- Standard_EXPORT Standard_Integer Number (const Handle(Standard_Transient)& anentity) const;
-
+ Standard_EXPORT Standard_Integer Number(const Handle(Standard_Transient)& anentity) const;
+
//! Returns an Entity identified by its number in the Model
//! Each sub-class of InterfaceModel can define its own method
//! Entity to return its specific class of Entity (e.g. for VDA,
//! Remark : For a Reported Entity, (Erroneous, Corrected, Unknown), this
//! method returns this Reported Entity.
//! See ReportEntity for other questions.
- Standard_EXPORT const Handle(Standard_Transient)& Value (const Standard_Integer num) const;
-
+ Standard_EXPORT const Handle(Standard_Transient)& Value(const Standard_Integer num) const;
+
//! Returns the count of DISTINCT types under which an entity may
//! be processed. Defined by the Protocol, which gives default as
//! 1 (dynamic Type).
- Standard_EXPORT Standard_Integer NbTypes (const Handle(Standard_Transient)& ent) const;
-
+ Standard_EXPORT Standard_Integer NbTypes(const Handle(Standard_Transient)& ent) const;
+
//! Returns a type, given its rank : defined by the Protocol
//! (by default, the first one)
- Standard_EXPORT Handle(Standard_Type) Type (const Handle(Standard_Transient)& ent, const Standard_Integer num = 1) const;
-
+ Standard_EXPORT Handle(Standard_Type) Type(const Handle(Standard_Transient)& ent,
+ const Standard_Integer num = 1) const;
+
//! Returns the type name of an entity, from the list of types
//! (one or more ...)
//! <complete> True (D) gives the complete type, else packages are
//! removed
//! WARNING : buffered, to be immediately copied or printed
- Standard_EXPORT Standard_CString TypeName (const Handle(Standard_Transient)& ent, const Standard_Boolean complete = Standard_True) const;
-
+ Standard_EXPORT Standard_CString TypeName(const Handle(Standard_Transient)& ent,
+ const Standard_Boolean complete = Standard_True) const;
+
//! From a CDL Type Name, returns the Class part (package dropped)
//! WARNING : buffered, to be immediately copied or printed
- Standard_EXPORT static Standard_CString ClassName (const Standard_CString typnam);
-
+ Standard_EXPORT static Standard_CString ClassName(const Standard_CString typnam);
+
//! Returns the State of an entity, given its number
- Standard_EXPORT Interface_DataState EntityState (const Standard_Integer num) const;
-
+ Standard_EXPORT Interface_DataState EntityState(const Standard_Integer num) const;
+
//! Returns True if <num> identifies a ReportEntity in the Model
//! Hence, ReportEntity can be called.
//!
//! Remember that a Report Entity can be defined for an Unknown
//! Entity, or a Corrected or Erroneous (at read time) Entity.
//! The ReportEntity is defined before call to method AddEntity.
- Standard_EXPORT Standard_Boolean IsReportEntity (const Standard_Integer num, const Standard_Boolean semantic = Standard_False) const;
-
+ Standard_EXPORT Standard_Boolean IsReportEntity(const Standard_Integer num,
+ const Standard_Boolean semantic = Standard_False) const;
+
//! Returns a ReportEntity identified by its number in the Model,
//! or a Null Handle If <num> does not identify a ReportEntity.
//!
//! By default, queries main report, if <semantic> is True, it
//! queries report for semantic check
- Standard_EXPORT Handle(Interface_ReportEntity) ReportEntity (const Standard_Integer num, const Standard_Boolean semantic = Standard_False) const;
-
+ Standard_EXPORT Handle(Interface_ReportEntity) ReportEntity(const Standard_Integer num,
+ const Standard_Boolean semantic = Standard_False) const;
+
//! Returns True if <num> identifies an Error Entity : in this
//! case, a ReportEntity brings Fail Messages and possibly an
//! "undefined" Content, see IsRedefinedEntity
- Standard_EXPORT Standard_Boolean IsErrorEntity (const Standard_Integer num) const;
-
+ Standard_EXPORT Standard_Boolean IsErrorEntity(const Standard_Integer num) const;
+
//! Returns True if <num> identifies an Entity which content is
//! redefined through a ReportEntity (i.e. with literal data only)
//! This happens when an entity is syntactically erroneous in the
//! way that its basic content remains empty.
//! For more details (such as content itself), see ReportEntity
- Standard_EXPORT Standard_Boolean IsRedefinedContent (const Standard_Integer num) const;
-
+ Standard_EXPORT Standard_Boolean IsRedefinedContent(const Standard_Integer num) const;
+
//! Removes the ReportEntity attached to Entity <num>. Returns
//! True if done, False if no ReportEntity was attached to <num>.
//! Warning : the caller must assume that this clearing is meaningful
- Standard_EXPORT Standard_Boolean ClearReportEntity (const Standard_Integer num);
-
+ Standard_EXPORT Standard_Boolean ClearReportEntity(const Standard_Integer num);
+
//! Sets or Replaces a ReportEntity for the Entity <num>. Returns
//! True if Report is replaced, False if it has been replaced
//! Warning : the caller must assume that this setting is meaningful
- Standard_EXPORT Standard_Boolean SetReportEntity (const Standard_Integer num, const Handle(Interface_ReportEntity)& rep);
-
+ Standard_EXPORT Standard_Boolean SetReportEntity(const Standard_Integer num,
+ const Handle(Interface_ReportEntity)& rep);
+
//! Adds a ReportEntity as such. Returns False if the concerned
//! entity is not recorded in the Model
//! Else, adds it into, either the main report list or the
//! list for semantic checks, then returns True
- Standard_EXPORT Standard_Boolean AddReportEntity (const Handle(Interface_ReportEntity)& rep, const Standard_Boolean semantic = Standard_False);
-
+ Standard_EXPORT Standard_Boolean AddReportEntity(const Handle(Interface_ReportEntity)& rep,
+ const Standard_Boolean semantic = Standard_False);
+
//! Returns True if <num> identifies an Unknown Entity : in this
//! case, a ReportEntity with no Check Messages designates it.
- Standard_EXPORT Standard_Boolean IsUnknownEntity (const Standard_Integer num) const;
-
+ Standard_EXPORT Standard_Boolean IsUnknownEntity(const Standard_Integer num) const;
+
//! Fills the list of semantic checks.
//! This list is computed (by CheckTool). Hence, it can be stored
//! in the model for later queries
//! <clear> True (D) : new list replaces
//! <clear> False : new list is cumulated
- Standard_EXPORT void FillSemanticChecks (const Interface_CheckIterator& checks, const Standard_Boolean clear = Standard_True);
-
+ Standard_EXPORT void FillSemanticChecks(const Interface_CheckIterator& checks,
+ const Standard_Boolean clear = Standard_True);
+
//! Returns True if semantic checks have been filled
Standard_EXPORT Standard_Boolean HasSemanticChecks() const;
-
+
//! Returns the check attached to an entity, designated by its
//! Number. 0 for global check
//! <semantic> True : recorded semantic check
//! <semantic> False : recorded syntactic check (see ReportEntity)
//! If no check is recorded for <num>, returns an empty Check
- Standard_EXPORT const Handle(Interface_Check)& Check (const Standard_Integer num, const Standard_Boolean syntactic) const;
-
+ Standard_EXPORT const Handle(Interface_Check)& Check(const Standard_Integer num,
+ const Standard_Boolean syntactic) const;
+
//! Does a reservation for the List of Entities (for optimized
//! storage management). If it is not called, storage management
//! can be less efficient. <nbent> is the expected count of
//! Entities to store
- Standard_EXPORT virtual void Reservate (const Standard_Integer nbent);
-
+ Standard_EXPORT virtual void Reservate(const Standard_Integer nbent);
+
//! Internal method for adding an Entity. Used by file reading
//! (defined by each Interface) and Transfer tools. It adds the
//! entity required to be added, not its refs : see AddWithRefs.
//! Reports, its Concerned Entity (Erroneous or Corrected, else
//! Unknown) is added to the list of Entities.
//! That is, the ReportEntity must be created before Adding
- Standard_EXPORT virtual void AddEntity (const Handle(Standard_Transient)& anentity);
-
- //! Adds to the Model, an Entity with all its References, as they
- //! are defined by General Services FillShared and ListImplied.
- //! Process is recursive (any sub-levels) if <level> = 0 (Default)
- //! Else, adds sub-entities until the required sub-level.
- //! Especially, if <level> = 1, adds immediate subs and that's all
- //!
- //! If <listall> is False (Default), an entity (<anentity> itself
- //! or one of its subs at any level) which is already recorded in
- //! the Model is not analysed, only the newly added ones are.
- //! If <listall> is True, all items are analysed (this allows to
- //! ensure the consistency of an adding made by steps)
- Standard_EXPORT void AddWithRefs (const Handle(Standard_Transient)& anent, const Handle(Interface_Protocol)& proto, const Standard_Integer level = 0, const Standard_Boolean listall = Standard_False);
-
- //! Same as above, but works with the Protocol of the Model
- Standard_EXPORT void AddWithRefs (const Handle(Standard_Transient)& anent, const Standard_Integer level = 0, const Standard_Boolean listall = Standard_False);
-
- //! Same as above, but works with an already created GeneralLib
- Standard_EXPORT void AddWithRefs (const Handle(Standard_Transient)& anent, const Interface_GeneralLib& lib, const Standard_Integer level = 0, const Standard_Boolean listall = Standard_False);
-
+ Standard_EXPORT virtual void AddEntity(const Handle(Standard_Transient)& anentity);
+
//! Replace Entity with Number=nument on other entity - "anent"
- Standard_EXPORT void ReplaceEntity (const Standard_Integer nument, const Handle(Standard_Transient)& anent);
-
+ Standard_EXPORT void ReplaceEntity(const Standard_Integer nument,
+ const Handle(Standard_Transient)& anent);
+
//! Reverses the Numbers of the Entities, between <after> and the
//! total count of Entities. Thus, the entities :
//! 1,2 ... after, after+1 ... nb-1, nb become numbered as :
//! 1,2 ... after, nb, nb-1 ... after+1
//! By default (after = 0) the whole list of Entities is reversed
- Standard_EXPORT void ReverseOrders (const Standard_Integer after = 0);
-
+ Standard_EXPORT void ReverseOrders(const Standard_Integer after = 0);
+
//! Changes the Numbers of some Entities : <oldnum> is moved to
//! <newnum>, same for <count> entities. Thus :
//! 1,2 ... newnum-1 newnum ... oldnum .. oldnum+count oldnum+count+1 .. gives
//! 1,2 ... newnum-1 oldnum .. oldnum+count newnum ... oldnum+count+1
//! (can be seen as a circular permutation)
- Standard_EXPORT void ChangeOrder (const Standard_Integer oldnum, const Standard_Integer newnum, const Standard_Integer count = 1);
-
+ Standard_EXPORT void ChangeOrder(const Standard_Integer oldnum,
+ const Standard_Integer newnum,
+ const Standard_Integer count = 1);
+
//! Gets contents from an EntityIterator, prepared by a
//! Transfer tool (e.g TransferCopy). Starts from clear
- Standard_EXPORT void GetFromTransfer (const Interface_EntityIterator& aniter);
-
+ Standard_EXPORT void GetFromTransfer(const Interface_EntityIterator& aniter);
+
//! Gets header (data specific of a defined Interface) from
//! another InterfaceModel; called from TransferCopy
- Standard_EXPORT virtual void GetFromAnother (const Handle(Interface_InterfaceModel)& other) = 0;
-
+ Standard_EXPORT virtual void GetFromAnother(const Handle(DE_DataModel)& other);
+
//! Returns a New Empty Model, same type as <me> (whatever its
//! Type); called to Copy parts a Model into other ones, then
//! followed by a call to GetFromAnother (Header) then filling
//! with specified Entities, themselves copied
- Standard_EXPORT virtual Handle(Interface_InterfaceModel) NewEmptyModel() const = 0;
-
+ Standard_EXPORT virtual Handle(DE_DataModel) NewEmptyModel() const;
+
//! Records a category number for an entity number
//! Returns True when done, False if <num> is out of range
- Standard_EXPORT Standard_Boolean SetCategoryNumber (const Standard_Integer num, const Standard_Integer val);
-
+ Standard_EXPORT Standard_Boolean SetCategoryNumber(const Standard_Integer num, const Standard_Integer val);
+
//! Returns the recorded category number for a given entity number
//! 0 if none was defined for this entity
- Standard_EXPORT Standard_Integer CategoryNumber (const Standard_Integer num) const;
-
+ Standard_EXPORT Standard_Integer CategoryNumber(const Standard_Integer num) const;
+
//! Allows an EntityIterator to get a list of Entities
- Standard_EXPORT void FillIterator (Interface_EntityIterator& iter) const;
-
+ Standard_EXPORT void FillIterator(Interface_EntityIterator& iter) const;
+
//! Returns the list of all Entities, as an Iterator on Entities
//! (the Entities themselves, not the Reports)
Standard_EXPORT Interface_EntityIterator Entities() const;
-
+
//! Returns the list of all ReportEntities, i.e. data about
//! Entities read with Error or Warning information
//! (each item has to be casted to Report Entity then it can be
//! queried for Concerned Entity, Content, Check ...)
//! By default, returns the main reports, is <semantic> is True it
//! returns the list for semantic checks
- Standard_EXPORT Interface_EntityIterator Reports (const Standard_Boolean semantic = Standard_False) const;
-
+ Standard_EXPORT Interface_EntityIterator Reports(const Standard_Boolean semantic = Standard_False) const;
+
//! Returns the list of ReportEntities which redefine data
//! (generally, if concerned entity is "Error", a literal content
//! is added to it : this is a "redefined entity"
Standard_EXPORT Interface_EntityIterator Redefineds() const;
-
+
//! Returns the GlobalCheck, which memorizes messages global to
//! the file (not specific to an Entity), especially Header
- Standard_EXPORT const Handle(Interface_Check)& GlobalCheck (const Standard_Boolean syntactic = Standard_True) const;
-
+ Standard_EXPORT const Handle(Interface_Check)& GlobalCheck(const Standard_Boolean syntactic = Standard_True) const;
+
//! Allows to modify GlobalCheck, after getting then completing it
//! Remark : it is SYNTACTIC check. Semantics, see FillChecks
- Standard_EXPORT void SetGlobalCheck (const Handle(Interface_Check)& ach);
-
+ Standard_EXPORT void SetGlobalCheck(const Handle(Interface_Check)& ach);
+
//! Minimum Semantic Global Check on data in model (header)
//! Can only check basic Data. See also GlobalCheck from Protocol
//! for a check which takes the Graph into account
//! Default does nothing, can be redefined
- Standard_EXPORT virtual void VerifyCheck (Handle(Interface_Check)& ach) const;
-
- //! Dumps Header in a short, easy to read, form, onto a Stream
- //! <level> allows to print more or less parts of the header,
- //! if necessary. 0 for basic print
- Standard_EXPORT virtual void DumpHeader (Standard_OStream& S, const Standard_Integer level = 0) const = 0;
-
- //! Prints identification of a given entity in <me>, in order to
- //! be printed in a list or phrase
- //! <mode> < 0 : prints only its number
- //! <mode> = 1 : just calls PrintLabel
- //! <mode> = 0 (D) : prints its number plus '/' plus PrintLabel
- //! If <ent> == <me>, simply prints "Global"
- //! If <ent> is unknown, prints "??/its type"
- Standard_EXPORT void Print (const Handle(Standard_Transient)& ent, Standard_OStream& s, const Standard_Integer mode = 0) const;
-
- //! Prints label specific to each norm, for a given entity.
- //! Must only print label itself, in order to be included in a
- //! phrase. Can call the result of StringLabel, but not obliged.
- Standard_EXPORT virtual void PrintLabel (const Handle(Standard_Transient)& ent, Standard_OStream& S) const = 0;
-
- //! Prints label specific to each norm in log format, for
- //! a given entity.
- //! By default, just calls PrintLabel, can be redefined
- Standard_EXPORT virtual void PrintToLog (const Handle(Standard_Transient)& ent, Standard_OStream& S) const;
-
+ Standard_EXPORT virtual void VerifyCheck(Handle(Interface_Check)& ach) const;
+
//! Returns a string with the label attached to a given entity.
//! Warning : While this string may be edited on the spot, if it is a read
//! field, the returned value must be copied before.
- Standard_EXPORT virtual Handle(TCollection_HAsciiString) StringLabel (const Handle(Standard_Transient)& ent) const = 0;
-
+ Standard_EXPORT virtual Handle(TCollection_HAsciiString) StringLabel(const Handle(Standard_Transient)& ent) const;
+
//! Searches a label which matches with one entity.
//! Begins from <lastnum>+1 (default:1) and scans the entities
//! until <NbEntities>. For the first which matches <label>,
//!
//! This method is virtual, hence it can be redefined for a more
//! efficient search (if exact is true).
- Standard_EXPORT virtual Standard_Integer NextNumberForLabel (const Standard_CString label, const Standard_Integer lastnum = 0, const Standard_Boolean exact = Standard_True) const;
-
- //! Returns true if a template is attached to a given name
- Standard_EXPORT static Standard_Boolean HasTemplate (const Standard_CString name);
-
- //! Returns the template model attached to a name, or a Null Handle
- Standard_EXPORT static Handle(Interface_InterfaceModel) Template (const Standard_CString name);
-
- //! Records a new template model with a name. If the name was
- //! already recorded, the corresponding template is replaced by
- //! the new one. Then, WARNING : test HasTemplate to avoid
- //! surprises
- Standard_EXPORT static Standard_Boolean SetTemplate (const Standard_CString name, const Handle(Interface_InterfaceModel)& model);
-
- //! Returns the complete list of names attached to template models
- Standard_EXPORT static Handle(TColStd_HSequenceOfHAsciiString) ListTemplates();
-
-
-
- DEFINE_STANDARD_RTTIEXT(Interface_InterfaceModel,Standard_Transient)
-
-protected:
-
-
- //! Defines empty InterfaceModel, ready to be filled
- Standard_EXPORT Interface_InterfaceModel();
-
+ Standard_EXPORT virtual Standard_Integer NextNumberForLabel(const Standard_CString label,
+ const Standard_Integer lastnum = 0,
+ const Standard_Boolean exact = Standard_True) const;
+ DEFINE_STANDARD_RTTIEXT(DE_DataModel, Standard_Transient)
private:
-
TColStd_IndexedMapOfTransient theentities;
TColStd_DataMapOfIntegerTransient thereports;
TColStd_DataMapOfIntegerTransient therepch;
Handle(Interface_Check) thecheckstx;
Handle(Interface_Check) thechecksem;
- Standard_Boolean haschecksem;
- Standard_Boolean isdispatch;
- Handle(TCollection_HAsciiString) thecategory;
- Handle(Interface_GTool) thegtool;
-
-
};
-
-
-
-
-
-
-#endif // _Interface_InterfaceModel_HeaderFile
+#endif // _DE_DataModel_HeaderFile
+++ /dev/null
-// Copyright (c) 1999-2014 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement.
-
-#include <Interface_Static.hxx>
-
-#include <OSD_Path.hxx>
-#include <Standard_Transient.hxx>
-#include <Standard_Type.hxx>
-#include <TCollection_HAsciiString.hxx>
-
-#include <stdio.h>
-IMPLEMENT_STANDARD_RTTIEXT(Interface_Static,Interface_TypedValue)
-
-static char defmess[31];
-
-// Fonctions Satisfies offertes en standard ...
-
-//svv #2
-//static Standard_Boolean StaticPath(const Handle(TCollection_HAsciiString)& val)
-//{
-// OSD_Path apath;
-// return apath.IsValid (TCollection_AsciiString(val->ToCString()));
-//}
-
-
- Interface_Static::Interface_Static
- (const Standard_CString family, const Standard_CString name,
- const Interface_ParamType type, const Standard_CString init)
- : Interface_TypedValue (name,type,init) ,
- thefamily (family) ,
- theupdate (Standard_True) { }
-
- Interface_Static::Interface_Static
- (const Standard_CString family, const Standard_CString name,
- const Handle(Interface_Static)& other)
- : Interface_TypedValue (name, other->Type(), "") ,
- thefamily (family) ,
- theupdate (Standard_True)
-{
- switch (Type()) {
- case Interface_ParamInteger : {
- Standard_Integer lim;
- if (other->IntegerLimit (Standard_True ,lim)) SetIntegerLimit (Standard_True ,lim);
- if (other->IntegerLimit (Standard_False,lim)) SetIntegerLimit (Standard_False,lim);
- }
- break;
- case Interface_ParamReal : {
- Standard_Real lim;
- if (other->RealLimit (Standard_True ,lim)) SetRealLimit (Standard_True ,lim);
- if (other->RealLimit (Standard_False,lim)) SetRealLimit (Standard_False,lim);
- SetUnitDef (other->UnitDef());
- }
- break;
- case Interface_ParamEnum : {
- Standard_Boolean match; Standard_Integer e0,e1,i;
- other->EnumDef (e0,e1,match);
- StartEnum (e0,match);
-// if (e1 >= e0) theenums = new TColStd_HArray1OfAsciiString(e0,e1);
- for (i = e0; i <= e1; i ++)
- AddEnum (other->EnumVal(i));
- }
- break;
- case Interface_ParamIdent :
- SetObjectType (other->ObjectType());
- break;
- default : break;
- }
-
- if (other->IsSetValue()) SetCStringValue (other->CStringValue());
-}
-
-
-// ## Print ##
-
-void Interface_Static::PrintStatic (Standard_OStream& S) const
-{
- S <<"--- Static Value : "<<Name()<<" Family:"<<Family();
- Print (S);
- if (!thewild.IsNull())
- S <<" -- Attached to wild-card : "<<thewild->Name()<<std::endl;
- S <<"--- Actual status : "<<(theupdate ? "" : "original")<<" Value : ";
-
- if (thesatisf) S <<" -- Specific Function for Satisfies : "<<thesatisn.ToCString()<<std::endl;
-}
-
-
-// ######### COMPLEMENTS ##########
-
-Standard_CString Interface_Static::Family () const
-{
- return thefamily.ToCString();
-}
-
-
-Handle(Interface_Static) Interface_Static::Wild () const
-{
- return thewild;
-}
-
-
-void Interface_Static::SetWild (const Handle(Interface_Static)& wild)
-{
- thewild = wild;
-}
-
-
-// ######### UPDATE ##########
-
-void Interface_Static::SetUptodate ()
-{
- theupdate = Standard_True;
-}
-
-
-Standard_Boolean Interface_Static::UpdatedStatus () const
-{
- return theupdate;
-}
-
-
-
-// #######################################################################
-// ######### DICTIONNAIRE DES STATICS (static sur Static) ##########
-
-Standard_Boolean Interface_Static::Init
- (const Standard_CString family, const Standard_CString name,
- const Interface_ParamType type, const Standard_CString init)
-{
- if (name[0] == '\0') return Standard_False;
-
- if (MoniTool_TypedValue::Stats().IsBound(name)) return Standard_False;
- Handle(Interface_Static) item;
- if (type == Interface_ParamMisc) {
- Handle(Interface_Static) other = Interface_Static::Static(init);
- if (other.IsNull()) return Standard_False;
- item = new Interface_Static (family,name,other);
- }
- else item = new Interface_Static (family,name,type,init);
-
- MoniTool_TypedValue::Stats().Bind (name,item);
- return Standard_True;
-}
-
-
-Standard_Boolean Interface_Static::Init
- (const Standard_CString family, const Standard_CString name,
- const Standard_Character type, const Standard_CString init)
-{
- Interface_ParamType epyt;
- switch (type) {
- case 'e' : epyt = Interface_ParamEnum; break;
- case 'i' : epyt = Interface_ParamInteger; break;
- case 'o' : epyt = Interface_ParamIdent; break;
- case 'p' : epyt = Interface_ParamText; break;
- case 'r' : epyt = Interface_ParamReal; break;
- case 't' : epyt = Interface_ParamText; break;
- case '=' : epyt = Interface_ParamMisc; break;
- case '&' : {
- Handle(Interface_Static) unstat = Interface_Static::Static(name);
- if (unstat.IsNull()) return Standard_False;
-// Editions : init donne un petit texte d edition, en 2 termes "cmd var" :
-// imin <ival> imax <ival> rmin <rval> rmax <rval> unit <def>
-// enum <from> ematch <from> eval <cval>
- Standard_Integer i,iblc = 0;
- for (i = 0; init[i] != '\0'; i ++) if (init[i] == ' ') iblc = i+1;
-// Reconnaissance du sous-cas et aiguillage
- if (init[0] == 'i' && init[2] == 'i')
- unstat->SetIntegerLimit (Standard_False,atoi(&init[iblc]));
- else if (init[0] == 'i' && init[2] == 'a')
- unstat->SetIntegerLimit (Standard_True ,atoi(&init[iblc]));
- else if (init[0] == 'r' && init[2] == 'i')
- unstat->SetRealLimit (Standard_False,Atof(&init[iblc]));
- else if (init[0] == 'r' && init[2] == 'a')
- unstat->SetRealLimit (Standard_True ,Atof(&init[iblc]));
- else if (init[0] == 'u')
- unstat->SetUnitDef (&init[iblc]);
- else if (init[0] == 'e' && init[1] == 'm')
- unstat->StartEnum (atoi(&init[iblc]),Standard_True);
- else if (init[0] == 'e' && init[1] == 'n')
- unstat->StartEnum (atoi(&init[iblc]),Standard_False);
- else if (init[0] == 'e' && init[1] == 'v')
- unstat->AddEnum (&init[iblc]);
- else return Standard_False;
- return Standard_True;
- }
- default : return Standard_False;
- }
- if (!Interface_Static::Init (family,name,epyt,init)) return Standard_False;
- if (type != 'p') return Standard_True;
- Handle(Interface_Static) stat = Interface_Static::Static(name);
-//NT stat->SetSatisfies (StaticPath,"Path");
- if (!stat->Satisfies(stat->HStringValue())) stat->SetCStringValue("");
- return Standard_True;
-}
-
-
-Handle(Interface_Static) Interface_Static::Static
- (const Standard_CString name)
-{
- Handle(Standard_Transient) result;
- MoniTool_TypedValue::Stats().Find(name, result);
- return Handle(Interface_Static)::DownCast(result);
-}
-
-
-Standard_Boolean Interface_Static::IsPresent (const Standard_CString name)
-{
- return MoniTool_TypedValue::Stats().IsBound (name);
-}
-
-
-Standard_CString Interface_Static::CDef
- (const Standard_CString name, const Standard_CString part)
-{
- if (!part || part[0] == '\0') return "";
- Handle(Interface_Static) stat = Interface_Static::Static(name);
- if (stat.IsNull()) return "";
- if (part[0] == 'f' && part[1] == 'a') return stat->Family();
- if (part[0] == 'l' && part[1] == 'a') return stat->Label();
- if (part[0] == 's' && part[1] == 'a') return stat->SatisfiesName();
- if (part[0] == 't' && part[1] == 'y') {
- Interface_ParamType typ = stat->Type();
- if (typ == Interface_ParamInteger) return "integer";
- if (typ == Interface_ParamReal) return "real";
- if (typ == Interface_ParamText) return "text";
- if (typ == Interface_ParamEnum) return "enum";
- return "?type?";
- }
- if (part[0] == 'e') {
- Standard_Integer nume = 0;
- sscanf (part,"%30s %d",defmess,&nume);
- return stat->EnumVal(nume);
- }
- if (part[0] == 'i') {
- Standard_Integer ilim;
- if (!stat->IntegerLimit((part[2] == 'a'),ilim)) return "";
- Sprintf(defmess,"%d",ilim); return defmess;
- }
- if (part[0] == 'r') {
- Standard_Real rlim;
- if (!stat->RealLimit((part[2] == 'a'),rlim)) return "";
- Sprintf(defmess,"%f",rlim); return defmess;
- }
- if (part[0] == 'u') return stat->UnitDef();
- return "";
-}
-
-
-Standard_Integer Interface_Static::IDef
- (const Standard_CString name, const Standard_CString part)
-{
- if (!part || part[0] == '\0') return 0;
- Handle(Interface_Static) stat = Interface_Static::Static(name);
- if (stat.IsNull()) return 0;
- if (part[0] == 'i') {
- Standard_Integer ilim;
- if (!stat->IntegerLimit((part[2] == 'a'),ilim)) return 0;
- return ilim;
- }
- if (part[0] == 'e') {
- Standard_Integer startcase,endcase; Standard_Boolean match;
- stat->EnumDef (startcase,endcase,match);
- if (part[1] == 's') return startcase;
- if (part[1] == 'c') return (endcase - startcase + 1);
- if (part[1] == 'm') return (match ? 1 : 0);
- if (part[1] == 'v') {
- char vale[51];
- sscanf (part,"%30s %50s",defmess,vale);
- return stat->EnumCase (vale);
- }
- }
- return 0;
-}
-
-
-// ########## VALEUR COURANTE ###########
-
-Standard_Boolean Interface_Static::IsSet
- (const Standard_CString name, const Standard_Boolean proper)
-{
- Handle(Interface_Static) item = Interface_Static::Static(name);
- if (item.IsNull()) return Standard_False;
- if (item->IsSetValue()) return Standard_True;
- if (proper) return Standard_False;
- item = item->Wild();
- return item->IsSetValue();
-}
-
-
-Standard_CString Interface_Static::CVal (const Standard_CString name)
-{
- Handle(Interface_Static) item = Interface_Static::Static(name);
- if (item.IsNull()) {
-#ifdef OCCT_DEBUG
- std::cout << "Warning: Interface_Static::CVal: incorrect parameter " << name << std::endl;
-#endif
- return "";
- }
- return item->CStringValue();
-}
-
-
-Standard_Integer Interface_Static::IVal (const Standard_CString name)
-{
- Handle(Interface_Static) item = Interface_Static::Static(name);
- if (item.IsNull()) {
-#ifdef OCCT_DEBUG
- std::cout << "Warning: Interface_Static::IVal: incorrect parameter " << name << std::endl;
-#endif
- return 0;
- }
- return item->IntegerValue();
-}
-
-
-Standard_Real Interface_Static::RVal (const Standard_CString name)
-{
- Handle(Interface_Static) item = Interface_Static::Static(name);
- if (item.IsNull()) {
-#ifdef OCCT_DEBUG
- std::cout << "Warning: Interface_Static::RVal: incorrect parameter " << name << std::endl;
-#endif
- return 0.0;
- }
- return item->RealValue();
-}
-
-
-Standard_Boolean Interface_Static::SetCVal
- (const Standard_CString name, const Standard_CString val)
-{
- Handle(Interface_Static) item = Interface_Static::Static(name);
- if (item.IsNull()) return Standard_False;
- return item->SetCStringValue(val);
-}
-
-
-Standard_Boolean Interface_Static::SetIVal
- (const Standard_CString name, const Standard_Integer val)
-{
- Handle(Interface_Static) item = Interface_Static::Static(name);
- if (item.IsNull()) return Standard_False;
- if (!item->SetIntegerValue(val)) return Standard_False;
- return Standard_True;
-}
-
-
-Standard_Boolean Interface_Static::SetRVal
- (const Standard_CString name, const Standard_Real val)
-{
- Handle(Interface_Static) item = Interface_Static::Static(name);
- if (item.IsNull()) return Standard_False;
- return item->SetRealValue(val);
-}
-
-// UPDATE
-
-Standard_Boolean Interface_Static::Update (const Standard_CString name)
-{
- Handle(Interface_Static) item = Interface_Static::Static(name);
- if (item.IsNull()) return Standard_False;
- item->SetUptodate();
- return Standard_True;
-}
-
-Standard_Boolean Interface_Static::IsUpdated (const Standard_CString name)
-{
- Handle(Interface_Static) item = Interface_Static::Static(name);
- if (item.IsNull()) return Standard_False;
- return item->UpdatedStatus();
-}
-
-Handle(TColStd_HSequenceOfHAsciiString) Interface_Static::Items
- (const Standard_Integer mode, const Standard_CString criter)
-{
- Standard_Integer modup = (mode / 100); // 0 any, 1 non-update, 2 update
- Handle(TColStd_HSequenceOfHAsciiString) list =
- new TColStd_HSequenceOfHAsciiString();
- NCollection_DataMap<TCollection_AsciiString, Handle(Standard_Transient)>::Iterator iter(MoniTool_TypedValue::Stats());
- for (; iter.More(); iter.Next()) {
- Handle(Interface_Static) item =
- Handle(Interface_Static)::DownCast(iter.Value());
- if (item.IsNull()) continue;
- Standard_Boolean ok = Standard_True;
- if (criter[0] == '$' && criter[1] == '\0') {
- if ( (item->Family())[0] != '$') ok = Standard_False;
- } else if (criter[0] != '\0') {
- if (strcmp(criter, item->Family())) continue;
- ok = Standard_True;
- } else { // tous ... sauf famille a $
- if (item->Family()[0] == '$') continue;
- }
- if (ok && (modup == 1)) ok = !item->UpdatedStatus();
- if (ok && (modup == 2)) ok = item->UpdatedStatus();
-
- if (ok) list->Append (new TCollection_HAsciiString (iter.Key()) );
- }
- return list;
-}
-
-//=======================================================================
-// function : FillMap
-// purpose : Fills given string-to-string map with all static data
-//=======================================================================
-void Interface_Static::FillMap (NCollection_DataMap<TCollection_AsciiString, TCollection_AsciiString, TCollection_AsciiString>& theMap)
-{
- theMap.Clear();
-
- NCollection_DataMap<TCollection_AsciiString, Handle(Standard_Transient)>& aMap = MoniTool_TypedValue::Stats();
-
- for (NCollection_DataMap<TCollection_AsciiString, Handle(Standard_Transient)>::Iterator anIt(aMap); anIt.More(); anIt.Next())
- {
- Handle(Interface_Static) aValue = Handle(Interface_Static)::DownCast(anIt.Value());
- if (aValue.IsNull())
- {
- continue;
- }
- if (aValue->HStringValue().IsNull())
- {
- continue;
- }
-
- theMap.Bind (anIt.Key(), aValue->HStringValue()->String());
- }
-}
+++ /dev/null
-// Created on: 1995-12-08
-// Created by: Christian CAILLET
-// Copyright (c) 1995-1999 Matra Datavision
-// Copyright (c) 1999-2014 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement.
-
-#ifndef _Interface_Static_HeaderFile
-#define _Interface_Static_HeaderFile
-
-#include <Standard.hxx>
-
-#include <Standard_Integer.hxx>
-#include <Standard_Real.hxx>
-#include <Interface_StaticSatisfies.hxx>
-#include <Interface_TypedValue.hxx>
-#include <TColStd_HSequenceOfHAsciiString.hxx>
-class TCollection_HAsciiString;
-
-class Interface_Static;
-DEFINE_STANDARD_HANDLE(Interface_Static, Interface_TypedValue)
-
-//! This class gives a way to manage meaningful static variables,
-//! used as "global" parameters in various procedures.
-//!
-//! A Static brings a specification (its type, constraints if any)
-//! and a value. Its basic form is a string, it can be specified
-//! as integer or real or enumerative string, and queried as such.
-//! Its string content, which is a Handle(HAsciiString) can be
-//! shared by other data structures, hence gives a direct on line
-//! access to its value.
-//!
-//! All this description is inherited from TypedValue
-//!
-//! A Static can be given an initial value, it can be filled from,
-//! either a set of Resources (an applicative feature which
-//! accesses and manages parameter files), or environment or
-//! internal definition : these define families of Static.
-//! In addition, it supports a status for reinitialisation : an
-//! initialisation procedure can ask if the value of the Static
-//! has changed from its last call, in this case does something
-//! then marks the Status "uptodate", else it does nothing.
-//!
-//! Statics are named and recorded then accessed in an alphabetic
-//! dictionary
-class Interface_Static : public Interface_TypedValue
-{
-
-public:
-
-
- //! Creates and records a Static, with a family and a name
- //! family can report to a name of resource or to a system or
- //! internal definition. The name must be unique.
- //!
- //! type gives the type of the parameter, default is free text
- //! Also available : Integer, Real, Enum, Entity (i.e. Object)
- //! More precise specifications, titles, can be given to the
- //! Static once created
- //!
- //! init gives an initial value. If it is not given, the Static
- //! begin as "not set", its value is empty
- Standard_EXPORT Interface_Static(const Standard_CString family, const Standard_CString name, const Interface_ParamType type = Interface_ParamText, const Standard_CString init = "");
-
- //! Creates a new Static with same definition as another one
- //! (value is copied, except for Entity : it remains null)
- Standard_EXPORT Interface_Static(const Standard_CString family, const Standard_CString name, const Handle(Interface_Static)& other);
-
- //! Writes the properties of a
- //! parameter in the diagnostic file. These include:
- //! - Name
- //! - Family,
- //! - Wildcard (if it has one)
- //! - Current status (empty string if it was updated or
- //! if it is the original one)
- //! - Value
- Standard_EXPORT void PrintStatic (Standard_OStream& S) const;
-
- //! Returns the family. It can be : a resource name for applis,
- //! an internal name between : $e (environment variables),
- //! $l (other, purely local)
- Standard_EXPORT Standard_CString Family() const;
-
- //! Sets a "wild-card" static : its value will be considered
- //! if <me> is not properly set. (reset by set a null one)
- Standard_EXPORT void SetWild (const Handle(Interface_Static)& wildcard);
-
- //! Returns the wildcard static, which can be (is most often) null
- Standard_EXPORT Handle(Interface_Static) Wild() const;
-
- //! Records a Static has "uptodate", i.e. its value has been taken
- //! into account by a reinitialisation procedure
- //! This flag is reset at each successful SetValue
- Standard_EXPORT void SetUptodate();
-
- //! Returns the status "uptodate"
- Standard_EXPORT Standard_Boolean UpdatedStatus() const;
-
- //! Declares a new Static (by calling its constructor)
- //! If this name is already taken, does nothing and returns False
- //! Else, creates it and returns True
- //! For additional definitions, get the Static then edit it
- Standard_EXPORT static Standard_Boolean Init (const Standard_CString family, const Standard_CString name, const Interface_ParamType type, const Standard_CString init = "");
-
- //! As Init with ParamType, but type is given as a character
- //! This allows a simpler call
- //! Types : 'i' Integer, 'r' Real, 't' Text, 'e' Enum, 'o' Object
- //! '=' for same definition as, <init> gives the initial Static
- //! Returns False if <type> does not match this list
- Standard_EXPORT static Standard_Boolean Init (const Standard_CString family, const Standard_CString name, const Standard_Character type, const Standard_CString init = "");
-
- //! Returns a Static from its name. Null Handle if not present
- Standard_EXPORT static Handle(Interface_Static) Static (const Standard_CString name);
-
- //! Returns True if a Static named <name> is present, False else
- Standard_EXPORT static Standard_Boolean IsPresent (const Standard_CString name);
-
- //! Returns a part of the definition of a Static, as a CString
- //! The part is designated by its name, as a CString
- //! If the required value is not a string, it is converted to a
- //! CString then returned
- //! If <name> is not present, or <part> not defined for <name>,
- //! this function returns an empty string
- //!
- //! Allowed parts for CDef :
- //! family : the family
- //! type : the type ("integer","real","text","enum")
- //! label : the label
- //! satis : satisfy function name if any
- //! rmin : minimum real value
- //! rmax : maximum real value
- //! imin : minimum integer value
- //! imax : maximum integer value
- //! enum nn (nn : value of an integer) : enum value for nn
- //! unit : unit definition for a real
- Standard_EXPORT static Standard_CString CDef (const Standard_CString name, const Standard_CString part);
-
- //! Returns a part of the definition of a Static, as an Integer
- //! The part is designated by its name, as a CString
- //! If the required value is not a string, returns zero
- //! For a Boolean, 0 for false, 1 for true
- //! If <name> is not present, or <part> not defined for <name>,
- //! this function returns zero
- //!
- //! Allowed parts for IDef :
- //! imin, imax : minimum or maximum integer value
- //! estart : starting number for enum
- //! ecount : count of enum values (starting from estart)
- //! ematch : exact match status
- //! eval val : case determined from a string
- Standard_EXPORT static Standard_Integer IDef (const Standard_CString name, const Standard_CString part);
-
- //! Returns True if <name> is present AND set
- //! <proper> True (D) : considers this item only
- //! <proper> False : if not set and attached to a wild-card,
- //! considers this wild-card
- Standard_EXPORT static Standard_Boolean IsSet (const Standard_CString name, const Standard_Boolean proper = Standard_True);
-
- //! Returns the value of the
- //! parameter identified by the string name.
- //! If the specified parameter does not exist, an empty
- //! string is returned.
- //! Example
- //! Interface_Static::CVal("write.step.schema");
- //! which could return:
- //! "AP214"
- Standard_EXPORT static Standard_CString CVal (const Standard_CString name);
-
- //! Returns the integer value of
- //! the translation parameter identified by the string name.
- //! Returns the value 0 if the parameter does not exist.
- //! Example
- //! Interface_Static::IVal("write.step.schema");
- //! which could return: 3
- Standard_EXPORT static Standard_Integer IVal (const Standard_CString name);
-
- //! Returns the value of a static
- //! translation parameter identified by the string name.
- //! Returns the value 0.0 if the parameter does not exist.
- Standard_EXPORT static Standard_Real RVal (const Standard_CString name);
-
- //! Modifies the value of the
- //! parameter identified by name. The modification is specified
- //! by the string val. false is returned if the parameter does not exist.
- //! Example
- //! Interface_Static::SetCVal
- //! ("write.step.schema","AP203")
- //! This syntax specifies a switch from the default STEP 214 mode to STEP 203 mode.
- Standard_EXPORT static Standard_Boolean SetCVal (const Standard_CString name, const Standard_CString val);
-
- //! Modifies the value of the
- //! parameter identified by name. The modification is specified
- //! by the integer value val. false is returned if the
- //! parameter does not exist.
- //! Example
- //! Interface_Static::SetIVal
- //! ("write.step.schema", 3)
- //! This syntax specifies a switch from the default STEP 214 mode to STEP 203 mode.S
- Standard_EXPORT static Standard_Boolean SetIVal (const Standard_CString name, const Standard_Integer val);
-
- //! Modifies the value of a
- //! translation parameter. false is returned if the
- //! parameter does not exist. The modification is specified
- //! by the real number value val.
- Standard_EXPORT static Standard_Boolean SetRVal (const Standard_CString name, const Standard_Real val);
-
- //! Sets a Static to be "uptodate"
- //! Returns False if <name> is not present
- //! This status can be used by a reinitialisation procedure to
- //! rerun if a value has been changed
- Standard_EXPORT static Standard_Boolean Update (const Standard_CString name);
-
- //! Returns the status "uptodate" from a Static
- //! Returns False if <name> is not present
- Standard_EXPORT static Standard_Boolean IsUpdated (const Standard_CString name);
-
- //! Returns a list of names of statics :
- //! <mode> = 0 (D) : criter is for family
- //! <mode> = 1 : criter is regexp on names, takes final items
- //! (ignore wild cards)
- //! <mode> = 2 : idem but take only wilded, not final items
- //! <mode> = 3 : idem, take all items matching criter
- //! idem + 100 : takes only non-updated items
- //! idem + 200 : takes only updated items
- //! criter empty (D) : returns all names
- //! else returns names which match the given criter
- //! Remark : families beginning by '$' are not listed by criter ""
- //! they are listed only by criter "$"
- //!
- //! This allows for instance to set new values after having loaded
- //! or reloaded a resource, then to update them as required
- Standard_EXPORT static Handle(TColStd_HSequenceOfHAsciiString) Items (const Standard_Integer mode = 0, const Standard_CString criter = "");
-
- //! Initializes all standard static parameters, which can be used
- //! by every function. statics specific of a norm or a function
- //! must be defined around it
- Standard_EXPORT static void Standards();
-
- //! Fills given string-to-string map with all static data
- Standard_EXPORT static void FillMap(NCollection_DataMap<TCollection_AsciiString, TCollection_AsciiString, TCollection_AsciiString>& theMap);
-
- DEFINE_STANDARD_RTTIEXT(Interface_Static,Interface_TypedValue)
-
-protected:
-
-
-
-
-private:
-
-
- TCollection_AsciiString thefamily;
- TCollection_AsciiString thename;
- TCollection_AsciiString thelabel;
- Interface_ParamType thetype;
- Handle(Standard_Type) theotyp;
- Handle(Interface_Static) thewild;
- Standard_Integer thelims;
- Standard_Integer theintlow;
- Standard_Integer theintup;
- Standard_Real therealow;
- Standard_Real therealup;
- TCollection_AsciiString theunidef;
- Handle(TColStd_HArray1OfAsciiString) theenums;
- NCollection_DataMap<TCollection_AsciiString, Standard_Integer> theeadds;
- Interface_StaticSatisfies thesatisf;
- TCollection_AsciiString thesatisn;
- Standard_Boolean theupdate;
- Standard_Integer theival;
- Handle(TCollection_HAsciiString) thehval;
- Handle(Standard_Transient) theoval;
-
-
-};
-
-
-
-
-
-
-
-#endif // _Interface_Static_HeaderFile
//=======================================================================
Standard_Boolean DE_Provider::Read(const TCollection_AsciiString& thePath,
const Handle(TDocStd_Document)& theDocument,
- Handle(XSControl_WorkSession)& theWS,
+ Handle(DE_WorkSession)& theWS,
const Message_ProgressRange& theProgress)
{
(void)thePath;
bool DE_Provider::Read(std::istream& theIStream,
const Handle(TDocStd_Document)& theDocument,
const TCollection_AsciiString theName,
- Handle(XSControl_WorkSession)& theWS,
+ Handle(DE_WorkSession)& theWS,
const Message_ProgressRange& theProgress)
{
(void)theName;
//=======================================================================
Standard_Boolean DE_Provider::Write(const TCollection_AsciiString& thePath,
const Handle(TDocStd_Document)& theDocument,
- Handle(XSControl_WorkSession)& theWS,
+ Handle(DE_WorkSession)& theWS,
const Message_ProgressRange& theProgress)
{
(void)thePath;
//=======================================================================
bool DE_Provider::Write(std::ostream& theOStream,
const Handle(TDocStd_Document)& theDocument,
- Handle(XSControl_WorkSession)& theWS,
+ Handle(DE_WorkSession)& theWS,
const Message_ProgressRange& theProgress)
{
if (myNode.IsNull() ||
//=======================================================================
Standard_Boolean DE_Provider::Read(const TCollection_AsciiString& thePath,
TopoDS_Shape& theShape,
- Handle(XSControl_WorkSession)& theWS,
+ Handle(DE_WorkSession)& theWS,
const Message_ProgressRange& theProgress)
{
(void)thePath;
bool DE_Provider::Read(std::istream& theIStream,
TopoDS_Shape& theShape,
const TCollection_AsciiString theName,
- Handle(XSControl_WorkSession)& theWS,
+ Handle(DE_WorkSession)& theWS,
const Message_ProgressRange& theProgress)
{
(void)theName;
//=======================================================================
Standard_Boolean DE_Provider::Write(const TCollection_AsciiString& thePath,
const TopoDS_Shape& theShape,
- Handle(XSControl_WorkSession)& theWS,
+ Handle(DE_WorkSession)& theWS,
const Message_ProgressRange& theProgress)
{
(void)thePath;
//=======================================================================
bool DE_Provider::Write(std::ostream& theOStream,
const TopoDS_Shape& theShape,
- Handle(XSControl_WorkSession)& theWS,
+ Handle(DE_WorkSession)& theWS,
const Message_ProgressRange& theProgress)
{
if (myNode.IsNull() ||
class DE_ConfigurationNode;
class TopoDS_Shape;
-class XSControl_WorkSession;
+class DE_WorkSession;
class TDocStd_Document;
//! Base class to make transfer process.
//! @return True if Read was successful
Standard_EXPORT virtual bool Read(const TCollection_AsciiString& thePath,
const Handle(TDocStd_Document)& theDocument,
- Handle(XSControl_WorkSession)& theWS,
+ Handle(DE_WorkSession)& theWS,
const Message_ProgressRange& theProgress = Message_ProgressRange());
//! Reads a CAD file, according internal configuration
Standard_EXPORT virtual bool Read(std::istream& theIStream,
const Handle(TDocStd_Document)& theDocument,
const TCollection_AsciiString theName,
- Handle(XSControl_WorkSession)& theWS,
+ Handle(DE_WorkSession)& theWS,
const Message_ProgressRange& theProgress = Message_ProgressRange());
//! Writes a CAD file, according internal configuration
//! @return True if Write was successful
Standard_EXPORT virtual bool Write(const TCollection_AsciiString& thePath,
const Handle(TDocStd_Document)& theDocument,
- Handle(XSControl_WorkSession)& theWS,
+ Handle(DE_WorkSession)& theWS,
const Message_ProgressRange& theProgress = Message_ProgressRange());
//! Writes a CAD file, according internal configuration
//! @return true if Write operation has ended correctly
Standard_EXPORT virtual bool Write(std::ostream& theOStream,
const Handle(TDocStd_Document)& theDocument,
- Handle(XSControl_WorkSession)& theWS,
+ Handle(DE_WorkSession)& theWS,
const Message_ProgressRange& theProgress = Message_ProgressRange());
//! Reads a CAD file, according internal configuration
//! @return True if Read was successful
Standard_EXPORT virtual bool Read(const TCollection_AsciiString& thePath,
TopoDS_Shape& theShape,
- Handle(XSControl_WorkSession)& theWS,
+ Handle(DE_WorkSession)& theWS,
const Message_ProgressRange& theProgress = Message_ProgressRange());
//! Reads a CAD file, according internal configuration
Standard_EXPORT virtual bool Read(std::istream& theIStream,
TopoDS_Shape& theShape,
const TCollection_AsciiString theName,
- Handle(XSControl_WorkSession)& theWS,
+ Handle(DE_WorkSession)& theWS,
const Message_ProgressRange& theProgress = Message_ProgressRange());
//! Writes a CAD file, according internal configuration
//! @return True if Write was successful
Standard_EXPORT virtual bool Write(const TCollection_AsciiString& thePath,
const TopoDS_Shape& theShape,
- Handle(XSControl_WorkSession)& theWS,
+ Handle(DE_WorkSession)& theWS,
const Message_ProgressRange& theProgress = Message_ProgressRange());
//! Writes a CAD file, according internal configuration
//! @return true if Write operation has ended correctly
Standard_EXPORT virtual bool Write(std::ostream& theOStream,
const TopoDS_Shape& theShape,
- Handle(XSControl_WorkSession)& theWS,
+ Handle(DE_WorkSession)& theWS,
const Message_ProgressRange& theProgress = Message_ProgressRange());
public:
+++ /dev/null
-// Created on: 1992-09-21
-// Created by: Christian CAILLET
-// Copyright (c) 1992-1999 Matra Datavision
-// Copyright (c) 1999-2014 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement.
-
-#ifndef _IFSelect_ReturnStatus_HeaderFile
-#define _IFSelect_ReturnStatus_HeaderFile
-
-//! Qualifies an execution status :
-//! RetVoid : normal execution which created nothing, or
-//! no data to process
-//! RetDone : normal execution with a result
-//! RetError : error in command or input data, no execution
-//! RetFail : execution was run and has failed
-//! RetStop : indicates end or stop (such as Raise)
-enum XSControl_ReturnStatus
-{
-XSControl_RetVoid,
-XSControl_RetDone,
-XSControl_RetError,
-XSControl_RetFail,
-XSControl_RetStop
-};
-
-#endif // _IFSelect_ReturnStatus_HeaderFile
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
-#include <XSControl_WorkSession.hxx>
+#include <DE_WorkSession.hxx>
#include <Interface_Check.hxx>
-#include <Interface_InterfaceModel.hxx>
+#include <DE_DataModel.hxx>
#include <Interface_Macros.hxx>
#include <Message_Messenger.hxx>
#include <Message_ProgressScope.hxx>
#include <XSControl_TransferReader.hxx>
#include <XSControl_TransferWriter.hxx>
-IMPLEMENT_STANDARD_RTTIEXT(XSControl_WorkSession, Standard_Transient)
+IMPLEMENT_STANDARD_RTTIEXT(DE_WorkSession, Standard_Transient)
//=======================================================================
-//function : XSControl_WorkSession
+//function : DE_WorkSession
//purpose :
//=======================================================================
-XSControl_WorkSession::XSControl_WorkSession() :
+DE_WorkSession::DE_WorkSession() :
myTransferReader(new XSControl_TransferReader),
myTransferWriter(new XSControl_TransferWriter)
{}
//=======================================================================
-//function : XSControl_WorkSession
+//function : DE_WorkSession
//purpose :
//=======================================================================
-XSControl_WorkSession::~XSControl_WorkSession()
+DE_WorkSession::~DE_WorkSession()
{
clearBinders();
}
//function : ClearData
//purpose :
//=======================================================================
-void XSControl_WorkSession::ClearData(const Standard_Integer mode)
+void DE_WorkSession::ClearData(const Standard_Integer mode)
{
// 1-2-3-4 : standard IFSelect
if (mode >= 1 && mode <= 4) IFSelect_WorkSession::ClearData(mode);
//function : SelectNorm
//purpose :
//=======================================================================
-Standard_Boolean XSControl_WorkSession::SelectNorm(const Standard_CString normname)
+Standard_Boolean DE_WorkSession::SelectNorm(const Standard_CString normname)
{
// Old norm and results
myTransferReader->Clear(-1);
//function : SetController
//purpose :
//=======================================================================
-void XSControl_WorkSession::SetController(const Handle(XSControl_Controller)& ctl)
+void DE_WorkSession::SetController(const Handle(XSControl_Controller)& ctl)
{
myController = ctl;
//function : SelectedNorm
//purpose :
//=======================================================================
-Standard_CString XSControl_WorkSession::SelectedNorm(const Standard_Boolean rsc) const
+Standard_CString DE_WorkSession::SelectedNorm(const Standard_Boolean rsc) const
{
//JR/Hp :
Standard_CString astr = (Standard_CString)(myController.IsNull() ? "" : myController->Name(rsc));
//function : SelectedNorm
//purpose :
//=======================================================================
-void XSControl_WorkSession::AppendReferenceWS(const TCollection_AsciiString& theName,
- const Handle(XSControl_WorkSession)& theWS)
+void DE_WorkSession::AppendReferenceWS(const TCollection_AsciiString& theName,
+ const Handle(DE_WorkSession)& theWS)
{
myReferenceWS.Bind(theName, theWS);
}
//function : PrintTransferStatus
//purpose :
//=======================================================================
-Standard_Boolean XSControl_WorkSession::PrintTransferStatus(const Standard_Integer num,
+Standard_Boolean DE_WorkSession::PrintTransferStatus(const Standard_Integer num,
const Standard_Boolean wri,
Standard_OStream& S) const
{
if (!ent.IsNull())
{
S << " ** Resultat Transient, type " << ent->DynamicType()->Name();
- const Handle(Interface_InterfaceModel)& model = Model();
+ const Handle(DE_DataModel)& model = Model();
if (!model.IsNull())
{
S << " In output Model, Entity "; model->Print(ent, S);
else
{
if (TP.IsNull()) return Standard_False;
- Handle(Interface_InterfaceModel) model = TP->Model();
+ Handle(DE_DataModel) model = TP->Model();
if (model.IsNull()) std::cout << "No Model" << std::endl;
else if (model != Model()) std::cout << "Model different from the session" << std::endl;
if (num == 0) return Standard_False;
//function : InitTransferReader
//purpose :
//=======================================================================
-void XSControl_WorkSession::InitTransferReader(const Standard_Integer mode)
+void DE_WorkSession::InitTransferReader(const Standard_Integer mode)
{
if (mode == 0 || mode == 5) myTransferReader->Clear(-1); // full clear
if (myTransferReader.IsNull()) SetTransferReader(new XSControl_TransferReader);
//function : SetTransferReader
//purpose :
//=======================================================================
-void XSControl_WorkSession::SetTransferReader(const Handle(XSControl_TransferReader)& TR)
+void DE_WorkSession::SetTransferReader(const Handle(XSControl_TransferReader)& TR)
{
if (myTransferReader != TR) //i1 pdn 03.04.99 BUC60301
myTransferReader = TR;
//function : MapReader
//purpose :
//=======================================================================
-Handle(Transfer_TransientProcess) XSControl_WorkSession::MapReader() const
+Handle(Transfer_TransientProcess) DE_WorkSession::MapReader() const
{
return myTransferReader->TransientProcess();
}
//function : SetMapReader
//purpose :
//=======================================================================
-Standard_Boolean XSControl_WorkSession::SetMapReader(const Handle(Transfer_TransientProcess)& TP)
+Standard_Boolean DE_WorkSession::SetMapReader(const Handle(Transfer_TransientProcess)& TP)
{
if (TP.IsNull()) return Standard_False;
if (TP->Model().IsNull()) TP->SetModel(Model());
//function : Result
//purpose :
//=======================================================================
-Handle(Standard_Transient) XSControl_WorkSession::Result(const Handle(Standard_Transient)& ent,
+Handle(Standard_Transient) DE_WorkSession::Result(const Handle(Standard_Transient)& ent,
const Standard_Integer mode) const
{
Standard_Integer ouca = (mode % 10);
//function : TransferReadOne
//purpose :
//=======================================================================
-Standard_Integer XSControl_WorkSession::TransferReadOne(const Handle(Standard_Transient)& ent,
+Standard_Integer DE_WorkSession::TransferReadOne(const Handle(Standard_Transient)& ent,
const Message_ProgressRange& theProgress)
{
- Handle(Interface_InterfaceModel) model = Model();
+ Handle(DE_DataModel) model = Model();
if (ent == model) return TransferReadRoots(theProgress);
Handle(TColStd_HSequenceOfTransient) list = GiveList(ent);
//function : TransferReadRoots
//purpose :
//=======================================================================
-Standard_Integer XSControl_WorkSession::TransferReadRoots(const Message_ProgressRange& theProgress)
+Standard_Integer DE_WorkSession::TransferReadRoots(const Message_ProgressRange& theProgress)
{
return myTransferReader->TransferRoots(Graph(), theProgress);
}
//function : NewModel
//purpose :
//=======================================================================
-Handle(Interface_InterfaceModel) XSControl_WorkSession::NewModel()
+Handle(DE_DataModel) DE_WorkSession::NewModel()
{
- Handle(Interface_InterfaceModel) newmod;
+ Handle(DE_DataModel) newmod;
if (myController.IsNull()) return newmod;
newmod = myController->NewModel();
//function : TransferWriter
//purpose :
//=======================================================================
-const Handle(XSControl_TransferWriter)& XSControl_WorkSession::TransferWriter() const
+const Handle(XSControl_TransferWriter)& DE_WorkSession::TransferWriter() const
{
return myTransferWriter;
}
//function : SetMapWriter
//purpose :
//=======================================================================
-Standard_Boolean XSControl_WorkSession::SetMapWriter(const Handle(Transfer_FinderProcess)& theFP)
+Standard_Boolean DE_WorkSession::SetMapWriter(const Handle(Transfer_FinderProcess)& theFP)
{
if (theFP.IsNull()) return Standard_False;
myTransferWriter->SetFinderProcess(theFP);
//function : TransferWriteShape
//purpose :
//=======================================================================
-XSControl_ReturnStatus XSControl_WorkSession::TransferWriteShape(const TopoDS_Shape& shape,
+XSControl_ReturnStatus DE_WorkSession::TransferWriteShape(const TopoDS_Shape& shape,
const Standard_Boolean compgraph,
const Message_ProgressRange& theProgress)
{
XSControl_ReturnStatus status;
if (myController.IsNull()) return XSControl_RetError;
- const Handle(Interface_InterfaceModel)& model = Model();
+ const Handle(DE_DataModel)& model = Model();
if (model.IsNull() || shape.IsNull())
{
return XSControl_RetVoid;
//function : TransferWriteCheckList
//purpose :
//=======================================================================
-Interface_CheckIterator XSControl_WorkSession::TransferWriteCheckList() const
+Interface_CheckIterator DE_WorkSession::TransferWriteCheckList() const
{
return myTransferWriter->ResultCheckList(Model());
}
//function : clearBinders
//purpose :
//=======================================================================
-void XSControl_WorkSession::clearBinders()
+void DE_WorkSession::clearBinders()
{
const Handle(Transfer_FinderProcess)& FP = myTransferWriter->FinderProcess();
//Due to big number of chains of binders it is necessary to
#include <Standard.hxx>
#include <Standard_Type.hxx>
-#include <IFSelect_WorkSession.hxx>
#include <Message_ProgressRange.hxx>
+#include <TCollection_AsciiString.hxx>
+#include <NCollection_DataMap.hxx>
-class XSControl_Controller;
-class XSControl_TransferReader;
-class XSControl_TransferWriter;
-class Transfer_TransientProcess;
-class Interface_InterfaceModel;
-class Transfer_FinderProcess;
-class TopoDS_Shape;
-class Interface_CheckIterator;
+class DE_DataModel;
-class XSControl_WorkSession;
-DEFINE_STANDARD_HANDLE(XSControl_WorkSession, IFSelect_WorkSession)
-
-typedef NCollection_DataMap<TCollection_AsciiString, Handle(XSControl_WorkSession)> XSControl_WorkSessionMap;
+typedef NCollection_DataMap<TCollection_AsciiString, Handle(DE_WorkSession)> XSControl_WorkSessionMap;
//! This WorkSession completes the basic one, by adding :
//! - use of Controller, with norm selection...
//! are given by the user, according to the transfer to be
//! i.e. it is interpreted by the Actors
//! Each item is accessed by a Name
-class XSControl_WorkSession : public IFSelect_WorkSession
+class DE_WorkSession : public Standard_Transient
{
public:
- Standard_EXPORT XSControl_WorkSession();
+ Standard_EXPORT DE_WorkSession();
- Standard_EXPORT ~XSControl_WorkSession();
+ Standard_EXPORT ~DE_WorkSession();
- //! In addition to basic ClearData, clears Transfer and Management
- //! for interactive use, for mode = 0,1,2 and over 4
- //! Plus : mode = 5 to clear Transfers (both ways) only
- //! mode = 6 to clear enforced results
- //! mode = 7 to clear transfers, results
- Standard_EXPORT virtual void ClearData(const Standard_Integer theMode) Standard_OVERRIDE;
+ //! Returns the current reference WS List, empty if not defined
+ const XSControl_WorkSessionMap& ReferenceWS() const { return myReferenceWS; }
- //! Selects a Norm defined by its name.
- //! A Norm is described and handled by a Controller
- //! Returns True if done, False if <normname> is unknown
- //!
- //! The current Profile for this Norm is taken.
- Standard_EXPORT Standard_Boolean SelectNorm(const Standard_CString theNormName);
+ //! Appends new refrence Work Session
+ Standard_EXPORT void AppendReferenceWS(const TCollection_AsciiString& theName,
+ const Handle(DE_WorkSession)& theWS);
- //! Selects a Norm defined by its Controller itself
- Standard_EXPORT void SetController(const Handle(XSControl_Controller)& theCtl);
+ Handle(DE_DataModel) Model() { return myModel; }
- //! Returns the name of the last Selected Norm. If none is
- //! defined, returns an empty string
- //! By default, returns the complete name of the norm
- //! If <rsc> is True, returns the short name used for resource
- Standard_EXPORT Standard_CString SelectedNorm(const Standard_Boolean theRsc = Standard_False) const;
+ const Handle(DE_DataModel)& Model() const { return myModel; }
- //! Returns the norm controller itself
- const Handle(XSControl_Controller)& NormAdaptor() const { return myController; }
+ Standard_EXPORT const TCollection_AsciiString& Vendor() const;
- //! Returns the current reference WS List, empty if not defined
- const XSControl_WorkSessionMap& ReferenceWS() const { return myReferenceWS; }
+ Standard_EXPORT const TCollection_AsciiString& Format() const;
- //! Appends new refrence Work Session
- Standard_EXPORT void AppendReferenceWS(const TCollection_AsciiString& theName,
- const Handle(XSControl_WorkSession)& theWS);
-
- //! Prints the transfer status of a transferred item, as being
- //! the Mapped n0 <num>, from MapWriter if <wri> is True, or
- //! from MapReader if <wri> is False
- //! Returns True when done, False else (i.e. num out of range)
- Standard_EXPORT Standard_Boolean PrintTransferStatus(const Standard_Integer theNum,
- const Standard_Boolean theWri,
- Standard_OStream& theS) const;
-
- //! Sets a Transfer Reader, by internal ways, according mode :
- //! 0 recreates it clear, 1 clears it (does not recreate)
- //! 2 aligns Roots of TransientProcess from final Results
- //! 3 aligns final Results from Roots of TransientProcess
- //! 4 begins a new transfer (by BeginTransfer)
- //! 5 recreates TransferReader then begins a new transfer
- Standard_EXPORT void InitTransferReader(const Standard_Integer theMode);
-
- //! Sets a Transfer Reader, which manages transfers on reading
- Standard_EXPORT void SetTransferReader(const Handle(XSControl_TransferReader)& theTR);
-
- //! Returns the Transfer Reader, Null if not set
- const Handle(XSControl_TransferReader)& TransferReader() const { return myTransferReader; }
-
- //! Returns the TransientProcess(internal data for TransferReader)
- Standard_EXPORT Handle(Transfer_TransientProcess) MapReader() const;
-
- //! Changes the Map Reader, i.e. considers that the new one
- //! defines the relevant read results (forgets the former ones)
- //! Returns True when done, False in case of bad definition, i.e.
- //! if Model from TP differs from that of Session
- Standard_EXPORT Standard_Boolean SetMapReader(const Handle(Transfer_TransientProcess)& theTP);
-
- //! Returns the result attached to a starting entity
- //! If <mode> = 0, returns Final Result
- //! If <mode> = 1, considers Last Result
- //! If <mode> = 2, considers Final, else if absent, Last
- //! returns it as Transient, if result is not transient returns
- //! the Binder
- //! <mode> = 10,11,12 idem but returns the Binder itself
- //! (if it is not, e.g. Shape, returns the Binder)
- //! <mode> = 20, returns the ResultFromModel
- Standard_EXPORT Handle(Standard_Transient) Result(const Handle(Standard_Transient)& theEnt,
- const Standard_Integer theMode) const;
-
- //! Commands the transfer of, either one entity, or a list
- //! I.E. calls the TransferReader after having analysed <ents>
- //! It is cumulated from the last BeginTransfer
- //! <ents> is processed by GiveList, hence :
- //! - <ents> a Selection : its SelectionResult
- //! - <ents> a HSequenceOfTransient : this list
- //! - <ents> the Model : in this specific case, all the roots,
- //! with no cumulation of former transfers (TransferReadRoots)
- Standard_EXPORT Standard_Integer TransferReadOne(const Handle(Standard_Transient)& theEnts,
- const Message_ProgressRange& theProgress = Message_ProgressRange());
-
- //! Commands the transfer of all the root entities of the model
- //! i.e. calls TransferRoot from the TransferReader with the Graph
- //! No cumulation with former calls to TransferReadOne
- Standard_EXPORT Standard_Integer TransferReadRoots(const Message_ProgressRange& theProgress = Message_ProgressRange());
-
- //! produces and returns a new Model well conditioned
- //! It is produced by the Norm Controller
- //! It can be Null (if this function is not implemented)
- Standard_EXPORT Handle(Interface_InterfaceModel) NewModel();
-
- //! Returns the Transfer Reader, Null if not set
- Standard_EXPORT const Handle(XSControl_TransferWriter)& TransferWriter() const;
-
- //! Changes the Map Reader, i.e. considers that the new one
- //! defines the relevant read results (forgets the former ones)
- //! Returns True when done, False if <FP> is Null
- Standard_EXPORT Standard_Boolean SetMapWriter(const Handle(Transfer_FinderProcess)& theFP);
-
- //! Transfers a Shape from CasCade to a model of current norm,
- //! according to the last call to SetModeWriteShape
- //! Returns status :Done if OK, Fail if error during transfer,
- //! Error if transfer badly initialised
- Standard_EXPORT XSControl_ReturnStatus TransferWriteShape(const TopoDS_Shape& theShape,
- const Standard_Boolean theCompGraph = Standard_True,
- const Message_ProgressRange& theProgress = Message_ProgressRange());
-
- //! Returns the check-list of last transfer (write)
- //! It is recorded in the FinderProcess, but it must be bound with
- //! resulting entities (in the resulting file model) rather than
- //! with original objects (in fact, their mappers)
- Standard_EXPORT Interface_CheckIterator TransferWriteCheckList() const;
-
- DEFINE_STANDARD_RTTIEXT(XSControl_WorkSession, IFSelect_WorkSession)
-
-protected:
-
- //! Clears binders
- void clearBinders();
+ DEFINE_STANDARD_RTTIEXT(DE_WorkSession, Standard_Transient)
private:
- Handle(XSControl_Controller) myController;
- Handle(XSControl_TransferReader) myTransferReader;
- Handle(XSControl_TransferWriter) myTransferWriter;
XSControl_WorkSessionMap myReferenceWS;
+ Handle(DE_DataModel) myModel;
+
};
#endif // _XSControl_WorkSession_HeaderFile
//=======================================================================
Standard_Boolean DE_Wrapper::Read(const TCollection_AsciiString& thePath,
const Handle(TDocStd_Document)& theDocument,
- Handle(XSControl_WorkSession)& theWS,
+ Handle(DE_WorkSession)& theWS,
const Message_ProgressRange& theProgress)
{
if (theDocument.IsNull())
//=======================================================================
Standard_Boolean DE_Wrapper::Write(const TCollection_AsciiString& thePath,
const Handle(TDocStd_Document)& theDocument,
- Handle(XSControl_WorkSession)& theWS,
+ Handle(DE_WorkSession)& theWS,
const Message_ProgressRange& theProgress)
{
if (theDocument.IsNull())
//=======================================================================
Standard_Boolean DE_Wrapper::Read(const TCollection_AsciiString& thePath,
TopoDS_Shape& theShape,
- Handle(XSControl_WorkSession)& theWS,
+ Handle(DE_WorkSession)& theWS,
const Message_ProgressRange& theProgress)
{
Handle(DE_Provider) aProvider;
//=======================================================================
Standard_Boolean DE_Wrapper::Write(const TCollection_AsciiString& thePath,
const TopoDS_Shape& theShape,
- Handle(XSControl_WorkSession)& theWS,
+ Handle(DE_WorkSession)& theWS,
const Message_ProgressRange& theProgress)
{
Handle(DE_Provider) aProvider;
#include <TColStd_ListOfAsciiString.hxx>
class TopoDS_Shape;
-class XSControl_WorkSession;
+class DE_WorkSession;
class TDocStd_Document;
typedef NCollection_IndexedDataMap<TCollection_AsciiString, Handle(DE_ConfigurationNode), TCollection_AsciiString> DE_ConfigurationVendorMap;
//! @return true if Read operation has ended correctly
Standard_EXPORT Standard_Boolean Read(const TCollection_AsciiString& thePath,
const Handle(TDocStd_Document)& theDocument,
- Handle(XSControl_WorkSession)& theWS,
+ Handle(DE_WorkSession)& theWS,
const Message_ProgressRange& theProgress = Message_ProgressRange());
//! Writes a CAD file, according internal configuration
//! @return true if Write operation has ended correctly
Standard_EXPORT Standard_Boolean Write(const TCollection_AsciiString& thePath,
const Handle(TDocStd_Document)& theDocument,
- Handle(XSControl_WorkSession)& theWS,
+ Handle(DE_WorkSession)& theWS,
const Message_ProgressRange& theProgress = Message_ProgressRange());
//! Reads a CAD file, according internal configuration
//! @return true if Read operation has ended correctly
Standard_EXPORT Standard_Boolean Read(const TCollection_AsciiString& thePath,
TopoDS_Shape& theShape,
- Handle(XSControl_WorkSession)& theWS,
+ Handle(DE_WorkSession)& theWS,
const Message_ProgressRange& theProgress = Message_ProgressRange());
//! Writes a CAD file, according internal configuration
//! @return true if Write operation has ended correctly
Standard_EXPORT Standard_Boolean Write(const TCollection_AsciiString& thePath,
const TopoDS_Shape& theShape,
- Handle(XSControl_WorkSession)& theWS,
+ Handle(DE_WorkSession)& theWS,
const Message_ProgressRange& theProgress = Message_ProgressRange());
public:
DE_ConfigurationNode.hxx
DE_DataModel.cxx
DE_DataModel.hxx
-DE_InterfaceParameters.cxx
-DE_InterfaceParameters.hxx
DE_Provider.cxx
DE_Provider.hxx
-DE_ReturnStatus.hxx
DE_WorkSession.cxx
DE_WorkSession.hxx
DE_Wrapper.cxx
Interface_IndexedMapOfAsciiString.hxx
Interface_InterfaceError.hxx
Interface_InterfaceMismatch.hxx
-Interface_InterfaceModel.cxx
-Interface_InterfaceModel.hxx
Interface_IntList.cxx
Interface_IntList.hxx
Interface_IntVal.cxx
Interface_ValueInterpret.hxx
Interface_ValueSatisfies.hxx
Interface_VectorOfFileParameter.hxx
-Interface_Version.hxx
+Interface_Version.hxx
\ No newline at end of file
#include <Interface_Category.hxx>
#include <Interface_GeneralModule.hxx>
-#include <Interface_InterfaceModel.hxx>
+#include <DE_DataModel.hxx>
#include <Interface_ShareTool.hxx>
#include <Standard_Transient.hxx>
#include <Standard_Mutex.hxx>
}
void Interface_Category::Compute
- (const Handle(Interface_InterfaceModel)& theModel,
+ (const Handle(DE_DataModel)& theModel,
const Interface_ShareTool& theShares)
{
ClearNums();
class Interface_Protocol;
class Standard_Transient;
class Interface_ShareTool;
-class Interface_InterfaceModel;
+class DE_DataModel;
//! This class manages categories
//! A category is defined by a name and a number, and can be
//! Hence, it can be queried by the method Num.
//! The Model itself is not recorded, this method is intended to
//! be used in a wider context (which detains also a Graph, etc)
- Standard_EXPORT void Compute (const Handle(Interface_InterfaceModel)& theModel, const Interface_ShareTool& theShares);
+ Standard_EXPORT void Compute (const Handle(DE_DataModel)& theModel, const Interface_ShareTool& theShares);
//! Returns the category number recorded for an entity number
//! Returns 0 if out of range
#include <Interface_Check.hxx>
#include <Interface_CheckIterator.hxx>
-#include <Interface_InterfaceModel.hxx>
+#include <DE_DataModel.hxx>
#include <Interface_IntVal.hxx>
#include <Standard_NoSuchObject.hxx>
#include <Standard_Transient.hxx>
//purpose :
//=======================================================================
-void Interface_CheckIterator::SetModel(const Handle(Interface_InterfaceModel)& model)
+void Interface_CheckIterator::SetModel(const Handle(DE_DataModel)& model)
{
themod = model;
}
//purpose :
//=======================================================================
-Handle(Interface_InterfaceModel) Interface_CheckIterator::Model() const
+Handle(DE_DataModel) Interface_CheckIterator::Model() const
{
return themod;
}
//=======================================================================
void Interface_CheckIterator::Print(Standard_OStream& S,
- const Handle(Interface_InterfaceModel)& model,
+ const Handle(DE_DataModel)& model,
const Standard_Boolean failsonly,
const Standard_Integer /*final*/) const
{
#include <Standard_Integer.hxx>
#include <Interface_CheckStatus.hxx>
#include <TColStd_HSequenceOfTransient.hxx>
-class Interface_InterfaceModel;
+class DE_DataModel;
class Interface_IntVal;
class Interface_Check;
class Standard_Transient;
//! Defines a Model, used to locate entities (not required, if it
//! is absent, entities are simply less documented)
- Standard_EXPORT void SetModel (const Handle(Interface_InterfaceModel)& model);
+ Standard_EXPORT void SetModel (const Handle(DE_DataModel)& model);
//! Returns the stored model (can be a null handle)
- Standard_EXPORT Handle(Interface_InterfaceModel) Model() const;
+ Standard_EXPORT Handle(DE_DataModel) Model() const;
//! Clears the list of checks
Standard_EXPORT void Clear();
//! Works as Print without a model, but for entities which have
//! no attached number (Number not positive), tries to compute
//! this Number from <model> and displays "original" or "computed"
- Standard_EXPORT void Print (Standard_OStream& S, const Handle(Interface_InterfaceModel)& model, const Standard_Boolean failsonly, const Standard_Integer final = 0) const;
+ Standard_EXPORT void Print (Standard_OStream& S, const Handle(DE_DataModel)& model, const Standard_Boolean failsonly, const Standard_Integer final = 0) const;
//! Clears data of iteration
Standard_EXPORT void Destroy();
Handle(Interface_HSequenceOfCheck) thelist;
Handle(TColStd_HSequenceOfInteger) thenums;
- Handle(Interface_InterfaceModel) themod;
+ Handle(DE_DataModel) themod;
TCollection_AsciiString thename;
Handle(Interface_IntVal) thecurr;
#include <Interface_GeneralModule.hxx>
#include <Interface_GTool.hxx>
#include <Interface_HGraph.hxx>
-#include <Interface_InterfaceModel.hxx>
+#include <DE_DataModel.hxx>
#include <Interface_Macros.hxx>
#include <Interface_Protocol.hxx>
#include <Interface_ReportEntity.hxx>
//purpose :
//=======================================================================
-Interface_CheckTool::Interface_CheckTool(const Handle(Interface_InterfaceModel)& model,
+Interface_CheckTool::Interface_CheckTool(const Handle(DE_DataModel)& model,
const Handle(Interface_Protocol)& protocol)
: thegtool ( new Interface_GTool(protocol,model->NbEntities()) ) ,
theshare (model,protocol)
//purpose :
//=======================================================================
-Interface_CheckTool::Interface_CheckTool(const Handle(Interface_InterfaceModel)& model)
+Interface_CheckTool::Interface_CheckTool(const Handle(DE_DataModel)& model)
: thegtool(model->GTool()) , theshare (model,model->GTool())
{
thestat = 0;
void Interface_CheckTool::Print(const Interface_CheckIterator& list,
Standard_OStream& S) const
{
- Handle(Interface_InterfaceModel) model = theshare.Model();
+ Handle(DE_DataModel) model = theshare.Model();
list.Print(S,model,Standard_False);
}
Handle(Interface_Check) Interface_CheckTool::Check(const Standard_Integer num)
{
- Handle(Interface_InterfaceModel) model = theshare.Model();
+ Handle(DE_DataModel) model = theshare.Model();
Handle(Standard_Transient) ent = model->Value(num);
Handle(Interface_Check) ach = new Interface_Check(ent); // non filtre par "Warning" : tel quel
errh = 1;
if (reset) thestat = 0;
if (thestat > 3) throw Interface_CheckFailure // deja teste avec erreur
("Interface Model : Global Check");
- Handle(Interface_InterfaceModel) model = theshare.Model();
+ Handle(DE_DataModel) model = theshare.Model();
if (model->GlobalCheck()->NbFails() > 0) throw Interface_CheckFailure("Interface Model : Global Check");
Handle(Interface_Check) modchk = new Interface_Check;
model->VerifyCheck(modchk);
Interface_CheckIterator Interface_CheckTool::CompleteCheckList ()
{
thestat = 3;
- Handle(Interface_InterfaceModel) model = theshare.Model();
+ Handle(DE_DataModel) model = theshare.Model();
Interface_CheckIterator res;
res.SetModel(model);
Handle(Interface_Check) globch = model->GlobalCheck(); // GlobalCheck Statique
Interface_CheckIterator Interface_CheckTool::CheckList ()
{
thestat = 3;
- Handle(Interface_InterfaceModel) model = theshare.Model();
+ Handle(DE_DataModel) model = theshare.Model();
Interface_CheckIterator res;
res.SetModel(model);
Standard_Integer i=0, n0 = 1, nb = model->NbEntities();
Interface_CheckIterator Interface_CheckTool::AnalyseCheckList ()
{
thestat = 2;
- Handle(Interface_InterfaceModel) model = theshare.Model();
+ Handle(DE_DataModel) model = theshare.Model();
Interface_CheckIterator res;
res.SetModel(model);
Standard_Integer i=0, n0 = 1, nb = model->NbEntities();
Interface_CheckIterator Interface_CheckTool::VerifyCheckList ()
{
thestat = 1;
- Handle(Interface_InterfaceModel) model = theshare.Model();
+ Handle(DE_DataModel) model = theshare.Model();
Interface_CheckIterator res;
res.SetModel(model);
Standard_Integer i=0, n0 = 1, nb = model->NbEntities();
Interface_CheckIterator Interface_CheckTool::WarningCheckList ()
{
thestat = 3;
- Handle(Interface_InterfaceModel) model = theshare.Model();
+ Handle(DE_DataModel) model = theshare.Model();
Interface_CheckIterator res;
res.SetModel(model);
Standard_Integer i=0, n0 = 1, nb = model->NbEntities();
Interface_EntityIterator Interface_CheckTool::UnknownEntities ()
{
- Handle(Interface_InterfaceModel) model = theshare.Model();
+ Handle(DE_DataModel) model = theshare.Model();
Interface_EntityIterator res;
Standard_Integer nb = model->NbEntities();
for (Standard_Integer i = 1; i <= nb; i ++) {
#include <Interface_ShareTool.hxx>
#include <Standard_Integer.hxx>
class Interface_GTool;
-class Interface_InterfaceModel;
+class DE_DataModel;
class Interface_Protocol;
class Interface_Graph;
class Interface_HGraph;
//! Creates a CheckTool, by calling the General Service Library
//! and Modules, selected through a Protocol, to work on a Model
//! Moreover, Protocol recognizes Unknown Entities
- Standard_EXPORT Interface_CheckTool(const Handle(Interface_InterfaceModel)& model, const Handle(Interface_Protocol)& protocol);
+ Standard_EXPORT Interface_CheckTool(const Handle(DE_DataModel)& model, const Handle(Interface_Protocol)& protocol);
//! Creates a CheckTool, by calling the General Service Library
//! and Modules, selected through a Protocol, to work on a Model
//! Protocol and so on are taken from the Model (its GTool)
- Standard_EXPORT Interface_CheckTool(const Handle(Interface_InterfaceModel)& model);
+ Standard_EXPORT Interface_CheckTool(const Handle(DE_DataModel)& model);
//! Creates a CheckTool from a Graph. The Graph contains a Model
//! which designates a Protocol: they are used to create ShareTool
#include <Interface_CopyMap.hxx>
#include <Interface_InterfaceError.hxx>
-#include <Interface_InterfaceModel.hxx>
+#include <DE_DataModel.hxx>
#include <Standard_Transient.hxx>
#include <Standard_Type.hxx>
// CopyMap : rien de plus qu une Map passive
Interface_CopyMap::Interface_CopyMap
- (const Handle(Interface_InterfaceModel)& amodel)
+ (const Handle(DE_DataModel)& amodel)
: theres (0,amodel->NbEntities())
{ themod = amodel; }
for (Standard_Integer i = 1; i <= nb; i ++) theres.SetValue(i,bid);
}
- Handle(Interface_InterfaceModel) Interface_CopyMap::Model () const
+ Handle(DE_DataModel) Interface_CopyMap::Model () const
{ return themod; }
void Interface_CopyMap::Bind
#include <TColStd_Array1OfTransient.hxx>
#include <Interface_CopyControl.hxx>
-class Interface_InterfaceModel;
+class DE_DataModel;
class Standard_Transient;
//! Creates a CopyMap adapted to work from a Model
- Standard_EXPORT Interface_CopyMap(const Handle(Interface_InterfaceModel)& amodel);
+ Standard_EXPORT Interface_CopyMap(const Handle(DE_DataModel)& amodel);
//! Clears Transfer List. Gets Ready to begin another Transfer
Standard_EXPORT void Clear() Standard_OVERRIDE;
//! Returns the InterfaceModel used at Creation time
- Standard_EXPORT Handle(Interface_InterfaceModel) Model() const;
+ Standard_EXPORT Handle(DE_DataModel) Model() const;
//! Binds a Starting Entity identified by its Number <num> in the
//! Starting Model, to a Result of Transfer <res>
private:
- Handle(Interface_InterfaceModel) themod;
+ Handle(DE_DataModel) themod;
TColStd_Array1OfTransient theres;
#include <Interface_GeneralLib.hxx>
#include <Interface_GeneralModule.hxx>
#include <Interface_InterfaceError.hxx>
-#include <Interface_InterfaceModel.hxx>
+#include <DE_DataModel.hxx>
#include <Interface_Protocol.hxx>
#include <Interface_ReportEntity.hxx>
#include <Standard_Transient.hxx>
// #####################################################################
// .... CONSTRUCTEURS ....
Interface_CopyTool::Interface_CopyTool
- (const Handle(Interface_InterfaceModel)& amodel,
+ (const Handle(DE_DataModel)& amodel,
const Interface_GeneralLib& lib)
: thelib (lib) , thelst (amodel->NbEntities())
{
}
Interface_CopyTool::Interface_CopyTool
- (const Handle(Interface_InterfaceModel)& amodel,
+ (const Handle(DE_DataModel)& amodel,
const Handle(Interface_Protocol)& protocol)
: thelib (protocol) , thelst (amodel->NbEntities())
{
Interface_CopyTool::Interface_CopyTool
- (const Handle(Interface_InterfaceModel)& amodel)
+ (const Handle(DE_DataModel)& amodel)
: thelib (Interface_Protocol::Active()) , thelst (amodel->NbEntities())
{
if (Interface_Protocol::Active().IsNull()) throw Interface_InterfaceError("Interface CopyTool : Create with Active Protocol undefined");
thelev = 0; theimp = Standard_False;
}
- Handle(Interface_InterfaceModel) Interface_CopyTool::Model () const
+ Handle(DE_DataModel) Interface_CopyTool::Model () const
{ return themod; }
void Interface_CopyTool::SetControl
void Interface_CopyTool::FillModel
- (const Handle(Interface_InterfaceModel)& bmodel)
+ (const Handle(DE_DataModel)& bmodel)
{
// Travaux preparatoires concernant les modeles
// On commence : cela implique le Header
#include <Interface_GeneralLib.hxx>
#include <Standard_Integer.hxx>
#include <TColStd_SequenceOfInteger.hxx>
-class Interface_InterfaceModel;
+class DE_DataModel;
class Interface_CopyControl;
class Interface_CopyMap;
class Standard_Transient;
//! Creates a CopyTool adapted to work from a Model. Works
//! with a General Service Library, given as an argument
- Standard_EXPORT Interface_CopyTool(const Handle(Interface_InterfaceModel)& amodel, const Interface_GeneralLib& lib);
+ Standard_EXPORT Interface_CopyTool(const Handle(DE_DataModel)& amodel, const Interface_GeneralLib& lib);
//! Same as above, but Library is defined through a Protocol
- Standard_EXPORT Interface_CopyTool(const Handle(Interface_InterfaceModel)& amodel, const Handle(Interface_Protocol)& protocol);
+ Standard_EXPORT Interface_CopyTool(const Handle(DE_DataModel)& amodel, const Handle(Interface_Protocol)& protocol);
//! Same as above, but works with the Active Protocol
- Standard_EXPORT Interface_CopyTool(const Handle(Interface_InterfaceModel)& amodel);
+ Standard_EXPORT Interface_CopyTool(const Handle(DE_DataModel)& amodel);
//! Returns the Model on which the CopyTool works
- Standard_EXPORT Handle(Interface_InterfaceModel) Model() const;
+ Standard_EXPORT Handle(DE_DataModel) Model() const;
//! Changes the Map of Result for another one. This allows to work
//! with a more sophisticated Mapping Control than the Standard
//! Fills a Model with the result of the transfer (TransferList)
//! Commands copy of Header too, and calls RenewImpliedRefs
- Standard_EXPORT void FillModel (const Handle(Interface_InterfaceModel)& bmodel);
+ Standard_EXPORT void FillModel (const Handle(DE_DataModel)& bmodel);
//! Returns the complete list of copied Entities
//! If <withreports> is given True, the entities which were
Standard_EXPORT virtual void Implied (const Handle(Standard_Transient)& entfrom, const Handle(Standard_Transient)& entto);
- Handle(Interface_InterfaceModel) themod;
+ Handle(DE_DataModel) themod;
Handle(Interface_CopyControl) themap;
Handle(Interface_CopyMap) therep;
Interface_BitMap thelst;
#include <Interface_FileReaderTool.hxx>
#include <Interface_GeneralLib.hxx>
#include <Interface_GeneralModule.hxx>
-#include <Interface_InterfaceModel.hxx>
+#include <DE_DataModel.hxx>
#include <Interface_Protocol.hxx>
#include <Interface_ReaderLib.hxx>
#include <Interface_ReaderModule.hxx>
//=======================================================================
void Interface_FileReaderTool::SetModel
- (const Handle(Interface_InterfaceModel)& amodel)
+ (const Handle(DE_DataModel)& amodel)
{
themodel = amodel;
}
//purpose :
//=======================================================================
-Handle(Interface_InterfaceModel) Interface_FileReaderTool::Model () const
+Handle(DE_DataModel) Interface_FileReaderTool::Model () const
{
return themodel;
}
//purpose :
//=======================================================================
-Handle(Interface_InterfaceModel) Interface_FileReaderTool::NewModel() const
+Handle(DE_DataModel) Interface_FileReaderTool::NewModel() const
{
return theproto->NewModel();
}
//purpose :
//=======================================================================
-void Interface_FileReaderTool::EndRead(const Handle(Interface_InterfaceModel)& )
+void Interface_FileReaderTool::EndRead(const Handle(DE_DataModel)& )
{
} // par defaut, ne fait rien; redefinissable selon besoin
//=======================================================================
void Interface_FileReaderTool::LoadModel
- (const Handle(Interface_InterfaceModel)& amodel)
+ (const Handle(DE_DataModel)& amodel)
//
// Methode generale de lecture d un fichier : il est lu via un FileReaderData
// qui doit y donner acces de la facon la plus performante possible
#include <TColStd_HArray1OfTransient.hxx>
class Interface_Protocol;
class Interface_FileReaderData;
-class Interface_InterfaceModel;
+class DE_DataModel;
class Message_Messenger;
class Interface_Check;
class Standard_Transient;
Standard_EXPORT Handle(Interface_FileReaderData) Data() const;
//! Stores a Model. Used when the Model has been loaded
- Standard_EXPORT void SetModel (const Handle(Interface_InterfaceModel)& amodel);
+ Standard_EXPORT void SetModel (const Handle(DE_DataModel)& amodel);
//! Returns the stored Model
- Standard_EXPORT Handle(Interface_InterfaceModel) Model() const;
+ Standard_EXPORT Handle(DE_DataModel) Model() const;
//! Sets Messenger used for outputting messages
Standard_EXPORT void SetMessenger (const Handle(Message_Messenger)& messenger);
Standard_EXPORT Handle(Standard_Transient) UnknownEntity() const;
//! Creates an empty Model of the norm. Uses Protocol to do it
- Standard_EXPORT Handle(Interface_InterfaceModel) NewModel() const;
+ Standard_EXPORT Handle(DE_DataModel) NewModel() const;
//! Reads and fills Entities from the FileReaderData set by
//! SetData to an InterfaceModel.
//! It Can raise any error which can occur during a load
//! operation, unless Error Handling is set.
//! This method can also be redefined if judged necessary.
- Standard_EXPORT void LoadModel (const Handle(Interface_InterfaceModel)& amodel);
+ Standard_EXPORT void LoadModel (const Handle(DE_DataModel)& amodel);
//! Reads, Fills and Returns one Entity read from a Record of the
//! FileReaderData. This Method manages also case of Fail or
//! Fills model's header; each Interface defines for its Model its
//! own file header; this method fills it from FileReaderTool.+
//! It is called by AnalyseFile from InterfaceModel
- Standard_EXPORT virtual void BeginRead (const Handle(Interface_InterfaceModel)& amodel) = 0;
+ Standard_EXPORT virtual void BeginRead (const Handle(DE_DataModel)& amodel) = 0;
//! Fills an Entity, given record no; specific to each Interface,
//! called by AnalyseFile from InterfaceModel (which manages its
//! Ends file reading after reading all the entities
//! default is doing nothing; redefinable as necessary
- Standard_EXPORT virtual void EndRead (const Handle(Interface_InterfaceModel)& amodel);
+ Standard_EXPORT virtual void EndRead (const Handle(DE_DataModel)& amodel);
//! Clear fields
Standard_EXPORT void Clear();
Handle(Interface_Protocol) theproto;
Handle(Interface_FileReaderData) thereader;
- Handle(Interface_InterfaceModel) themodel;
+ Handle(DE_DataModel) themodel;
Handle(Message_Messenger) themessenger;
Standard_Integer thetrace;
Standard_Boolean theerrhand;
#include <Interface_GeneralLib.hxx>
#include <Interface_GeneralModule.hxx>
#include <Interface_GTool.hxx>
-#include <Interface_InterfaceModel.hxx>
+#include <DE_DataModel.hxx>
#include <Interface_Protocol.hxx>
#include <Interface_SignType.hxx>
#include <Standard_Transient.hxx>
void Interface_GTool::SetSignType (const Handle(Interface_SignType)& sign)
{ thesign = sign; }
- Handle(Interface_SignType) Interface_GTool::SignType () const
- { return thesign; }
-
- Standard_CString Interface_GTool::SignValue
- (const Handle(Standard_Transient)& ent,
- const Handle(Interface_InterfaceModel)& model) const
-{
- if (ent.IsNull()) return "";
- if (thesign.IsNull()) return Interface_SignType::ClassName(ent->DynamicType()->Name());
- return thesign->Value (ent,model);
-}
-
- Standard_CString Interface_GTool::SignName () const
-{
- if (thesign.IsNull()) return "Class Name";
- return thesign->Name();
-}
-
void Interface_GTool::SetProtocol
(const Handle(Interface_Protocol)& proto, const Standard_Boolean enforce)
#include <Standard_Integer.hxx>
class Interface_Protocol;
class Interface_SignType;
-class Interface_InterfaceModel;
+class DE_DataModel;
class Interface_GeneralModule;
//! Sets a new SignType
Standard_EXPORT void SetSignType (const Handle(Interface_SignType)& sign);
-
- //! Returns the SignType. Can be null
- Standard_EXPORT Handle(Interface_SignType) SignType() const;
-
- //! Returns the Signature for a Transient Object in a Model
- //! It calls SignType to do that
- //! If SignType is not defined, return ClassName of <ent>
- Standard_EXPORT Standard_CString SignValue (const Handle(Standard_Transient)& ent, const Handle(Interface_InterfaceModel)& model) const;
-
- //! Returns the Name of the SignType, or "Class Name"
- Standard_EXPORT Standard_CString SignName() const;
-
+
//! Sets a new Protocol
//! if <enforce> is False and the new Protocol equates the old one
//! then nothing is done
#include <Interface_CopyTool.hxx>
#include <Interface_EntityIterator.hxx>
#include <Interface_GeneralModule.hxx>
-#include <Interface_InterfaceModel.hxx>
+#include <DE_DataModel.hxx>
#include <Interface_ShareTool.hxx>
#include <Standard_Transient.hxx>
#include <Standard_Type.hxx>
IMPLEMENT_STANDARD_RTTIEXT(Interface_GeneralModule,Standard_Transient)
void Interface_GeneralModule::FillShared
- (const Handle(Interface_InterfaceModel)& /*model*/,
+ (const Handle(DE_DataModel)& /*model*/,
const Standard_Integer casenum,
const Handle(Standard_Transient)& ent,
Interface_EntityIterator& iter) const
void Interface_GeneralModule::ListImplied
- (const Handle(Interface_InterfaceModel)& /*model*/,
+ (const Handle(DE_DataModel)& /*model*/,
const Standard_Integer casenum,
const Handle(Standard_Transient)& ent,
Interface_EntityIterator& iter) const
#include <Standard_Transient.hxx>
#include <Standard_Integer.hxx>
-class Interface_InterfaceModel;
+class DE_DataModel;
class Interface_EntityIterator;
class Interface_ShareTool;
class Interface_Check;
//! CaseNum), considered in the context of a Model <model>
//! Default calls FillSharedCase (i.e., ignores the model)
//! Can be redefined to use the model for working
- Standard_EXPORT virtual void FillShared (const Handle(Interface_InterfaceModel)& model, const Standard_Integer CN, const Handle(Standard_Transient)& ent, Interface_EntityIterator& iter) const;
+ Standard_EXPORT virtual void FillShared (const Handle(DE_DataModel)& model, const Standard_Integer CN, const Handle(Standard_Transient)& ent, Interface_EntityIterator& iter) const;
//! Specific filling of the list of Entities shared by an Entity
//! <ent>, according a Case Number <CN> (formerly computed by
//! FillShared + ListImplied give the complete list of References
//! Default calls ListImpliedCase (i.e. ignores the model)
//! Can be redefined to use the model for working
- Standard_EXPORT virtual void ListImplied (const Handle(Interface_InterfaceModel)& model, const Standard_Integer CN, const Handle(Standard_Transient)& ent, Interface_EntityIterator& iter) const;
+ Standard_EXPORT virtual void ListImplied (const Handle(DE_DataModel)& model, const Standard_Integer CN, const Handle(Standard_Transient)& ent, Interface_EntityIterator& iter) const;
//! List the Implied References of <ent> (see above)
//! are Referenced while not considered as Shared (not copied if
#include <Interface_GeneralModule.hxx>
#include <Interface_Graph.hxx>
#include <Interface_GTool.hxx>
-#include <Interface_InterfaceModel.hxx>
+#include <DE_DataModel.hxx>
#include <Interface_Protocol.hxx>
#include <Interface_ReportEntity.hxx>
#include <Interface_ShareTool.hxx>
Interface_Graph::Interface_Graph
-(const Handle(Interface_InterfaceModel)& amodel,
+(const Handle(DE_DataModel)& amodel,
const Interface_GeneralLib& /*lib*/,
Standard_Boolean theModeStat)
: themodel (amodel), thepresents ("")
}
Interface_Graph::Interface_Graph
-(const Handle(Interface_InterfaceModel)& amodel,
+(const Handle(DE_DataModel)& amodel,
const Handle(Interface_Protocol)& /*protocol*/,
Standard_Boolean theModeStat)
: themodel (amodel) , thepresents ("")
}
Interface_Graph::Interface_Graph
-(const Handle(Interface_InterfaceModel)& amodel,
+(const Handle(DE_DataModel)& amodel,
const Handle(Interface_GTool)& /*gtool*/,
Standard_Boolean theModeStat)
: themodel (amodel) , thepresents ("")
}
Interface_Graph::Interface_Graph
-(const Handle(Interface_InterfaceModel)& amodel,
+(const Handle(DE_DataModel)& amodel,
Standard_Boolean theModeStat)
: themodel (amodel) , thepresents ("")
{
// .... Chargements Elementaires avec Propagation de "Share" .... //
-const Handle(Interface_InterfaceModel)& Interface_Graph::Model() const
+const Handle(DE_DataModel)& Interface_Graph::Model() const
{ return themodel; }
void Interface_Graph::GetFromModel ()
#include <Standard_Handle.hxx>
#include <Interface_BitMap.hxx>
-#include <Interface_InterfaceModel.hxx>
+#include <DE_DataModel.hxx>
#include <TCollection_HAsciiString.hxx>
#include <TColStd_HArray1OfInteger.hxx>
//! Entities to work with are contained in <amodel>
//! Basic Shared and Sharing lists are obtained from a General
//! Services Library, given directly as an argument
- Standard_EXPORT Interface_Graph(const Handle(Interface_InterfaceModel)& amodel, const Interface_GeneralLib& lib, const Standard_Boolean theModeStats = Standard_True);
+ Standard_EXPORT Interface_Graph(const Handle(DE_DataModel)& amodel, const Interface_GeneralLib& lib, const Standard_Boolean theModeStats = Standard_True);
//! Same as above, but the Library is defined through a Protocol
- Standard_EXPORT Interface_Graph(const Handle(Interface_InterfaceModel)& amodel, const Handle(Interface_Protocol)& protocol, const Standard_Boolean theModeStats = Standard_True);
+ Standard_EXPORT Interface_Graph(const Handle(DE_DataModel)& amodel, const Handle(Interface_Protocol)& protocol, const Standard_Boolean theModeStats = Standard_True);
//! Same as above, but the Library is defined through a Protocol
- Standard_EXPORT Interface_Graph(const Handle(Interface_InterfaceModel)& amodel, const Handle(Interface_GTool)& gtool, const Standard_Boolean theModeStats = Standard_True);
+ Standard_EXPORT Interface_Graph(const Handle(DE_DataModel)& amodel, const Handle(Interface_GTool)& gtool, const Standard_Boolean theModeStats = Standard_True);
//! Same a above but works with the Protocol recorded in the Model
- Standard_EXPORT Interface_Graph(const Handle(Interface_InterfaceModel)& amodel, const Standard_Boolean theModeStats = Standard_True);
+ Standard_EXPORT Interface_Graph(const Handle(DE_DataModel)& amodel, const Standard_Boolean theModeStats = Standard_True);
//! Creates a Graph from another one, getting all its data
//! Remark that status are copied from <agraph>, but the other
Standard_EXPORT Interface_BitMap& CBitMap();
//! Returns the Model with which this Graph was created
- Standard_EXPORT const Handle(Interface_InterfaceModel)& Model() const;
+ Standard_EXPORT const Handle(DE_DataModel)& Model() const;
//! Loads Graph with all Entities contained in the Model
Standard_EXPORT void GetFromModel();
Standard_EXPORT void InitStats();
- Handle(Interface_InterfaceModel) themodel;
+ Handle(DE_DataModel) themodel;
TCollection_AsciiString thepresents;
Handle(TColStd_HArray1OfInteger) thestats;
Handle(TColStd_HArray1OfListOfInteger) thesharings;
#include <Interface_Graph.hxx>
#include <Interface_GraphContent.hxx>
-#include <Interface_InterfaceModel.hxx>
+#include <DE_DataModel.hxx>
#include <Standard_Transient.hxx>
Interface_GraphContent::Interface_GraphContent () { }
#include <Interface_GTool.hxx>
#include <Interface_HGraph.hxx>
-#include <Interface_InterfaceModel.hxx>
+#include <DE_DataModel.hxx>
#include <Interface_Protocol.hxx>
#include <Standard_Type.hxx>
Interface_HGraph::Interface_HGraph
- (const Handle(Interface_InterfaceModel)& amodel,
+ (const Handle(DE_DataModel)& amodel,
const Interface_GeneralLib& lib,
const Standard_Boolean theModeStat)
: thegraph (amodel,lib,theModeStat) { }
Interface_HGraph::Interface_HGraph
- (const Handle(Interface_InterfaceModel)& amodel,
+ (const Handle(DE_DataModel)& amodel,
const Handle(Interface_Protocol)& protocol,
const Standard_Boolean theModeStat)
: thegraph (amodel,protocol,theModeStat) { }
Interface_HGraph::Interface_HGraph
- (const Handle(Interface_InterfaceModel)& amodel,
+ (const Handle(DE_DataModel)& amodel,
const Handle(Interface_GTool)& gtool,
const Standard_Boolean theModeStat)
: thegraph (amodel,gtool,theModeStat) { }
Interface_HGraph::Interface_HGraph
- (const Handle(Interface_InterfaceModel)& amodel,
+ (const Handle(DE_DataModel)& amodel,
const Standard_Boolean theModeStat)
: thegraph (amodel,theModeStat) { }
#include <Interface_Graph.hxx>
#include <Standard_Transient.hxx>
-class Interface_InterfaceModel;
+class DE_DataModel;
class Interface_GeneralLib;
class Interface_Protocol;
class Interface_GTool;
Standard_EXPORT Interface_HGraph(const Interface_Graph& agraph);
//! Creates an HGraph with a Graph created from <amodel> and <lib>
- Standard_EXPORT Interface_HGraph(const Handle(Interface_InterfaceModel)& amodel, const Interface_GeneralLib& lib, const Standard_Boolean theModeStats = Standard_True);
+ Standard_EXPORT Interface_HGraph(const Handle(DE_DataModel)& amodel, const Interface_GeneralLib& lib, const Standard_Boolean theModeStats = Standard_True);
//! Creates an HGraph with a graph itself created from <amodel>
//! and <protocol>
- Standard_EXPORT Interface_HGraph(const Handle(Interface_InterfaceModel)& amodel, const Handle(Interface_Protocol)& protocol, const Standard_Boolean theModeStats = Standard_True);
+ Standard_EXPORT Interface_HGraph(const Handle(DE_DataModel)& amodel, const Handle(Interface_Protocol)& protocol, const Standard_Boolean theModeStats = Standard_True);
//! Creates an HGraph with a graph itself created from <amodel>
//! and <protocol>
- Standard_EXPORT Interface_HGraph(const Handle(Interface_InterfaceModel)& amodel, const Handle(Interface_GTool)& gtool, const Standard_Boolean theModeStats = Standard_True);
+ Standard_EXPORT Interface_HGraph(const Handle(DE_DataModel)& amodel, const Handle(Interface_GTool)& gtool, const Standard_Boolean theModeStats = Standard_True);
//! Same a above, but works with the GTool in the model
- Standard_EXPORT Interface_HGraph(const Handle(Interface_InterfaceModel)& amodel, const Standard_Boolean theModeStats = Standard_True);
+ Standard_EXPORT Interface_HGraph(const Handle(DE_DataModel)& amodel, const Standard_Boolean theModeStats = Standard_True);
//! Returns the Graph contained in <me>, for Read Only Operations
//! Remark that it is returns as "const &"
#include <Interface_Check.hxx>
#include <Interface_Graph.hxx>
-#include <Interface_InterfaceModel.hxx>
+#include <DE_DataModel.hxx>
#include <Interface_Protocol.hxx>
#include <Standard_Transient.hxx>
#include <Standard_Type.hxx>
#include <Standard_Integer.hxx>
class Interface_Graph;
class Interface_Check;
-class Interface_InterfaceModel;
+class DE_DataModel;
class Interface_Protocol;
Standard_EXPORT virtual Standard_Boolean GlobalCheck (const Interface_Graph& G, Handle(Interface_Check)& ach) const;
//! Creates an empty Model of the considered Norm
- Standard_EXPORT virtual Handle(Interface_InterfaceModel) NewModel() const = 0;
+ Standard_EXPORT virtual Handle(DE_DataModel) NewModel() const = 0;
//! Returns True if <model> is a Model of the considered Norm
- Standard_EXPORT virtual Standard_Boolean IsSuitableModel (const Handle(Interface_InterfaceModel)& model) const = 0;
+ Standard_EXPORT virtual Standard_Boolean IsSuitableModel (const Handle(DE_DataModel)& model) const = 0;
//! Creates a new Unknown Entity for the considered Norm
Standard_EXPORT virtual Handle(Standard_Transient) UnknownEntity() const = 0;
#include <Interface_GeneralModule.hxx>
#include <Interface_Graph.hxx>
#include <Interface_GTool.hxx>
-#include <Interface_InterfaceModel.hxx>
+#include <DE_DataModel.hxx>
#include <Interface_Protocol.hxx>
#include <Interface_ReportEntity.hxx>
#include <Interface_ShareFlags.hxx>
#include <Standard_Transient.hxx>
Interface_ShareFlags::Interface_ShareFlags
- (const Handle(Interface_InterfaceModel)& amodel,
+ (const Handle(DE_DataModel)& amodel,
const Interface_GeneralLib& lib)
: theflags (amodel->NbEntities())
{
}
Interface_ShareFlags::Interface_ShareFlags
- (const Handle(Interface_InterfaceModel)& amodel,
+ (const Handle(DE_DataModel)& amodel,
const Handle(Interface_GTool)& gtool)
: theflags (amodel->NbEntities())
{
}
Interface_ShareFlags::Interface_ShareFlags
- (const Handle(Interface_InterfaceModel)& amodel,
+ (const Handle(DE_DataModel)& amodel,
const Handle(Interface_Protocol)& protocol)
: theflags (amodel->NbEntities())
{
}
Interface_ShareFlags::Interface_ShareFlags
- (const Handle(Interface_InterfaceModel)& amodel)
+ (const Handle(DE_DataModel)& amodel)
: theflags (amodel->NbEntities())
{
Handle(Interface_GTool) gtool = themodel->GTool();
}
- Handle(Interface_InterfaceModel) Interface_ShareFlags::Model () const
+ Handle(DE_DataModel) Interface_ShareFlags::Model () const
{ return themodel; }
Standard_Boolean Interface_ShareFlags::IsShared
#include <Interface_BitMap.hxx>
#include <TColStd_HSequenceOfTransient.hxx>
#include <Standard_Integer.hxx>
-class Interface_InterfaceModel;
+class DE_DataModel;
class Interface_GeneralLib;
class Interface_GTool;
class Interface_Protocol;
//! Creates a ShareFlags from a Model and builds required data
//! (flags) by calling the General Service Library given as
//! argument <lib>
- Standard_EXPORT Interface_ShareFlags(const Handle(Interface_InterfaceModel)& amodel, const Interface_GeneralLib& lib);
+ Standard_EXPORT Interface_ShareFlags(const Handle(DE_DataModel)& amodel, const Interface_GeneralLib& lib);
//! Same as above, but GeneralLib is detained by a GTool
- Standard_EXPORT Interface_ShareFlags(const Handle(Interface_InterfaceModel)& amodel, const Handle(Interface_GTool)& gtool);
+ Standard_EXPORT Interface_ShareFlags(const Handle(DE_DataModel)& amodel, const Handle(Interface_GTool)& gtool);
//! Same as above, but GeneralLib is defined through a Protocol
- Standard_EXPORT Interface_ShareFlags(const Handle(Interface_InterfaceModel)& amodel, const Handle(Interface_Protocol)& protocol);
+ Standard_EXPORT Interface_ShareFlags(const Handle(DE_DataModel)& amodel, const Handle(Interface_Protocol)& protocol);
//! Same as above, but works with the GTool of the Model
- Standard_EXPORT Interface_ShareFlags(const Handle(Interface_InterfaceModel)& amodel);
+ Standard_EXPORT Interface_ShareFlags(const Handle(DE_DataModel)& amodel);
//! Creates a ShareFlags by querying information from a Graph
//! (remark that Graph also has a method IsShared)
Standard_EXPORT Interface_ShareFlags(const Interface_Graph& agraph);
//! Returns the Model used for the evaluation
- Standard_EXPORT Handle(Interface_InterfaceModel) Model() const;
+ Standard_EXPORT Handle(DE_DataModel) Model() const;
//! Returns True if <ent> is Shared by one or more other
//! Entity(ies) of the Model
Standard_EXPORT void Evaluate (const Interface_GeneralLib& lib, const Handle(Interface_GTool)& gtool);
- Handle(Interface_InterfaceModel) themodel;
+ Handle(DE_DataModel) themodel;
Interface_BitMap theflags;
Handle(TColStd_HSequenceOfTransient) theroots;
#include <Interface_GTool.hxx>
#include <Interface_HGraph.hxx>
#include <Interface_InterfaceError.hxx>
-#include <Interface_InterfaceModel.hxx>
+#include <DE_DataModel.hxx>
#include <Interface_Protocol.hxx>
#include <Interface_ShareTool.hxx>
#include <Message_Messenger.hxx>
#include <TColStd_HArray1OfInteger.hxx>
#include <TColStd_HSequenceOfTransient.hxx>
-Interface_ShareTool::Interface_ShareTool (const Handle(Interface_InterfaceModel)& amodel,
+Interface_ShareTool::Interface_ShareTool (const Handle(DE_DataModel)& amodel,
const Interface_GeneralLib& lib)
{
theHGraph = new Interface_HGraph(amodel,lib);
}
-Interface_ShareTool::Interface_ShareTool (const Handle(Interface_InterfaceModel)& amodel,
+Interface_ShareTool::Interface_ShareTool (const Handle(DE_DataModel)& amodel,
const Handle(Interface_GTool)& gtool)
{
theHGraph = new Interface_HGraph(amodel,gtool);
}
-Interface_ShareTool::Interface_ShareTool (const Handle(Interface_InterfaceModel)& amodel,
+Interface_ShareTool::Interface_ShareTool (const Handle(DE_DataModel)& amodel,
const Handle(Interface_Protocol)& protocol)
{
theHGraph = new Interface_HGraph(amodel,protocol);
}
-Interface_ShareTool::Interface_ShareTool (const Handle(Interface_InterfaceModel)& amodel)
+Interface_ShareTool::Interface_ShareTool (const Handle(DE_DataModel)& amodel)
{
theHGraph = new Interface_HGraph(amodel);
}
}*/
- Handle(Interface_InterfaceModel) Interface_ShareTool::Model () const
+ Handle(DE_DataModel) Interface_ShareTool::Model () const
{ return theHGraph->Graph().Model(); }
const Interface_Graph& Interface_ShareTool::Graph () const
Interface_EntityIterator Interface_ShareTool::All
(const Handle(Standard_Transient)& ent, const Standard_Boolean rootlast) const
{
- Handle(Interface_InterfaceModel) model = Model();
+ Handle(DE_DataModel) model = Model();
Interface_EntityIterator list;
Standard_Integer i, n0 = 0, nb = model->NbEntities();
Handle(TColStd_HArray1OfInteger) fl = new TColStd_HArray1OfInteger (0,nb);
#include <Standard_Type.hxx>
class Interface_HGraph;
-class Interface_InterfaceModel;
+class DE_DataModel;
class Interface_GeneralLib;
class Interface_GTool;
class Interface_Protocol;
//! Creates a ShareTool from a Model and builds all required data,
//! by calling the General Service Library and Modules
//! (GeneralLib given as an argument)
- Standard_EXPORT Interface_ShareTool(const Handle(Interface_InterfaceModel)& amodel, const Interface_GeneralLib& lib);
+ Standard_EXPORT Interface_ShareTool(const Handle(DE_DataModel)& amodel, const Interface_GeneralLib& lib);
//! Same a above, but GeneralLib is detained by a GTool
- Standard_EXPORT Interface_ShareTool(const Handle(Interface_InterfaceModel)& amodel, const Handle(Interface_GTool)& gtool);
+ Standard_EXPORT Interface_ShareTool(const Handle(DE_DataModel)& amodel, const Handle(Interface_GTool)& gtool);
//! Same a above, but GeneralLib is defined through a Protocol
//! Protocol is used to build the working library
- Standard_EXPORT Interface_ShareTool(const Handle(Interface_InterfaceModel)& amodel, const Handle(Interface_Protocol)& protocol);
+ Standard_EXPORT Interface_ShareTool(const Handle(DE_DataModel)& amodel, const Handle(Interface_Protocol)& protocol);
//! Same as above, but works with the GTool of the Model
- Standard_EXPORT Interface_ShareTool(const Handle(Interface_InterfaceModel)& amodel);
+ Standard_EXPORT Interface_ShareTool(const Handle(DE_DataModel)& amodel);
//! Creates a ShareTool from an already defined Graph
//! Remark that the data of the Graph are copied
Standard_EXPORT Interface_ShareTool(const Handle(Interface_HGraph)& ahgraph);
//! Returns the Model used for Creation (directly or for Graph)
- Standard_EXPORT Handle(Interface_InterfaceModel) Model() const;
+ Standard_EXPORT Handle(DE_DataModel) Model() const;
//! Returns the data used by the ShareTool to work
//! Can then be used directly (read only)
// commercial license or contractual agreement.
-#include <Interface_InterfaceModel.hxx>
+#include <DE_DataModel.hxx>
#include <Interface_SignLabel.hxx>
#include <Standard_Transient.hxx>
#include <Standard_Type.hxx>
const Handle(Standard_Transient)& context) const
{
TCollection_AsciiString atext;
- Handle(Interface_InterfaceModel) model =
- Handle(Interface_InterfaceModel)::DownCast(context);
+ Handle(DE_DataModel) model =
+ Handle(DE_DataModel)::DownCast(context);
if (ent.IsNull() || model.IsNull()) return atext;
Handle(TCollection_HAsciiString) lab = model->StringLabel (ent);
if (!lab.IsNull()) atext = lab->String();
// commercial license or contractual agreement.
-#include <Interface_InterfaceModel.hxx>
+#include <DE_DataModel.hxx>
#include <Interface_SignType.hxx>
#include <Standard_Transient.hxx>
#include <Standard_Type.hxx>
const Handle(Standard_Transient)& context) const
{
TCollection_AsciiString atext;
- Handle(Interface_InterfaceModel) model =
- Handle(Interface_InterfaceModel)::DownCast(context);
+ Handle(DE_DataModel) model =
+ Handle(DE_DataModel)::DownCast(context);
if (ent.IsNull() || model.IsNull()) return atext;
atext.AssignCat (Value(ent,model));
return atext;
#include <MoniTool_SignText.hxx>
class TCollection_AsciiString;
class Standard_Transient;
-class Interface_InterfaceModel;
+class DE_DataModel;
class Interface_SignType;
//! of each sub-class of Signature. For a Null Handle, it should
//! provide ""
//! It can work with the model which contains the entity
- Standard_EXPORT virtual Standard_CString Value (const Handle(Standard_Transient)& ent, const Handle(Interface_InterfaceModel)& model) const = 0;
+ Standard_EXPORT virtual Standard_CString Value (const Handle(Standard_Transient)& ent, const Handle(DE_DataModel)& model) const = 0;
//! From a CDL Type Name, returns the Class part (package dropped)
//! WARNING : buffered, to be immediately copied or printed
#include <Standard_Boolean.hxx>
#include <TDF_Label.hxx>
#include <Standard_Transient.hxx>
-class XSControl_WorkSession;
+class DE_WorkSession;
class TCollection_HAsciiString;
//! Creates an empty structure
Standard_EXPORT STEPCAFControl_ExternFile();
- void SetWS (const Handle(XSControl_WorkSession)& WS);
+ void SetWS (const Handle(DE_WorkSession)& WS);
- Handle(XSControl_WorkSession) GetWS() const;
+ Handle(DE_WorkSession) GetWS() const;
void SetLoadStatus (const XSControl_ReturnStatus stat);
private:
- Handle(XSControl_WorkSession) myWS;
+ Handle(DE_WorkSession) myWS;
XSControl_ReturnStatus myLoadStatus;
Standard_Boolean myTransferStatus;
XSControl_ReturnStatus myWriteStatus;
#include <TDataStd_Name.hxx>
#include <TDF_Tool.hxx>
#include <XCAFDoc_DocumentTool.hxx>
-#include <XSControl_WorkSession.hxx>
+#include <DE_WorkSession.hxx>
#include <UnitsMethods.hxx>
IMPLEMENT_STANDARD_RTTIEXT(STEPCAFControl_Provider, DE_Provider)
// function : STEPCAFControl_Provider
// purpose :
//=======================================================================
-void STEPCAFControl_Provider::personizeWS(Handle(XSControl_WorkSession)& theWS)
+void STEPCAFControl_Provider::personizeWS(Handle(DE_WorkSession)& theWS)
{
if (theWS.IsNull())
{
Message::SendWarning() << "Warning: STEPCAFControl_Provider :"
<< " Null work session, use internal temporary session";
- theWS = new XSControl_WorkSession();
+ theWS = new DE_WorkSession();
}
Handle(STEPControl_Controller) aCntrl =
Handle(STEPControl_Controller)::DownCast(theWS->NormAdaptor());
//=======================================================================
bool STEPCAFControl_Provider::Read(const TCollection_AsciiString& thePath,
const Handle(TDocStd_Document)& theDocument,
- Handle(XSControl_WorkSession)& theWS,
+ Handle(DE_WorkSession)& theWS,
const Message_ProgressRange& theProgress)
{
if (theDocument.IsNull())
bool STEPCAFControl_Provider::Read(std::istream& theIStream,
const Handle(TDocStd_Document)& theDocument,
const TCollection_AsciiString theName,
- Handle(XSControl_WorkSession)& theWS,
+ Handle(DE_WorkSession)& theWS,
const Message_ProgressRange& theProgress)
{
if (theDocument.IsNull())
//=======================================================================
bool STEPCAFControl_Provider::Write(const TCollection_AsciiString& thePath,
const Handle(TDocStd_Document)& theDocument,
- Handle(XSControl_WorkSession)& theWS,
+ Handle(DE_WorkSession)& theWS,
const Message_ProgressRange& theProgress)
{
if (GetNode().IsNull() ||
//=======================================================================
bool STEPCAFControl_Provider::Write(std::ostream& theOStream,
const Handle(TDocStd_Document)& theDocument,
- Handle(XSControl_WorkSession)& theWS,
+ Handle(DE_WorkSession)& theWS,
const Message_ProgressRange& theProgress)
{
if (GetNode().IsNull() ||
//=======================================================================
bool STEPCAFControl_Provider::Read(const TCollection_AsciiString& thePath,
TopoDS_Shape& theShape,
- Handle(XSControl_WorkSession)& theWS,
+ Handle(DE_WorkSession)& theWS,
const Message_ProgressRange& theProgress)
{
(void)theProgress;
bool STEPCAFControl_Provider::Read(std::istream& theIStream,
TopoDS_Shape& theShape,
const TCollection_AsciiString theName,
- Handle(XSControl_WorkSession)& theWS,
+ Handle(DE_WorkSession)& theWS,
const Message_ProgressRange& theProgress)
{
(void)theProgress;
//=======================================================================
bool STEPCAFControl_Provider::Write(const TCollection_AsciiString& thePath,
const TopoDS_Shape& theShape,
- Handle(XSControl_WorkSession)& theWS,
+ Handle(DE_WorkSession)& theWS,
const Message_ProgressRange& theProgress)
{
if (GetNode().IsNull() ||
//=======================================================================
bool STEPCAFControl_Provider::Write(std::ostream& theOStream,
const TopoDS_Shape& theShape,
- Handle(XSControl_WorkSession)& theWS,
+ Handle(DE_WorkSession)& theWS,
const Message_ProgressRange& theProgress)
{
if (GetNode().IsNull() ||
//! @return true if Read operation has ended correctly
Standard_EXPORT virtual bool Read(const TCollection_AsciiString& thePath,
const Handle(TDocStd_Document)& theDocument,
- Handle(XSControl_WorkSession)& theWS,
+ Handle(DE_WorkSession)& theWS,
const Message_ProgressRange& theProgress = Message_ProgressRange()) Standard_OVERRIDE;
//! Reads a CAD file, according internal configuration
Standard_EXPORT virtual bool Read(std::istream& theIStream,
const Handle(TDocStd_Document)& theDocument,
const TCollection_AsciiString theName,
- Handle(XSControl_WorkSession)& theWS,
+ Handle(DE_WorkSession)& theWS,
const Message_ProgressRange& theProgress = Message_ProgressRange());
//! Writes a CAD file, according internal configuration
//! @return true if Write operation has ended correctly
Standard_EXPORT virtual bool Write(const TCollection_AsciiString& thePath,
const Handle(TDocStd_Document)& theDocument,
- Handle(XSControl_WorkSession)& theWS,
+ Handle(DE_WorkSession)& theWS,
const Message_ProgressRange& theProgress = Message_ProgressRange()) Standard_OVERRIDE;
//! Writes a CAD file, according internal configuration
//! @return true if Write operation has ended correctly
Standard_EXPORT virtual bool Write(std::ostream& theOStream,
const Handle(TDocStd_Document)& theDocument,
- Handle(XSControl_WorkSession)& theWS,
+ Handle(DE_WorkSession)& theWS,
const Message_ProgressRange& theProgress = Message_ProgressRange());
//! Reads a CAD file, according internal configuration
//! @return true if Read operation has ended correctly
Standard_EXPORT virtual bool Read(const TCollection_AsciiString& thePath,
TopoDS_Shape& theShape,
- Handle(XSControl_WorkSession)& theWS,
+ Handle(DE_WorkSession)& theWS,
const Message_ProgressRange& theProgress = Message_ProgressRange()) Standard_OVERRIDE;
//! Reads a CAD file, according internal configuration
Standard_EXPORT virtual bool Read(std::istream& theIStream,
TopoDS_Shape& theShape,
const TCollection_AsciiString theName,
- Handle(XSControl_WorkSession)& theWS,
+ Handle(DE_WorkSession)& theWS,
const Message_ProgressRange& theProgress = Message_ProgressRange());
//! Writes a CAD file, according internal configuration
//! @return true if Write operation has ended correctly
Standard_EXPORT virtual bool Write(const TCollection_AsciiString& thePath,
const TopoDS_Shape& theShape,
- Handle(XSControl_WorkSession)& theWS,
+ Handle(DE_WorkSession)& theWS,
const Message_ProgressRange& theProgress = Message_ProgressRange()) Standard_OVERRIDE;
//! Writes a CAD file, according internal configuration
//! @return true if Write operation has ended correctly
Standard_EXPORT virtual bool Write(std::ostream& theOStream,
const TopoDS_Shape& theShape,
- Handle(XSControl_WorkSession)& theWS,
+ Handle(DE_WorkSession)& theWS,
const Message_ProgressRange& theProgress = Message_ProgressRange());
public:
//! Personizes work session with current format.
//! Creates new temporary session if current session is null
//! @param[in] theWS current work session
- void personizeWS(Handle(XSControl_WorkSession)& theWS);
+ void personizeWS(Handle(DE_WorkSession)& theWS);
//! Initialize static variables
void initStatic(const Handle(DE_ConfigurationNode)& theNode);
#include <XSAlgo.hxx>
#include <XSAlgo_AlgoContainer.hxx>
#include <XSControl_TransferReader.hxx>
-#include <XSControl_WorkSession.hxx>
+#include <DE_WorkSession.hxx>
#include <StepAP242_DraughtingModelItemAssociation.hxx>
#include <StepAP242_GeometricItemSpecificUsage.hxx>
#include <StepGeom_CartesianPoint.hxx>
//purpose :
//=======================================================================
-STEPCAFControl_Reader::STEPCAFControl_Reader(const Handle(XSControl_WorkSession)& WS,
+STEPCAFControl_Reader::STEPCAFControl_Reader(const Handle(DE_WorkSession)& WS,
const Standard_Boolean scratch)
: myColorMode(Standard_True),
myNameMode(Standard_True),
//purpose :
//=======================================================================
-void STEPCAFControl_Reader::Init(const Handle(XSControl_WorkSession)& WS,
+void STEPCAFControl_Reader::Init(const Handle(DE_WorkSession)& WS,
const Standard_Boolean scratch)
{
// necessary only in Writer, to set good actor: WS->SelectNorm ( "STEP" );
#endif
// create new WorkSession and Reader
- Handle(XSControl_WorkSession) newWS = new XSControl_WorkSession;
+ Handle(DE_WorkSession) newWS = new DE_WorkSession;
newWS->SelectNorm("STEP");
STEPControl_Reader sr(newWS, Standard_False);
//purpose : auxiliary: set style for parts and instances
//=======================================================================
-static void SetStyle(const Handle(XSControl_WorkSession) &theWS,
+static void SetStyle(const Handle(DE_WorkSession) &theWS,
const XCAFDoc_DataMapOfShapeLabel& theMap,
const Handle(XCAFDoc_ColorTool)& theCTool,
const Handle(XCAFDoc_ShapeTool)& theSTool,
//purpose :
//=======================================================================
-Standard_Boolean STEPCAFControl_Reader::ReadColors(const Handle(XSControl_WorkSession) &WS,
+Standard_Boolean STEPCAFControl_Reader::ReadColors(const Handle(DE_WorkSession) &WS,
const Handle(TDocStd_Document)& Doc) const
{
STEPConstruct_Styles Styles(WS);
//purpose :
//=======================================================================
-Standard_Boolean STEPCAFControl_Reader::ReadNames(const Handle(XSControl_WorkSession) &WS,
+Standard_Boolean STEPCAFControl_Reader::ReadNames(const Handle(DE_WorkSession) &WS,
const Handle(TDocStd_Document)& Doc,
const STEPCAFControl_DataMapOfPDExternFile& PDFileMap) const
{
//purpose :
//=======================================================================
-Standard_Boolean STEPCAFControl_Reader::ReadValProps(const Handle(XSControl_WorkSession) &WS,
+Standard_Boolean STEPCAFControl_Reader::ReadValProps(const Handle(DE_WorkSession) &WS,
const Handle(TDocStd_Document)& Doc,
const STEPCAFControl_DataMapOfPDExternFile& PDFileMap) const
{
//purpose :
//=======================================================================
-Standard_Boolean STEPCAFControl_Reader::ReadLayers(const Handle(XSControl_WorkSession) &WS,
+Standard_Boolean STEPCAFControl_Reader::ReadLayers(const Handle(DE_WorkSession) &WS,
const Handle(TDocStd_Document)& Doc) const
{
const Handle(Interface_InterfaceModel) &Model = WS->Model();
//purpose :
//=======================================================================
-static Standard_Boolean findNextSHUOlevel(const Handle(XSControl_WorkSession) &WS,
+static Standard_Boolean findNextSHUOlevel(const Handle(DE_WorkSession) &WS,
const Handle(StepRepr_SpecifiedHigherUsageOccurrence)& SHUO,
const Handle(XCAFDoc_ShapeTool)& STool,
const STEPCAFControl_DataMapOfPDExternFile &PDFileMap,
//function : setSHUOintoDoc
//purpose : auxiliary
//=======================================================================
-static TDF_Label setSHUOintoDoc(const Handle(XSControl_WorkSession) &WS,
+static TDF_Label setSHUOintoDoc(const Handle(DE_WorkSession) &WS,
const Handle(StepRepr_SpecifiedHigherUsageOccurrence)& SHUO,
const Handle(XCAFDoc_ShapeTool)& STool,
const STEPCAFControl_DataMapOfPDExternFile &PDFileMap,
//purpose :
//=======================================================================
-Standard_Boolean STEPCAFControl_Reader::ReadSHUOs(const Handle(XSControl_WorkSession) &WS,
+Standard_Boolean STEPCAFControl_Reader::ReadSHUOs(const Handle(DE_WorkSession) &WS,
const Handle(TDocStd_Document)& Doc,
const STEPCAFControl_DataMapOfPDExternFile& PDFileMap) const
{
//purpose : auxiliary find shape index in map og imported shapes
//=======================================================================
static Standard_Integer FindShapeIndexForDGT(const Handle(Standard_Transient)& theEnt,
- const Handle(XSControl_WorkSession)& theWS)
+ const Handle(DE_WorkSession)& theWS)
{
const Handle(Transfer_TransientProcess) &aTP = theWS->TransferReader()->TransientProcess();
// try to find index of given entity
//purpose :
//=======================================================================
static void collectShapeAspect(const Handle(StepRepr_ShapeAspect)& theSA,
- const Handle(XSControl_WorkSession)& theWS,
+ const Handle(DE_WorkSession)& theWS,
NCollection_Sequence<Handle(StepRepr_ShapeAspect)>& theSAs)
{
if (theSA.IsNull())
//=======================================================================
static TDF_Label getShapeLabel(const Handle(StepRepr_RepresentationItem)& theItem,
- const Handle(XSControl_WorkSession)& theWS,
+ const Handle(DE_WorkSession)& theWS,
const Handle(XCAFDoc_ShapeTool)& theShapeTool)
{
TDF_Label aShapeL;
const XCAFDimTolObjects_DatumModifWithValue theXCAFModifWithVal,
const Standard_Real theModifValue,
const Handle(TDocStd_Document)& theDoc,
- const Handle(XSControl_WorkSession)& theWS)
+ const Handle(DE_WorkSession)& theWS)
{
Handle(XCAFDoc_ShapeTool) aSTool = XCAFDoc_DocumentTool::ShapeTool(theDoc->Main());
Handle(XCAFDoc_DimTolTool) aDGTTool = XCAFDoc_DocumentTool::DimTolTool(theDoc->Main());
Standard_Boolean STEPCAFControl_Reader::readDatumsAP242(const Handle(Standard_Transient)& theEnt,
const TDF_Label theGDTL,
const Handle(TDocStd_Document)& theDoc,
- const Handle(XSControl_WorkSession)& theWS)
+ const Handle(DE_WorkSession)& theWS)
{
const Handle(XSControl_TransferReader) &aTR = theWS->TransferReader();
const Handle(Transfer_TransientProcess) &aTP = aTR->TransientProcess();
//=======================================================================
TDF_Label STEPCAFControl_Reader::createGDTObjectInXCAF(const Handle(Standard_Transient)& theEnt,
const Handle(TDocStd_Document)& theDoc,
- const Handle(XSControl_WorkSession)& theWS)
+ const Handle(DE_WorkSession)& theWS)
{
TDF_Label aGDTL;
if (!theEnt->IsKind(STANDARD_TYPE(StepShape_DimensionalSize)) &&
static void setDimObjectToXCAF(const Handle(Standard_Transient)& theEnt,
const TDF_Label& aDimL,
const Handle(TDocStd_Document)& theDoc,
- const Handle(XSControl_WorkSession)& theWS)
+ const Handle(DE_WorkSession)& theWS)
{
Handle(XCAFDoc_ShapeTool) aSTool = XCAFDoc_DocumentTool::ShapeTool(theDoc->Main());
Handle(XCAFDoc_DimTolTool) aDGTTool = XCAFDoc_DocumentTool::DimTolTool(theDoc->Main());
static void setGeomTolObjectToXCAF(const Handle(Standard_Transient)& theEnt,
const TDF_Label& theTolL,
const Handle(TDocStd_Document)& theDoc,
- const Handle(XSControl_WorkSession)& theWS)
+ const Handle(DE_WorkSession)& theWS)
{
Handle(XCAFDoc_ShapeTool) aSTool = XCAFDoc_DocumentTool::ShapeTool(theDoc->Main());
Handle(XCAFDoc_DimTolTool) aDGTTool = XCAFDoc_DocumentTool::DimTolTool(theDoc->Main());
//purpose :
//=======================================================================
-Standard_Boolean STEPCAFControl_Reader::ReadGDTs(const Handle(XSControl_WorkSession)& theWS,
+Standard_Boolean STEPCAFControl_Reader::ReadGDTs(const Handle(DE_WorkSession)& theWS,
const Handle(TDocStd_Document)& theDoc)
{
const Handle(Interface_InterfaceModel) &aModel = theWS->Model();
//purpose :
//=======================================================================
-Standard_Boolean STEPCAFControl_Reader::ReadMaterials(const Handle(XSControl_WorkSession) &WS,
+Standard_Boolean STEPCAFControl_Reader::ReadMaterials(const Handle(DE_WorkSession) &WS,
const Handle(TDocStd_Document)& Doc,
const Handle(TColStd_HSequenceOfTransient)& SeqPDS) const
{
//purpose : collect all labels of representations in given representation
//=======================================================================
-void collectViewShapes(const Handle(XSControl_WorkSession)& theWS,
+void collectViewShapes(const Handle(DE_WorkSession)& theWS,
const Handle(TDocStd_Document)& theDoc,
const Handle(StepRepr_Representation) theRepr,
TDF_LabelSequence& theShapes)
//function : ReadViews
//purpose :
//=======================================================================
-Standard_Boolean STEPCAFControl_Reader::ReadViews(const Handle(XSControl_WorkSession)& theWS, const Handle(TDocStd_Document)& theDoc) const
+Standard_Boolean STEPCAFControl_Reader::ReadViews(const Handle(DE_WorkSession)& theWS, const Handle(TDocStd_Document)& theDoc) const
{
const Handle(Interface_InterfaceModel) &aModel = theWS->Model();
Handle(XCAFDoc_ShapeTool) aSTool = XCAFDoc_DocumentTool::ShapeTool(theDoc->Main());
#include <XCAFDimTolObjects_DatumModifiersSequence.hxx>
#include <XCAFDimTolObjects_DatumModifWithValue.hxx>
-class XSControl_WorkSession;
+class DE_WorkSession;
class TDocStd_Document;
class STEPCAFControl_ExternFile;
class TopoDS_Shape;
//! Creates a reader tool and attaches it to an already existing Session
//! Clears the session if it was not yet set for STEP
- Standard_EXPORT STEPCAFControl_Reader(const Handle(XSControl_WorkSession)& WS, const Standard_Boolean scratch = Standard_True);
+ Standard_EXPORT STEPCAFControl_Reader(const Handle(DE_WorkSession)& WS, const Standard_Boolean scratch = Standard_True);
//! Destructor.
Standard_EXPORT virtual ~STEPCAFControl_Reader();
//! Clears the internal data structures and attaches to a new session
//! Clears the session if it was not yet set for STEP
- Standard_EXPORT void Init (const Handle(XSControl_WorkSession)& WS, const Standard_Boolean scratch = Standard_True);
+ Standard_EXPORT void Init (const Handle(DE_WorkSession)& WS, const Standard_Boolean scratch = Standard_True);
//! Loads a file and returns the read status
//! Provided for use like single-file reader.
//! Reads style assignments from STEP model and sets
//! corresponding color assignments in the DECAF document
Standard_EXPORT Standard_Boolean ReadColors
- (const Handle(XSControl_WorkSession)& WS,
+ (const Handle(DE_WorkSession)& WS,
const Handle(TDocStd_Document)& doc) const;
//! Reads names of parts defined in the STEP model and
//! assigns them to corresponding labels in the DECAF document
- Standard_EXPORT Standard_Boolean ReadNames (const Handle(XSControl_WorkSession)& WS, const Handle(TDocStd_Document)& doc, const STEPCAFControl_DataMapOfPDExternFile& PDFileMap) const;
+ Standard_EXPORT Standard_Boolean ReadNames (const Handle(DE_WorkSession)& WS, const Handle(TDocStd_Document)& doc, const STEPCAFControl_DataMapOfPDExternFile& PDFileMap) const;
//! Reads validation properties assigned to shapes in the STEP
//! model and assigns them to corresponding labels in the DECAF
//! document
- Standard_EXPORT Standard_Boolean ReadValProps (const Handle(XSControl_WorkSession)& WS, const Handle(TDocStd_Document)& doc, const STEPCAFControl_DataMapOfPDExternFile& PDFileMap) const;
+ Standard_EXPORT Standard_Boolean ReadValProps (const Handle(DE_WorkSession)& WS, const Handle(TDocStd_Document)& doc, const STEPCAFControl_DataMapOfPDExternFile& PDFileMap) const;
//! Reads layers of parts defined in the STEP model and
//! set reference between shape and layers in the DECAF document
- Standard_EXPORT Standard_Boolean ReadLayers (const Handle(XSControl_WorkSession)& WS, const Handle(TDocStd_Document)& doc) const;
+ Standard_EXPORT Standard_Boolean ReadLayers (const Handle(DE_WorkSession)& WS, const Handle(TDocStd_Document)& doc) const;
//! Reads SHUO for instances defined in the STEP model and
//! set reference between shape instances from different assemblyes
- Standard_EXPORT Standard_Boolean ReadSHUOs (const Handle(XSControl_WorkSession)& WS, const Handle(TDocStd_Document)& doc, const STEPCAFControl_DataMapOfPDExternFile& PDFileMap) const;
+ Standard_EXPORT Standard_Boolean ReadSHUOs (const Handle(DE_WorkSession)& WS, const Handle(TDocStd_Document)& doc, const STEPCAFControl_DataMapOfPDExternFile& PDFileMap) const;
//! Reads D> for instances defined in the STEP model and
//! set reference between shape instances from different assemblyes
- Standard_EXPORT Standard_Boolean ReadGDTs (const Handle(XSControl_WorkSession)& WS, const Handle(TDocStd_Document)& doc);
+ Standard_EXPORT Standard_Boolean ReadGDTs (const Handle(DE_WorkSession)& WS, const Handle(TDocStd_Document)& doc);
//! Reads materials for instances defined in the STEP model and
//! set reference between shape instances from different assemblyes
- Standard_EXPORT Standard_Boolean ReadMaterials (const Handle(XSControl_WorkSession)& WS, const Handle(TDocStd_Document)& doc, const Handle(TColStd_HSequenceOfTransient)& SeqPDS) const;
+ Standard_EXPORT Standard_Boolean ReadMaterials (const Handle(DE_WorkSession)& WS, const Handle(TDocStd_Document)& doc, const Handle(TColStd_HSequenceOfTransient)& SeqPDS) const;
//! Reads Views for instances defined in the STEP model
- Standard_EXPORT Standard_Boolean ReadViews(const Handle(XSControl_WorkSession)& theWS, const Handle(TDocStd_Document)& theDoc) const;
+ Standard_EXPORT Standard_Boolean ReadViews(const Handle(DE_WorkSession)& theWS, const Handle(TDocStd_Document)& theDoc) const;
//! Populates the sub-Label of the passed TDF Label with shape
//! data associated with the given STEP Representation Item,
const XCAFDimTolObjects_DatumModifWithValue theXCAFModifWithVal,
const Standard_Real theModifValue,
const Handle(TDocStd_Document)& theDoc,
- const Handle(XSControl_WorkSession)& theWS);
+ const Handle(DE_WorkSession)& theWS);
//! Internal method. Read Datums, connected to GeomTolerance theGDTL.
Standard_Boolean readDatumsAP242(const Handle(Standard_Transient)& theEnt,
const TDF_Label theGDTL,
const Handle(TDocStd_Document)& theDoc,
- const Handle(XSControl_WorkSession)& theWS);
+ const Handle(DE_WorkSession)& theWS);
//! Internal method. Read Dimension or GeomTolerance.
TDF_Label createGDTObjectInXCAF(const Handle(Standard_Transient)& theEnt,
const Handle(TDocStd_Document)& theDoc,
- const Handle(XSControl_WorkSession)& theWS);
+ const Handle(DE_WorkSession)& theWS);
//! Prepares units for transfer
void prepareUnits(const Handle(StepData_StepModel)& theModel,
#include <XSAlgo.hxx>
#include <XSAlgo_AlgoContainer.hxx>
#include <XSControl_TransferWriter.hxx>
-#include <XSControl_WorkSession.hxx>
+#include <DE_WorkSession.hxx>
#include <UnitsMethods.hxx>
// added by skl 15.01.2004 for D> writing
myMatMode ( Standard_True )
{
STEPCAFControl_Controller::Init();
- Handle(XSControl_WorkSession) WS = new XSControl_WorkSession;
+ Handle(DE_WorkSession) WS = new DE_WorkSession;
Init ( WS );
}
//purpose :
//=======================================================================
-STEPCAFControl_Writer::STEPCAFControl_Writer (const Handle(XSControl_WorkSession)& WS,
+STEPCAFControl_Writer::STEPCAFControl_Writer (const Handle(DE_WorkSession)& WS,
const Standard_Boolean scratch) :
myColorMode(Standard_True),
myNameMode(Standard_True),
//purpose :
//=======================================================================
-void STEPCAFControl_Writer::Init (const Handle(XSControl_WorkSession)& WS,
+void STEPCAFControl_Writer::Init (const Handle(DE_WorkSession)& WS,
const Standard_Boolean scratch)
{
WS->SelectNorm ( "STEP" );
if ( ! XCAFDoc_ShapeTool::IsAssembly ( L ) && !XCAFDoc_ShapeTool::IsComponent ( L )) {
labels.Append ( L );
// prepare for transfer
- Handle(XSControl_WorkSession) newWS = new XSControl_WorkSession;
+ Handle(DE_WorkSession) newWS = new DE_WorkSession;
newWS->SelectNorm ( "STEP" );
STEPControl_Writer sw ( newWS, Standard_True );
TDF_LabelSequence Lseq;
//purpose :
//=======================================================================
-Standard_Boolean STEPCAFControl_Writer::WriteExternRefs (const Handle(XSControl_WorkSession) &WS,
+Standard_Boolean STEPCAFControl_Writer::WriteExternRefs (const Handle(DE_WorkSession) &WS,
const TDF_LabelSequence &labels) const
{
if ( labels.Length() <=0 ) return Standard_False;
//purpose :
//=======================================================================
-Standard_Boolean STEPCAFControl_Writer::WriteColors (const Handle(XSControl_WorkSession) &WS,
+Standard_Boolean STEPCAFControl_Writer::WriteColors (const Handle(DE_WorkSession) &WS,
const TDF_LabelSequence &labels)
{
if ( labels.Length() <=0 ) return Standard_False;
//purpose :
//=======================================================================
-Standard_Boolean STEPCAFControl_Writer::WriteNames (const Handle(XSControl_WorkSession) &WS,
+Standard_Boolean STEPCAFControl_Writer::WriteNames (const Handle(DE_WorkSession) &WS,
const TDF_LabelSequence &labels) const
{
if ( labels.Length() <=0 ) return Standard_False;
//function : WritePropsForLabel
//purpose :
//=======================================================================
-static Standard_Boolean WritePropsForLabel(const Handle(XSControl_WorkSession) &WS,
+static Standard_Boolean WritePropsForLabel(const Handle(DE_WorkSession) &WS,
const Handle(XCAFDoc_ShapeTool) &aSTool,
const STEPCAFControl_DataMapOfLabelShape &myLabels,
const TDF_Label &L,
//purpose :
//=======================================================================
-Standard_Boolean STEPCAFControl_Writer::WriteValProps (const Handle(XSControl_WorkSession) &WS,
+Standard_Boolean STEPCAFControl_Writer::WriteValProps (const Handle(DE_WorkSession) &WS,
const TDF_LabelSequence &labels,
const Standard_CString multi) const
{
//purpose :
//=======================================================================
-Standard_Boolean STEPCAFControl_Writer::WriteLayers (const Handle(XSControl_WorkSession) &WS,
+Standard_Boolean STEPCAFControl_Writer::WriteLayers (const Handle(DE_WorkSession) &WS,
const TDF_LabelSequence &labels ) const
{
//function : getProDefinitionOfNAUO
//purpose : auxiliary
//=======================================================================
-static Standard_Boolean getProDefinitionOfNAUO(const Handle(XSControl_WorkSession)& WS,
+static Standard_Boolean getProDefinitionOfNAUO(const Handle(DE_WorkSession)& WS,
const TopoDS_Shape& theShape,
Handle(StepBasic_ProductDefinition)& PD,
Handle(StepRepr_NextAssemblyUsageOccurrence)& NAUO,
//=======================================================================
static Standard_Boolean writeSHUO (const Handle(XCAFDoc_GraphNode)& theSHUO,
const Handle(XCAFDoc_ShapeTool)& theSTool,
- const Handle(XSControl_WorkSession)& WS,
+ const Handle(DE_WorkSession)& WS,
Handle(StepRepr_SpecifiedHigherUsageOccurrence)& theTopSHUO,
TopoDS_Shape& NAUOShape,
Handle(StepBasic_ProductDefinition)& theRelatingPD,
//=======================================================================
static Standard_Boolean createSHUOStyledItem (const XCAFPrs_Style& style,
const Handle(StepRepr_ProductDefinitionShape)& PDS,
- const Handle(XSControl_WorkSession) &WS,
+ const Handle(DE_WorkSession) &WS,
const TopoDS_Shape& Sh,
const Handle(XCAFDoc_ShapeTool)& STool,
MoniTool_DataMapOfShapeTransient& myMapCompMDGPR)
//purpose :
//=======================================================================
-Standard_Boolean STEPCAFControl_Writer::WriteSHUOs (const Handle(XSControl_WorkSession) &WS,
+Standard_Boolean STEPCAFControl_Writer::WriteSHUOs (const Handle(DE_WorkSession) &WS,
const TDF_LabelSequence &labels )
{
if ( labels.Length() <=0 ) return Standard_False;
//purpose : auxiliary (write Shape_Aspect entity for given shape)
//=======================================================================
-Handle(StepRepr_ShapeAspect) STEPCAFControl_Writer::WriteShapeAspect (const Handle(XSControl_WorkSession) &WS,
+Handle(StepRepr_ShapeAspect) STEPCAFControl_Writer::WriteShapeAspect (const Handle(DE_WorkSession) &WS,
const TDF_Label theLabel,
const TopoDS_Shape theShape,
Handle(StepRepr_RepresentationContext)& theRC,
//function : WritePresentation
//purpose : auxiliary (write annotation plane and presentation)
//======================================================================
-void STEPCAFControl_Writer::WritePresentation(const Handle(XSControl_WorkSession)& WS,
+void STEPCAFControl_Writer::WritePresentation(const Handle(DE_WorkSession)& WS,
const TopoDS_Shape& thePresentation,
const Handle(TCollection_HAsciiString)& thePrsName,
const Standard_Boolean hasSemantic,
// necessary entities and link them to already written datum
// in case of multiple features association)
//=======================================================================
-Handle(StepDimTol_Datum) STEPCAFControl_Writer::WriteDatumAP242(const Handle(XSControl_WorkSession)& WS,
+Handle(StepDimTol_Datum) STEPCAFControl_Writer::WriteDatumAP242(const Handle(DE_WorkSession)& WS,
const TDF_LabelSequence& theShapeL,
const TDF_Label& theDatumL,
const Standard_Boolean isFirstDTarget,
//purpose : auxiliary (write all data for given dimension: values,
// qualifiers, modifiers, orientation and tolerance class)
//======================================================================
-static void WriteDimValues(const Handle(XSControl_WorkSession) &WS,
+static void WriteDimValues(const Handle(DE_WorkSession) &WS,
const Handle(XCAFDimTolObjects_DimensionObject) theObject,
const Handle(StepRepr_RepresentationContext) theRC,
const StepShape_DimensionalCharacteristic theDimension)
//function : WriteDerivedGeometry
//purpose : auxiliary (write connection point for dimensions)
//======================================================================
-static void WriteDerivedGeometry (const Handle(XSControl_WorkSession) &WS,
+static void WriteDerivedGeometry (const Handle(DE_WorkSession) &WS,
const Handle(XCAFDimTolObjects_DimensionObject)& theObject,
const Handle(StepRepr_ConstructiveGeometryRepresentation) theRepr,
Handle(StepRepr_ShapeAspect)& theFirstSA,
//purpose : auxiliary (write Write datum system for given
// geometric_tolerance)
//======================================================================
-static Handle(StepDimTol_HArray1OfDatumSystemOrReference) WriteDatumSystem(const Handle(XSControl_WorkSession) &WS,
+static Handle(StepDimTol_HArray1OfDatumSystemOrReference) WriteDatumSystem(const Handle(DE_WorkSession) &WS,
const TDF_Label theGeomTolL,
const TDF_LabelSequence theDatumSeq,
const STEPConstruct_DataMapOfAsciiStringTransient theDatumMap,
//function : WriteToleranceZone
//purpose : auxiliary (write tolerace zones)
//=======================================================================
-void STEPCAFControl_Writer::WriteToleranceZone (const Handle(XSControl_WorkSession) &WS,
+void STEPCAFControl_Writer::WriteToleranceZone (const Handle(DE_WorkSession) &WS,
const Handle(XCAFDimTolObjects_GeomToleranceObject)& theObject,
const Handle(StepDimTol_GeometricTolerance)& theEntity,
const Handle(StepRepr_RepresentationContext)& theRC)
//purpose : auxiliary (write Geometric_Tolerance entity for given shapes,
// label and datum system)
//======================================================================
-void STEPCAFControl_Writer::WriteGeomTolerance (const Handle(XSControl_WorkSession) &WS,
+void STEPCAFControl_Writer::WriteGeomTolerance (const Handle(DE_WorkSession) &WS,
const TDF_LabelSequence& theShapeSeqL,
const TDF_Label& theGeomTolL,
const Handle(StepDimTol_HArray1OfDatumSystemOrReference)& theDatumSystem,
//function : WriteDGTs
//purpose :
//=======================================================================
-Standard_Boolean STEPCAFControl_Writer::WriteDGTs (const Handle(XSControl_WorkSession) &WS,
+Standard_Boolean STEPCAFControl_Writer::WriteDGTs (const Handle(DE_WorkSession) &WS,
const TDF_LabelSequence &labels ) const
{
//purpose :
//=======================================================================
-Standard_Boolean STEPCAFControl_Writer::WriteDGTsAP242 (const Handle(XSControl_WorkSession) &WS,
+Standard_Boolean STEPCAFControl_Writer::WriteDGTsAP242 (const Handle(DE_WorkSession) &WS,
const TDF_LabelSequence &labels )
{
// Get working data
//purpose :
//=======================================================================
-Standard_Boolean STEPCAFControl_Writer::WriteMaterials (const Handle(XSControl_WorkSession) &WS,
+Standard_Boolean STEPCAFControl_Writer::WriteMaterials (const Handle(DE_WorkSession) &WS,
const TDF_LabelSequence &labels ) const
{
#include <TDF_LabelSequence.hxx>
#include <XCAFDimTolObjects_GeomToleranceObject.hxx>
-class XSControl_WorkSession;
+class DE_WorkSession;
class TDocStd_Document;
class STEPCAFControl_ExternFile;
class TopoDS_Shape;
//! Creates a reader tool and attaches it to an already existing Session
//! Clears the session if it was not yet set for STEP
//! Clears the internal data structures
- Standard_EXPORT STEPCAFControl_Writer(const Handle(XSControl_WorkSession)& WS, const Standard_Boolean scratch = Standard_True);
+ Standard_EXPORT STEPCAFControl_Writer(const Handle(DE_WorkSession)& WS, const Standard_Boolean scratch = Standard_True);
//! Clears the internal data structures and attaches to a new session
//! Clears the session if it was not yet set for STEP
- Standard_EXPORT void Init (const Handle(XSControl_WorkSession)& WS, const Standard_Boolean scratch = Standard_True);
+ Standard_EXPORT void Init (const Handle(DE_WorkSession)& WS, const Standard_Boolean scratch = Standard_True);
//! Writes all the produced models into file
//! In case of multimodel with extern references,
const Message_ProgressRange& theProgress = Message_ProgressRange());
//! Write external references to STEP
- Standard_EXPORT Standard_Boolean WriteExternRefs (const Handle(XSControl_WorkSession)& WS, const TDF_LabelSequence& labels) const;
+ Standard_EXPORT Standard_Boolean WriteExternRefs (const Handle(DE_WorkSession)& WS, const TDF_LabelSequence& labels) const;
//! Write colors assigned to specified labels, to STEP model
- Standard_EXPORT Standard_Boolean WriteColors (const Handle(XSControl_WorkSession)& WS, const TDF_LabelSequence& labels);
+ Standard_EXPORT Standard_Boolean WriteColors (const Handle(DE_WorkSession)& WS, const TDF_LabelSequence& labels);
//! Write names assigned to specified labels, to STEP model
- Standard_EXPORT Standard_Boolean WriteNames (const Handle(XSControl_WorkSession)& WS, const TDF_LabelSequence& labels) const;
+ Standard_EXPORT Standard_Boolean WriteNames (const Handle(DE_WorkSession)& WS, const TDF_LabelSequence& labels) const;
//! Write D>s assigned to specified labels, to STEP model
- Standard_EXPORT Standard_Boolean WriteDGTs (const Handle(XSControl_WorkSession)& WS, const TDF_LabelSequence& labels) const;
+ Standard_EXPORT Standard_Boolean WriteDGTs (const Handle(DE_WorkSession)& WS, const TDF_LabelSequence& labels) const;
//! Write D>s assigned to specified labels, to STEP model, according AP242
- Standard_EXPORT Standard_Boolean WriteDGTsAP242 (const Handle(XSControl_WorkSession)& WS, const TDF_LabelSequence& labels);
+ Standard_EXPORT Standard_Boolean WriteDGTsAP242 (const Handle(DE_WorkSession)& WS, const TDF_LabelSequence& labels);
//! Write materials assigned to specified labels, to STEP model
- Standard_EXPORT Standard_Boolean WriteMaterials (const Handle(XSControl_WorkSession)& WS, const TDF_LabelSequence& labels) const;
+ Standard_EXPORT Standard_Boolean WriteMaterials (const Handle(DE_WorkSession)& WS, const TDF_LabelSequence& labels) const;
//! Write validation properties assigned to specified labels,
//! to STEP model
- Standard_EXPORT Standard_Boolean WriteValProps (const Handle(XSControl_WorkSession)& WS, const TDF_LabelSequence& labels, const Standard_CString multi) const;
+ Standard_EXPORT Standard_Boolean WriteValProps (const Handle(DE_WorkSession)& WS, const TDF_LabelSequence& labels, const Standard_CString multi) const;
//! Write layers assigned to specified labels, to STEP model
- Standard_EXPORT Standard_Boolean WriteLayers (const Handle(XSControl_WorkSession)& WS, const TDF_LabelSequence& labels) const;
+ Standard_EXPORT Standard_Boolean WriteLayers (const Handle(DE_WorkSession)& WS, const TDF_LabelSequence& labels) const;
//! Write SHUO assigned to specified component, to STEP model
- Standard_EXPORT Standard_Boolean WriteSHUOs (const Handle(XSControl_WorkSession)& WS, const TDF_LabelSequence& labels);
+ Standard_EXPORT Standard_Boolean WriteSHUOs (const Handle(DE_WorkSession)& WS, const TDF_LabelSequence& labels);
//! Finds length units located in root of label
//! If it exists, initializes local length unit from it
private:
- Standard_EXPORT Handle(StepRepr_ShapeAspect) WriteShapeAspect(const Handle(XSControl_WorkSession) &WS,
+ Standard_EXPORT Handle(StepRepr_ShapeAspect) WriteShapeAspect(const Handle(DE_WorkSession) &WS,
const TDF_Label theLabel, const TopoDS_Shape theShape, Handle(StepRepr_RepresentationContext)& theRC,
Handle(StepAP242_GeometricItemSpecificUsage)& theGISU);
- Standard_EXPORT void WritePresentation(const Handle(XSControl_WorkSession)& WS,
+ Standard_EXPORT void WritePresentation(const Handle(DE_WorkSession)& WS,
const TopoDS_Shape& thePresentation,
const Handle(TCollection_HAsciiString)& thePrsName,
const Standard_Boolean hasSemantic,
const gp_Pnt& theTextPosition,
const Handle(Standard_Transient) theDimension);
- Standard_EXPORT Handle(StepDimTol_Datum) WriteDatumAP242(const Handle(XSControl_WorkSession)& WS,
+ Standard_EXPORT Handle(StepDimTol_Datum) WriteDatumAP242(const Handle(DE_WorkSession)& WS,
const TDF_LabelSequence& theShapeL,
const TDF_Label& theDatumL,
const Standard_Boolean isFirstDTarget,
const Handle(StepDimTol_Datum) theWrittenDatum);
- Standard_EXPORT void WriteToleranceZone(const Handle(XSControl_WorkSession) &WS, const Handle(XCAFDimTolObjects_GeomToleranceObject)& theObject,
+ Standard_EXPORT void WriteToleranceZone(const Handle(DE_WorkSession) &WS, const Handle(XCAFDimTolObjects_GeomToleranceObject)& theObject,
const Handle(StepDimTol_GeometricTolerance)& theEntity, const Handle(StepRepr_RepresentationContext)& theRC);
- Standard_EXPORT void WriteGeomTolerance(const Handle(XSControl_WorkSession)& WS,
+ Standard_EXPORT void WriteGeomTolerance(const Handle(DE_WorkSession)& WS,
const TDF_LabelSequence& theShapeSeqL,
const TDF_Label& theGeomTolL,
const Handle(StepDimTol_HArray1OfDatumSystemOrReference)& theDatumSystem,
#include <Standard_Handle.hxx>
#include <Standard_Boolean.hxx>
-class XSControl_WorkSession;
+class DE_WorkSession;
class Transfer_FinderProcess;
class Transfer_TransientProcess;
class Interface_HGraph;
Standard_EXPORT STEPConstruct_Tool();
//! Creates a tool and loads it with worksession
- Standard_EXPORT STEPConstruct_Tool(const Handle(XSControl_WorkSession)& WS);
+ Standard_EXPORT STEPConstruct_Tool(const Handle(DE_WorkSession)& WS);
//! Returns currently loaded WorkSession
- const Handle(XSControl_WorkSession)& WS() const;
+ const Handle(DE_WorkSession)& WS() const;
//! Returns current model (Null if not loaded)
Handle(Interface_InterfaceModel) Model() const;
//! Load worksession; returns True if succeeded
//! Returns False if either FinderProcess of TransientProcess
//! cannot be obtained or are Null
- Standard_EXPORT Standard_Boolean SetWS (const Handle(XSControl_WorkSession)& WS);
+ Standard_EXPORT Standard_Boolean SetWS (const Handle(DE_WorkSession)& WS);
- Handle(XSControl_WorkSession) myWS;
+ Handle(DE_WorkSession) myWS;
Handle(Transfer_FinderProcess) myFinderProcess;
Handle(Transfer_TransientProcess) myTransientProcess;
Handle(Interface_HGraph) myHGraph;
#include <Message_ProgressRange.hxx>
#include <DE_ReturnStatus.hxx>
-class XSControl_WorkSession;
+class DE_WorkSession;
class StepData_StepModel;
class StepRepr_RepresentationContext;
//! IFSelect_PrintFail, mode see above; or reader.PrintStatsTransfer();
//! Gets correspondence between a STEP entity and a result
//! shape obtained from it.
-//! Handle(XSControl_WorkSession)
+//! Handle(DE_WorkSession)
//! WS = reader.WS();
//! if ( WS->TransferReader()->HasResult(ent) )
//! TopoDS_Shape shape = WS->TransferReader()->ShapeResult(ent);
//! Creates a Reader for STEP from an already existing Session
//! Clears the session if it was not yet set for STEP
- Standard_EXPORT STEPControl_Reader(const Handle(XSControl_WorkSession)& WS, const Standard_Boolean scratch = Standard_True);
+ Standard_EXPORT STEPControl_Reader(const Handle(DE_WorkSession)& WS,
+ const Standard_Boolean scratch = Standard_True);
//! Returns the model as a StepModel.
//! It can then be consulted (header, product)
Standard_EXPORT Handle(StepData_StepModel) StepModel() const;
+ //! Returns sequence of all unit names for shape representations
+ //! found in file
+ Standard_EXPORT void FileUnits(TColStd_SequenceOfAsciiString& theUnitLengthNames,
+ TColStd_SequenceOfAsciiString& theUnitAngleNames,
+ TColStd_SequenceOfAsciiString& theUnitSolidAngleNames);
+
+ //! Sets system length unit used by transfer process
+ Standard_EXPORT void SetSystemLengthUnit(const Standard_Real theLengthUnit);
+
+ //! Returns system length unit used by transfer process
+ Standard_EXPORT Standard_Real SystemLengthUnit() const;
+
//! Transfers a root given its rank in the list of candidate roots
//! Default is the first one
//! Returns True if a shape has resulted, false else
//! a transfer to a Shape (type of entities is PRODUCT)
Standard_EXPORT virtual Standard_Integer NbRootsForTransfer();
- //! Returns sequence of all unit names for shape representations
- //! found in file
- Standard_EXPORT void FileUnits(TColStd_SequenceOfAsciiString& theUnitLengthNames, TColStd_SequenceOfAsciiString& theUnitAngleNames, TColStd_SequenceOfAsciiString& theUnitSolidAngleNames);
-
- //! Sets system length unit used by transfer process
- Standard_EXPORT void SetSystemLengthUnit(const Standard_Real theLengthUnit);
-
- //! Returns system length unit used by transfer process
- Standard_EXPORT Standard_Real SystemLengthUnit() const;
//! Loads a file and returns the read status
//! Zero for a Model which compies with the Controller
protected:
//! Returns units for length , angle and solidangle for shape representations
- Standard_EXPORT Standard_Boolean findUnits(const Handle(StepRepr_RepresentationContext)& theReprContext, TColStd_Array1OfAsciiString& theNameUnits, TColStd_Array1OfReal& theFactorUnits);
+ Standard_EXPORT Standard_Boolean findUnits(const Handle(StepRepr_RepresentationContext)& theReprContext,
+ TColStd_Array1OfAsciiString& theNameUnits,
+ TColStd_Array1OfReal& theFactorUnits);
//! Returns a sequence of produced shapes
Standard_EXPORT TopTools_SequenceOfShape& Shapes();
Standard_Boolean therootsta;
TColStd_SequenceOfTransient theroots;
- Handle(XSControl_WorkSession) thesession;
+ Handle(DE_WorkSession) thesession;
TopTools_SequenceOfShape theshapes;
};
#include <TopoDS_Shape.hxx>
#include <XSAlgo.hxx>
#include <XSAlgo_AlgoContainer.hxx>
-#include <XSControl_WorkSession.hxx>
+#include <DE_WorkSession.hxx>
#include <XSControl_TransferWriter.hxx>
#include <UnitsMethods.hxx>
STEPControl_Writer::STEPControl_Writer ()
{
STEPControl_Controller::Init();
- SetWS (new XSControl_WorkSession);
+ SetWS (new DE_WorkSession);
}
//=======================================================================
STEPControl_Writer::STEPControl_Writer
- (const Handle(XSControl_WorkSession)& WS, const Standard_Boolean scratch)
+ (const Handle(DE_WorkSession)& WS, const Standard_Boolean scratch)
{
STEPControl_Controller::Init();
SetWS (WS,scratch);
//purpose :
//=======================================================================
-void STEPControl_Writer::SetWS(const Handle(XSControl_WorkSession)& WS,
+void STEPControl_Writer::SetWS(const Handle(DE_WorkSession)& WS,
const Standard_Boolean scratch)
{
thesession = WS;
//purpose :
//=======================================================================
-Handle(XSControl_WorkSession) STEPControl_Writer::WS () const
+Handle(DE_WorkSession) STEPControl_Writer::WS () const
{
return thesession;
}
#include <Standard_Integer.hxx>
#include <Message_ProgressRange.hxx>
-class XSControl_WorkSession;
+class DE_WorkSession;
class StepData_StepModel;
class TopoDS_Shape;
//! Creates a Writer from an already existing Session
//! If <scratch> is True (D), clears already recorded data
- Standard_EXPORT STEPControl_Writer(const Handle(XSControl_WorkSession)& WS, const Standard_Boolean scratch = Standard_True);
+ Standard_EXPORT STEPControl_Writer(const Handle(DE_WorkSession)& WS, const Standard_Boolean scratch = Standard_True);
//! Sets a length-measure value that
//! will be written to uncertainty-measure-with-unit
Standard_EXPORT void UnsetTolerance();
//! Sets a specific session to <me>
- Standard_EXPORT void SetWS (const Handle(XSControl_WorkSession)& WS, const Standard_Boolean scratch = Standard_True);
+ Standard_EXPORT void SetWS (const Handle(DE_WorkSession)& WS, const Standard_Boolean scratch = Standard_True);
//! Returns the session used in <me>
- Standard_EXPORT Handle(XSControl_WorkSession) WS() const;
+ Standard_EXPORT Handle(DE_WorkSession) WS() const;
//! Returns the produced model. Produces a new one if not yet done
//! or if <newone> is True
- Handle(XSControl_WorkSession) thesession;
+ Handle(DE_WorkSession) thesession;
};
#include <Interface_ParamType.hxx>
#include <TColStd_SequenceOfAsciiString.hxx>
#include <StepData_Logical.hxx>
-class Interface_Check;
+class DE_Check;
class TCollection_AsciiString;
class StepData_PDescr;
class Standard_Transient;
//! and <num> is returned as zero
//!
//! Returns True if alphabetic order, False else
- Standard_EXPORT Standard_Boolean NamedForComplex (const Standard_CString name, const Standard_Integer num0, Standard_Integer& num, Handle(Interface_Check)& ach) const;
+ Standard_EXPORT Standard_Boolean NamedForComplex (const Standard_CString name, const Standard_Integer num0, Standard_Integer& num, Handle(DE_Check)& ach) const;
//! Determines the first component which brings a given name, or
//! short name for a Complex Type Entity
//! and <num> is returned as zero
//!
//! Returns True if alphabetic order, False else
- Standard_EXPORT Standard_Boolean NamedForComplex (const Standard_CString theName, const Standard_CString theShortName, const Standard_Integer num0, Standard_Integer& num, Handle(Interface_Check)& ach) const;
+ Standard_EXPORT Standard_Boolean NamedForComplex (const Standard_CString theName, const Standard_CString theShortName, const Standard_Integer num0, Standard_Integer& num, Handle(DE_Check)& ach) const;
//! Checks Count of Parameters of record <num> to equate <nbreq>
//! If this Check is successful, returns True
//! Else, fills <ach> with an Error Message then returns False
//! <mess> is included in the Error message if given non empty
- Standard_EXPORT Standard_Boolean CheckNbParams (const Standard_Integer num, const Standard_Integer nbreq, Handle(Interface_Check)& ach, const Standard_CString mess = "") const;
+ Standard_EXPORT Standard_Boolean CheckNbParams (const Standard_Integer num, const Standard_Integer nbreq, Handle(DE_Check)& ach, const Standard_CString mess = "") const;
//! reads parameter <nump> of record <num> as a sub-list (may be
//! typed, see ReadTypedParameter in this case)
//! with <ach> not filled and <numsub> returned as 0
//! Works with SubListNumber with <aslast> false (no specific case
//! for last parameter)
- Standard_EXPORT Standard_Boolean ReadSubList (const Standard_Integer num, const Standard_Integer nump, const Standard_CString mess, Handle(Interface_Check)& ach, Standard_Integer& numsub, const Standard_Boolean optional = Standard_False, const Standard_Integer lenmin = 0, const Standard_Integer lenmax = 0) const;
+ Standard_EXPORT Standard_Boolean ReadSubList (const Standard_Integer num, const Standard_Integer nump, const Standard_CString mess, Handle(DE_Check)& ach, Standard_Integer& numsub, const Standard_Boolean optional = Standard_False, const Standard_Integer lenmin = 0, const Standard_Integer lenmax = 0) const;
//! reads the content of a sub-list into a transient :
//! SelectNamed, or HArray1 of Integer,Real,String,Transient ...
//! Intended to be called by ReadField
//! The returned status is : negative if failed, 0 if empty.
//! Else the kind to be recorded in the field
- Standard_EXPORT Standard_Integer ReadSub (const Standard_Integer numsub, const Standard_CString mess, Handle(Interface_Check)& ach, const Handle(StepData_PDescr)& descr, Handle(Standard_Transient)& val) const;
+ Standard_EXPORT Standard_Integer ReadSub (const Standard_Integer numsub, const Standard_CString mess, Handle(DE_Check)& ach, const Handle(StepData_PDescr)& descr, Handle(Standard_Transient)& val) const;
//! Reads parameter <nump> of record <num> into a SelectMember,
//! self-sufficient (no Description needed)
//! (SELECT with no Entity as member)
//! But SelectType also manages SelectMember (for SELECT with
//! some members as Entity, some other not)
- Standard_EXPORT Standard_Boolean ReadMember (const Standard_Integer num, const Standard_Integer nump, const Standard_CString mess, Handle(Interface_Check)& ach, Handle(StepData_SelectMember)& val) const;
+ Standard_EXPORT Standard_Boolean ReadMember (const Standard_Integer num, const Standard_Integer nump, const Standard_CString mess, Handle(DE_Check)& ach, Handle(StepData_SelectMember)& val) const;
//! Safe variant for arbitrary type of argument
template <class T>
- Standard_Boolean ReadMember (const Standard_Integer num, const Standard_Integer nump, const Standard_CString mess, Handle(Interface_Check)& ach, Handle(T)& val) const
+ Standard_Boolean ReadMember (const Standard_Integer num, const Standard_Integer nump, const Standard_CString mess, Handle(DE_Check)& ach, Handle(T)& val) const
{
Handle(StepData_SelectMember) aVal = val;
return ReadMember (num, nump, mess, ach, aVal) && ! (val = Handle(T)::DownCast(aVal)).IsNull();
//! description (but the field is read anyway)
//! If the description is not defined, no control is done
//! Returns True when done
- Standard_EXPORT Standard_Boolean ReadField (const Standard_Integer num, const Standard_Integer nump, const Standard_CString mess, Handle(Interface_Check)& ach, const Handle(StepData_PDescr)& descr, StepData_Field& fild) const;
+ Standard_EXPORT Standard_Boolean ReadField (const Standard_Integer num, const Standard_Integer nump, const Standard_CString mess, Handle(DE_Check)& ach, const Handle(StepData_PDescr)& descr, StepData_Field& fild) const;
//! reads a list of fields controlled by an ESDescr
- Standard_EXPORT Standard_Boolean ReadList (const Standard_Integer num, Handle(Interface_Check)& ach, const Handle(StepData_ESDescr)& descr, StepData_FieldList& list) const;
+ Standard_EXPORT Standard_Boolean ReadList (const Standard_Integer num, Handle(DE_Check)& ach, const Handle(StepData_ESDescr)& descr, StepData_FieldList& list) const;
//! Reads parameter <nump> of record <num> into a Transient Value
//! according to the type of the parameter :
//! SelectMember then to fill it. If <val> is Null or if the
//! result is not a SelectMember, val itself is returned a new ref
//! For a Select with a Name, <val> must then be a SelectNamed
- Standard_EXPORT Standard_Boolean ReadAny (const Standard_Integer num, const Standard_Integer nump, const Standard_CString mess, Handle(Interface_Check)& ach, const Handle(StepData_PDescr)& descr, Handle(Standard_Transient)& val) const;
+ Standard_EXPORT Standard_Boolean ReadAny (const Standard_Integer num, const Standard_Integer nump, const Standard_CString mess, Handle(DE_Check)& ach, const Handle(StepData_PDescr)& descr, Handle(Standard_Transient)& val) const;
//! reads parameter <nump> of record <num> as a sub-list of
//! two Reals X,Y. Returns True if OK. Else, returns false and
//! feeds Check with appropriate Fails (parameter not a sub-list,
//! not two Reals in the sub-list) composed with "mess" which
//! gives the name of the parameter
- Standard_EXPORT Standard_Boolean ReadXY (const Standard_Integer num, const Standard_Integer nump, const Standard_CString mess, Handle(Interface_Check)& ach, Standard_Real& X, Standard_Real& Y) const;
+ Standard_EXPORT Standard_Boolean ReadXY (const Standard_Integer num, const Standard_Integer nump, const Standard_CString mess, Handle(DE_Check)& ach, Standard_Real& X, Standard_Real& Y) const;
//! reads parameter <nump> of record <num> as a sub-list of
//! three Reals X,Y,Z. Return value and Check managed as by
//! ReadXY (demands a sub-list of three Reals)
- Standard_EXPORT Standard_Boolean ReadXYZ (const Standard_Integer num, const Standard_Integer nump, const Standard_CString mess, Handle(Interface_Check)& ach, Standard_Real& X, Standard_Real& Y, Standard_Real& Z) const;
+ Standard_EXPORT Standard_Boolean ReadXYZ (const Standard_Integer num, const Standard_Integer nump, const Standard_CString mess, Handle(DE_Check)& ach, Standard_Real& X, Standard_Real& Y, Standard_Real& Z) const;
//! reads parameter <nump> of record <num> as a single Real value.
//! Return value and Check managed as by ReadXY (demands a Real)
- Standard_EXPORT Standard_Boolean ReadReal (const Standard_Integer num, const Standard_Integer nump, const Standard_CString mess, Handle(Interface_Check)& ach, Standard_Real& val) const;
+ Standard_EXPORT Standard_Boolean ReadReal (const Standard_Integer num, const Standard_Integer nump, const Standard_CString mess, Handle(DE_Check)& ach, Standard_Real& val) const;
//! Reads parameter <nump> of record <num> as a single Entity.
//! Return value and Check managed as by ReadReal (demands a
//! Remark that returned status is False and <ent> is Null if
//! parameter is not an Entity, <ent> remains Not Null is parameter
//! is an Entity but is not Kind of required type
- Standard_EXPORT Standard_Boolean ReadEntity (const Standard_Integer num, const Standard_Integer nump, const Standard_CString mess, Handle(Interface_Check)& ach, const Handle(Standard_Type)& atype, Handle(Standard_Transient)& ent) const;
+ Standard_EXPORT Standard_Boolean ReadEntity (const Standard_Integer num, const Standard_Integer nump, const Standard_CString mess, Handle(DE_Check)& ach, const Handle(Standard_Type)& atype, Handle(Standard_Transient)& ent) const;
//! Safe variant for arbitrary type of argument
template <class T>
- Standard_Boolean ReadEntity (const Standard_Integer num, const Standard_Integer nump, const Standard_CString mess, Handle(Interface_Check)& ach, const Handle(Standard_Type)& atype, Handle(T)& ent) const
+ Standard_Boolean ReadEntity (const Standard_Integer num, const Standard_Integer nump, const Standard_CString mess, Handle(DE_Check)& ach, const Handle(Standard_Type)& atype, Handle(T)& ent) const
{
Handle(Standard_Transient) anEnt = ent;
return ReadEntity (num, nump, mess, ach, atype, anEnt) && ! (ent = Handle(T)::DownCast(anEnt)).IsNull();
//! Same as above, but a SelectType checks Type Matching, and
//! records the read Entity (see method Value from SelectType)
- Standard_EXPORT Standard_Boolean ReadEntity (const Standard_Integer num, const Standard_Integer nump, const Standard_CString mess, Handle(Interface_Check)& ach, StepData_SelectType& sel) const;
+ Standard_EXPORT Standard_Boolean ReadEntity (const Standard_Integer num, const Standard_Integer nump, const Standard_CString mess, Handle(DE_Check)& ach, StepData_SelectType& sel) const;
//! reads parameter <nump> of record <num> as a single Integer.
//! Return value & Check managed as by ReadXY (demands an Integer)
- Standard_EXPORT Standard_Boolean ReadInteger (const Standard_Integer num, const Standard_Integer nump, const Standard_CString mess, Handle(Interface_Check)& ach, Standard_Integer& val) const;
+ Standard_EXPORT Standard_Boolean ReadInteger (const Standard_Integer num, const Standard_Integer nump, const Standard_CString mess, Handle(DE_Check)& ach, Standard_Integer& val) const;
//! reads parameter <nump> of record <num> as a Boolean
//! Return value and Check managed as by ReadReal (demands a
//! Boolean enum, i.e. text ".T." for True or ".F." for False)
- Standard_EXPORT Standard_Boolean ReadBoolean (const Standard_Integer num, const Standard_Integer nump, const Standard_CString mess, Handle(Interface_Check)& ach, Standard_Boolean& flag) const;
+ Standard_EXPORT Standard_Boolean ReadBoolean (const Standard_Integer num, const Standard_Integer nump, const Standard_CString mess, Handle(DE_Check)& ach, Standard_Boolean& flag) const;
//! reads parameter <nump> of record <num> as a Logical
//! Return value and Check managed as by ReadBoolean (demands a
//! Logical enum, i.e. text ".T.", ".F.", or ".U.")
- Standard_EXPORT Standard_Boolean ReadLogical (const Standard_Integer num, const Standard_Integer nump, const Standard_CString mess, Handle(Interface_Check)& ach, StepData_Logical& flag) const;
+ Standard_EXPORT Standard_Boolean ReadLogical (const Standard_Integer num, const Standard_Integer nump, const Standard_CString mess, Handle(DE_Check)& ach, StepData_Logical& flag) const;
//! reads parameter <nump> of record <num> as a String (text
//! between quotes, quotes are removed by the Read operation)
//! Return value and Check managed as by ReadXY (demands a String)
- Standard_EXPORT Standard_Boolean ReadString (const Standard_Integer num, const Standard_Integer nump, const Standard_CString mess, Handle(Interface_Check)& ach, Handle(TCollection_HAsciiString)& val) const;
+ Standard_EXPORT Standard_Boolean ReadString (const Standard_Integer num, const Standard_Integer nump, const Standard_CString mess, Handle(DE_Check)& ach, Handle(TCollection_HAsciiString)& val) const;
- Standard_EXPORT Standard_Boolean ReadEnumParam (const Standard_Integer num, const Standard_Integer nump, const Standard_CString mess, Handle(Interface_Check)& ach, Standard_CString& text) const;
+ Standard_EXPORT Standard_Boolean ReadEnumParam (const Standard_Integer num, const Standard_Integer nump, const Standard_CString mess, Handle(DE_Check)& ach, Standard_CString& text) const;
//! Fills a check with a fail message if enumeration value does
//! match parameter definition
//! Just a help to centralize message definitions
- Standard_EXPORT void FailEnumValue (const Standard_Integer num, const Standard_Integer nump, const Standard_CString mess, Handle(Interface_Check)& ach) const;
+ Standard_EXPORT void FailEnumValue (const Standard_Integer num, const Standard_Integer nump, const Standard_CString mess, Handle(DE_Check)& ach) const;
//! Reads parameter <nump> of record <num> as an Enumeration (text
//! between dots) and converts it to an integer value, by an
//! EnumTool. Returns True if OK, false if : this parameter is not
//! enumeration, or is not recognized by the EnumTool (with fail)
- Standard_EXPORT Standard_Boolean ReadEnum (const Standard_Integer num, const Standard_Integer nump, const Standard_CString mess, Handle(Interface_Check)& ach, const StepData_EnumTool& enumtool, Standard_Integer& val) const;
+ Standard_EXPORT Standard_Boolean ReadEnum (const Standard_Integer num, const Standard_Integer nump, const Standard_CString mess, Handle(DE_Check)& ach, const StepData_EnumTool& enumtool, Standard_Integer& val) const;
//! Resolves a parameter which can be enclosed in a type def., as
//! TYPE(val). The parameter must then be read normally according
//! = num,nump if no type, else numrp=1
//! <typ> returns the recorded type, or empty string
//! Remark : a non-typed list is considered as "non-typed"
- Standard_EXPORT Standard_Boolean ReadTypedParam (const Standard_Integer num, const Standard_Integer nump, const Standard_Boolean mustbetyped, const Standard_CString mess, Handle(Interface_Check)& ach, Standard_Integer& numr, Standard_Integer& numrp, TCollection_AsciiString& typ) const;
+ Standard_EXPORT Standard_Boolean ReadTypedParam (const Standard_Integer num, const Standard_Integer nump, const Standard_Boolean mustbetyped, const Standard_CString mess, Handle(DE_Check)& ach, Standard_Integer& numr, Standard_Integer& numrp, TCollection_AsciiString& typ) const;
//! Checks if parameter <nump> of record <num> is given as Derived
//! If this Check is successful (i.e. Param = "*"), returns True
//! Else, fills <ach> with a Message which contains <mess> and
//! returns False. According to <errstat>, this message is Warning
//! if errstat is False (Default), Fail if errstat is True
- Standard_EXPORT Standard_Boolean CheckDerived (const Standard_Integer num, const Standard_Integer nump, const Standard_CString mess, Handle(Interface_Check)& ach, const Standard_Boolean errstat = Standard_False) const;
+ Standard_EXPORT Standard_Boolean CheckDerived (const Standard_Integer num, const Standard_Integer nump, const Standard_CString mess, Handle(DE_Check)& ach, const Standard_Boolean errstat = Standard_False) const;
//! Returns total count of Entities (including Header)
Standard_EXPORT virtual Standard_Integer NbEntities() const Standard_OVERRIDE;
//! Returns the Global Check. It can record Fail messages about
//! Undefined References (detected by SetEntityNumbers)
- Standard_EXPORT const Handle(Interface_Check) GlobalCheck() const;
+ Standard_EXPORT const Handle(DE_Check) GlobalCheck() const;
Standard_Integer thelastn;
Standard_Integer thenbhead;
Standard_Integer thenbscop;
- Handle(Interface_Check) thecheck;
+ Handle(DE_Check) thecheck;
Resource_FormatType mySourceCodePage;