Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:05:05

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