Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:03:57

0001 // Created on: 1993-05-10
0002 // Created by: Christian CAILLET
0003 // Copyright (c) 1993-1999 Matra Datavision
0004 // Copyright (c) 1999-2014 OPEN CASCADE SAS
0005 //
0006 // This file is part of Open CASCADE Technology software library.
0007 //
0008 // This library is free software; you can redistribute it and/or modify it under
0009 // the terms of the GNU Lesser General Public License version 2.1 as published
0010 // by the Free Software Foundation, with special exception defined in the file
0011 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0012 // distribution for complete text of the license and disclaimer of any warranty.
0013 //
0014 // Alternatively, this file may be used under the terms of Open CASCADE
0015 // commercial license or contractual agreement.
0016 
0017 #ifndef _IGESData_GeneralModule_HeaderFile
0018 #define _IGESData_GeneralModule_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_Type.hxx>
0022 
0023 #include <Interface_GeneralModule.hxx>
0024 #include <Standard_Integer.hxx>
0025 class Standard_Transient;
0026 class Interface_EntityIterator;
0027 class IGESData_IGESEntity;
0028 class Interface_ShareTool;
0029 class Interface_Check;
0030 class IGESData_DirChecker;
0031 class Interface_CopyTool;
0032 class TCollection_HAsciiString;
0033 
0034 
0035 class IGESData_GeneralModule;
0036 DEFINE_STANDARD_HANDLE(IGESData_GeneralModule, Interface_GeneralModule)
0037 
0038 //! Definition of General Services adapted to IGES.
0039 //! This Services comprise : Shared & Implied Lists, Copy, Check
0040 //! They are adapted according to the organisation of IGES
0041 //! Entities : Directory Part, Lists of Associativities and
0042 //! Properties are specifically processed
0043 class IGESData_GeneralModule : public Interface_GeneralModule
0044 {
0045 
0046 public:
0047 
0048   
0049   //! Fills the list of Entities shared by an IGESEntity <ent>,
0050   //! according a Case Number <CN> (formerly computed by CaseNum).
0051   //! Considers Properties and Directory Part, and calls
0052   //! OwnSharedCase (which is adapted to each Type of Entity)
0053   Standard_EXPORT void FillSharedCase (const Standard_Integer CN, const Handle(Standard_Transient)& ent, Interface_EntityIterator& iter) const Standard_OVERRIDE;
0054   
0055   //! Lists the Entities shared by a given IGESEntity <ent>, from
0056   //! its specific parameters : specific for each type
0057   Standard_EXPORT virtual void OwnSharedCase (const Standard_Integer CN, const Handle(IGESData_IGESEntity)& ent, Interface_EntityIterator& iter) const = 0;
0058   
0059   //! Lists the Implied References of <ent>. Here, these are the
0060   //! Associativities, plus the Entities defined by OwnSharedCase
0061   Standard_EXPORT virtual void ListImpliedCase (const Standard_Integer CN, const Handle(Standard_Transient)& ent, Interface_EntityIterator& iter) const Standard_OVERRIDE;
0062   
0063   //! Specific list of Entities implied by a given IGESEntity <ent>
0064   //! (in addition to Associativities). By default, there are none,
0065   //! but this method can be redefined as required
0066   Standard_EXPORT virtual void OwnImpliedCase (const Standard_Integer CN, const Handle(IGESData_IGESEntity)& ent, Interface_EntityIterator& iter) const;
0067   
0068   //! Semantic Checking of an IGESEntity. Performs general Checks,
0069   //! which use DirChecker, then call OwnCheck which does a check
0070   //! specific for each type of Entity
0071   Standard_EXPORT void CheckCase (const Standard_Integer CN, const Handle(Standard_Transient)& ent, const Interface_ShareTool& shares, Handle(Interface_Check)& ach) const Standard_OVERRIDE;
0072   
0073   //! Returns a DirChecker, specific for each type of Entity
0074   //! (identified by its Case Number) : this DirChecker defines
0075   //! constraints which must be respected by the DirectoryPart
0076   Standard_EXPORT virtual IGESData_DirChecker DirChecker (const Standard_Integer CN, const Handle(IGESData_IGESEntity)& ent) const = 0;
0077   
0078   //! Performs Specific Semantic Check for each type of Entity
0079   Standard_EXPORT virtual void OwnCheckCase (const Standard_Integer CN, const Handle(IGESData_IGESEntity)& ent, const Interface_ShareTool& shares, Handle(Interface_Check)& ach) const = 0;
0080   
0081   //! Specific answer to the question "is Copy properly implemented"
0082   //! For IGES, answer is always True
0083   Standard_EXPORT virtual Standard_Boolean CanCopy (const Standard_Integer CN, const Handle(Standard_Transient)& ent) const Standard_OVERRIDE;
0084   
0085   //! Specific creation of a new void entity
0086   Standard_EXPORT virtual Standard_Boolean NewVoid (const Standard_Integer CN, Handle(Standard_Transient)& entto) const Standard_OVERRIDE = 0;
0087   
0088   //! Copy ("Deep") from <entfrom> to <entto> (same type)
0089   //! by using a CopyTool which provides its working Map.
0090   //! For IGESEntities, Copies general data (Directory Part, List of
0091   //! Properties) and call OwnCopyCase
0092   Standard_EXPORT void CopyCase (const Standard_Integer CN, const Handle(Standard_Transient)& entfrom, const Handle(Standard_Transient)& entto, Interface_CopyTool& TC) const Standard_OVERRIDE;
0093   
0094   //! Copies parameters which are specific of each Type of Entity
0095   Standard_EXPORT virtual void OwnCopyCase (const Standard_Integer CN, const Handle(IGESData_IGESEntity)& entfrom, const Handle(IGESData_IGESEntity)& entto, Interface_CopyTool& TC) const = 0;
0096   
0097   //! Renewing of Implied References.
0098   //! For IGESEntities, Copies general data(List of Associativities)
0099   //! and calls OwnRenewCase
0100   Standard_EXPORT virtual void RenewImpliedCase (const Standard_Integer CN, const Handle(Standard_Transient)& entfrom, const Handle(Standard_Transient)& entto, const Interface_CopyTool& TC) const Standard_OVERRIDE;
0101   
0102   //! Renews parameters which are specific of each Type of Entity :
0103   //! the provided default does nothing, but this method may be
0104   //! redefined as required
0105   Standard_EXPORT virtual void OwnRenewCase (const Standard_Integer CN, const Handle(IGESData_IGESEntity)& entfrom, const Handle(IGESData_IGESEntity)& entto, const Interface_CopyTool& TC) const;
0106   
0107   //! Prepares an IGES Entity for delete : works on directory part
0108   //! then calls OwnDeleteCase
0109   //! While dispatch requires to copy the entities, <dispatched> is
0110   //! ignored, entities are cleared in any case
0111   Standard_EXPORT virtual void WhenDeleteCase (const Standard_Integer CN, const Handle(Standard_Transient)& ent, const Standard_Boolean dispatched) const Standard_OVERRIDE;
0112   
0113   //! Specific preparation for delete, acts on own parameters
0114   //! Default does nothing, to be redefined as required
0115   Standard_EXPORT virtual void OwnDeleteCase (const Standard_Integer CN, const Handle(IGESData_IGESEntity)& ent) const;
0116   
0117   //! Returns the name of an IGES Entity (its NameValue)
0118   //! Can be redefined for an even more specific case ...
0119   Standard_EXPORT virtual Handle(TCollection_HAsciiString) Name (const Standard_Integer CN, const Handle(Standard_Transient)& ent, const Interface_ShareTool& shares) const Standard_OVERRIDE;
0120 
0121 
0122 
0123 
0124   DEFINE_STANDARD_RTTIEXT(IGESData_GeneralModule,Interface_GeneralModule)
0125 
0126 protected:
0127 
0128 
0129 
0130 
0131 private:
0132 
0133 
0134 
0135 
0136 };
0137 
0138 
0139 
0140 
0141 
0142 
0143 
0144 #endif // _IGESData_GeneralModule_HeaderFile