Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-27 09:19:08

0001 // Created on: 1999-11-18
0002 // Created by: Andrey BETENEV
0003 // Copyright (c) 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 _STEPConstruct_AP203Context_HeaderFile
0018 #define _STEPConstruct_AP203Context_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_DefineAlloc.hxx>
0022 #include <Standard_Handle.hxx>
0023 
0024 class StepBasic_Approval;
0025 class StepBasic_DateAndTime;
0026 class StepBasic_PersonAndOrganization;
0027 class StepBasic_SecurityClassificationLevel;
0028 class StepBasic_PersonAndOrganizationRole;
0029 class StepBasic_DateTimeRole;
0030 class StepBasic_ApprovalRole;
0031 class StepAP203_CcDesignPersonAndOrganizationAssignment;
0032 class StepAP203_CcDesignSecurityClassification;
0033 class StepAP203_CcDesignDateAndTimeAssignment;
0034 class StepAP203_CcDesignApproval;
0035 class StepBasic_ApprovalPersonOrganization;
0036 class StepBasic_ApprovalDateTime;
0037 class StepBasic_ProductCategoryRelationship;
0038 class StepShape_ShapeDefinitionRepresentation;
0039 class STEPConstruct_Part;
0040 class StepRepr_NextAssemblyUsageOccurrence;
0041 
0042 //! Maintains context specific for AP203 (required data and
0043 //! management information such as persons, dates, approvals etc.)
0044 //! It contains static entities (which can be shared), default
0045 //! values for person and organisation, and also provides
0046 //! tool for creating management entities around specific part (SDR).
0047 class STEPConstruct_AP203Context
0048 {
0049 public:
0050   DEFINE_STANDARD_ALLOC
0051 
0052   //! Creates tool and fills constant fields
0053   Standard_EXPORT STEPConstruct_AP203Context();
0054 
0055   //! Returns default approval entity which
0056   //! is used when no other data are available
0057   Standard_EXPORT occ::handle<StepBasic_Approval> DefaultApproval();
0058 
0059   //! Sets default approval
0060   Standard_EXPORT void SetDefaultApproval(const occ::handle<StepBasic_Approval>& app);
0061 
0062   //! Returns default date_and_time entity which
0063   //! is used when no other data are available
0064   Standard_EXPORT occ::handle<StepBasic_DateAndTime> DefaultDateAndTime();
0065 
0066   //! Sets default date_and_time entity
0067   Standard_EXPORT void SetDefaultDateAndTime(const occ::handle<StepBasic_DateAndTime>& dt);
0068 
0069   //! Returns default person_and_organization entity which
0070   //! is used when no other data are available
0071   Standard_EXPORT occ::handle<StepBasic_PersonAndOrganization> DefaultPersonAndOrganization();
0072 
0073   //! Sets default person_and_organization entity
0074   Standard_EXPORT void SetDefaultPersonAndOrganization(
0075     const occ::handle<StepBasic_PersonAndOrganization>& po);
0076 
0077   //! Returns default security_classification_level entity which
0078   //! is used when no other data are available
0079   Standard_EXPORT occ::handle<StepBasic_SecurityClassificationLevel>
0080                   DefaultSecurityClassificationLevel();
0081 
0082   //! Sets default security_classification_level
0083   Standard_EXPORT void SetDefaultSecurityClassificationLevel(
0084     const occ::handle<StepBasic_SecurityClassificationLevel>& sc);
0085 
0086   Standard_EXPORT occ::handle<StepBasic_PersonAndOrganizationRole> RoleCreator() const;
0087 
0088   Standard_EXPORT occ::handle<StepBasic_PersonAndOrganizationRole> RoleDesignOwner() const;
0089 
0090   Standard_EXPORT occ::handle<StepBasic_PersonAndOrganizationRole> RoleDesignSupplier() const;
0091 
0092   Standard_EXPORT occ::handle<StepBasic_PersonAndOrganizationRole> RoleClassificationOfficer()
0093     const;
0094 
0095   Standard_EXPORT occ::handle<StepBasic_DateTimeRole> RoleCreationDate() const;
0096 
0097   Standard_EXPORT occ::handle<StepBasic_DateTimeRole> RoleClassificationDate() const;
0098 
0099   //! Return predefined PersonAndOrganizationRole and DateTimeRole
0100   //! entities named 'creator', 'design owner', 'design supplier',
0101   //! 'classification officer', 'creation date', 'classification date',
0102   //! 'approver'
0103   Standard_EXPORT occ::handle<StepBasic_ApprovalRole> RoleApprover() const;
0104 
0105   //! Takes SDR (part) which brings all standard data around part
0106   //! (common for AP203 and AP214) and creates all the additional
0107   //! entities required for AP203
0108   Standard_EXPORT void Init(const occ::handle<StepShape_ShapeDefinitionRepresentation>& sdr);
0109 
0110   //! Takes tool which describes standard data around part
0111   //! (common for AP203 and AP214) and creates all the additional
0112   //! entities required for AP203
0113   //!
0114   //! The created entities can be obtained by calls to methods
0115   //! GetCreator(), GetDesignOwner(), GetDesignSupplier(),
0116   //! GetClassificationOfficer(), GetSecurity(), GetCreationDate(),
0117   //! GetClassificationDate(), GetApproval(),
0118   //! GetApprover(), GetApprovalDateTime(),
0119   //! GetProductCategoryRelationship()
0120   Standard_EXPORT void Init(const STEPConstruct_Part& SDRTool);
0121 
0122   //! Takes NAUO which describes assembly link to component
0123   //! and creates the security_classification entity associated to
0124   //! it as required by the AP203
0125   //!
0126   //! Instantiated (or existing previously) entities concerned
0127   //! can be obtained by calls to methods
0128   //! GetClassificationOfficer(), GetSecurity(),
0129   //! GetClassificationDate(), GetApproval(),
0130   //! GetApprover(), GetApprovalDateTime()
0131   //! Takes tool which describes standard data around part
0132   //! (common for AP203 and AP214) and takes from model (or creates
0133   //! if missing) all the additional entities required by AP203
0134   Standard_EXPORT void Init(const occ::handle<StepRepr_NextAssemblyUsageOccurrence>& nauo);
0135 
0136   Standard_EXPORT occ::handle<StepAP203_CcDesignPersonAndOrganizationAssignment> GetCreator() const;
0137 
0138   Standard_EXPORT occ::handle<StepAP203_CcDesignPersonAndOrganizationAssignment> GetDesignOwner()
0139     const;
0140 
0141   Standard_EXPORT occ::handle<StepAP203_CcDesignPersonAndOrganizationAssignment> GetDesignSupplier()
0142     const;
0143 
0144   Standard_EXPORT occ::handle<StepAP203_CcDesignPersonAndOrganizationAssignment>
0145                   GetClassificationOfficer() const;
0146 
0147   Standard_EXPORT occ::handle<StepAP203_CcDesignSecurityClassification> GetSecurity() const;
0148 
0149   Standard_EXPORT occ::handle<StepAP203_CcDesignDateAndTimeAssignment> GetCreationDate() const;
0150 
0151   Standard_EXPORT occ::handle<StepAP203_CcDesignDateAndTimeAssignment> GetClassificationDate()
0152     const;
0153 
0154   Standard_EXPORT occ::handle<StepAP203_CcDesignApproval> GetApproval() const;
0155 
0156   Standard_EXPORT occ::handle<StepBasic_ApprovalPersonOrganization> GetApprover() const;
0157 
0158   Standard_EXPORT occ::handle<StepBasic_ApprovalDateTime> GetApprovalDateTime() const;
0159 
0160   //! Return entities (roots) instantiated for the part by method Init
0161   Standard_EXPORT occ::handle<StepBasic_ProductCategoryRelationship>
0162                   GetProductCategoryRelationship() const;
0163 
0164   //! Clears all fields describing entities specific to each part
0165   Standard_EXPORT void Clear();
0166 
0167   //! Initializes constant fields (shared entities)
0168   Standard_EXPORT void InitRoles();
0169 
0170   //! Initializes all missing data which are required for assembly
0171   Standard_EXPORT void InitAssembly(const occ::handle<StepRepr_NextAssemblyUsageOccurrence>& nauo);
0172 
0173   //! Initializes ClassificationOfficer and ClassificationDate
0174   //! entities according to Security entity
0175   Standard_EXPORT void InitSecurityRequisites();
0176 
0177   //! Initializes Approver and ApprovalDateTime
0178   //! entities according to Approval entity
0179   Standard_EXPORT void InitApprovalRequisites();
0180 
0181 private:
0182   //! Initializes all missing data which are required for part
0183   Standard_EXPORT void InitPart(const STEPConstruct_Part& SDRTool);
0184 
0185   occ::handle<StepBasic_Approval>                                defApproval;
0186   occ::handle<StepBasic_DateAndTime>                             defDateAndTime;
0187   occ::handle<StepBasic_PersonAndOrganization>                   defPersonAndOrganization;
0188   occ::handle<StepBasic_SecurityClassificationLevel>             defSecurityClassificationLevel;
0189   occ::handle<StepBasic_PersonAndOrganizationRole>               roleCreator;
0190   occ::handle<StepBasic_PersonAndOrganizationRole>               roleDesignOwner;
0191   occ::handle<StepBasic_PersonAndOrganizationRole>               roleDesignSupplier;
0192   occ::handle<StepBasic_PersonAndOrganizationRole>               roleClassificationOfficer;
0193   occ::handle<StepBasic_DateTimeRole>                            roleCreationDate;
0194   occ::handle<StepBasic_DateTimeRole>                            roleClassificationDate;
0195   occ::handle<StepBasic_ApprovalRole>                            roleApprover;
0196   occ::handle<StepAP203_CcDesignPersonAndOrganizationAssignment> myCreator;
0197   occ::handle<StepAP203_CcDesignPersonAndOrganizationAssignment> myDesignOwner;
0198   occ::handle<StepAP203_CcDesignPersonAndOrganizationAssignment> myDesignSupplier;
0199   occ::handle<StepAP203_CcDesignPersonAndOrganizationAssignment> myClassificationOfficer;
0200   occ::handle<StepAP203_CcDesignSecurityClassification>          mySecurity;
0201   occ::handle<StepAP203_CcDesignDateAndTimeAssignment>           myCreationDate;
0202   occ::handle<StepAP203_CcDesignDateAndTimeAssignment>           myClassificationDate;
0203   occ::handle<StepAP203_CcDesignApproval>                        myApproval;
0204   occ::handle<StepBasic_ApprovalPersonOrganization>              myApprover;
0205   occ::handle<StepBasic_ApprovalDateTime>                        myApprovalDateTime;
0206   occ::handle<StepBasic_ProductCategoryRelationship>             myProductCategoryRelationship;
0207 };
0208 
0209 #endif // _STEPConstruct_AP203Context_HeaderFile