Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:02:56

0001 // Created on: 1993-08-12
0002 // Created by: Frederic MAUPAS
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 _APIHeaderSection_MakeHeader_HeaderFile
0018 #define _APIHeaderSection_MakeHeader_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_DefineAlloc.hxx>
0022 #include <Standard_Handle.hxx>
0023 
0024 #include <Standard_Boolean.hxx>
0025 #include <Standard_Integer.hxx>
0026 #include <Interface_HArray1OfHAsciiString.hxx>
0027 class HeaderSection_FileName;
0028 class HeaderSection_FileSchema;
0029 class HeaderSection_FileDescription;
0030 class StepData_StepModel;
0031 class Interface_Protocol;
0032 class TCollection_HAsciiString;
0033 
0034 
0035 //! This class allows to consult and prepare/edit  data stored in
0036 //! a Step Model  Header
0037 class APIHeaderSection_MakeHeader 
0038 {
0039 public:
0040 
0041   DEFINE_STANDARD_ALLOC
0042 
0043   
0044   //! Prepares a new MakeHeader from scratch
0045   Standard_EXPORT APIHeaderSection_MakeHeader(const Standard_Integer shapetype = 0);
0046   
0047   //! Prepares a MakeHeader from the content of a StepModel
0048   //! See IsDone to know if the Header is well defined
0049   Standard_EXPORT APIHeaderSection_MakeHeader(const Handle(StepData_StepModel)& model);
0050   
0051   //! Cancels the former definition and gives a FileName
0052   //! To be used when a Model has no well defined Header
0053   Standard_EXPORT void Init (const Standard_CString nameval);
0054   
0055   //! Returns True if all data have been defined (see also
0056   //! HasFn, HasFs, HasFd)
0057   Standard_EXPORT Standard_Boolean IsDone() const;
0058   
0059   //! Creates an empty header for a new
0060   //! STEP model and allows the header fields to be completed.
0061   Standard_EXPORT void Apply (const Handle(StepData_StepModel)& model) const;
0062   
0063   //! Builds a Header, creates a new StepModel, then applies the
0064   //! Header to the StepModel
0065   //! The Schema Name is taken from the Protocol (if it inherits
0066   //! from StepData, else it is left in blanks)
0067   Standard_EXPORT Handle(StepData_StepModel) NewModel (const Handle(Interface_Protocol)& protocol) const;
0068   
0069   //! Checks whether there is a
0070   //! file_name entity. Returns True if there is one.
0071   Standard_EXPORT Standard_Boolean HasFn() const;
0072   
0073   //! Returns the file_name entity.
0074   //! Returns an empty entity if the file_name entity is not initialized.
0075   Standard_EXPORT Handle(HeaderSection_FileName) FnValue() const;
0076   
0077   Standard_EXPORT void SetName (const Handle(TCollection_HAsciiString)& aName);
0078   
0079   //! Returns the name attribute for the file_name entity.
0080   Standard_EXPORT Handle(TCollection_HAsciiString) Name() const;
0081   
0082   Standard_EXPORT void SetTimeStamp (const Handle(TCollection_HAsciiString)& aTimeStamp);
0083   
0084   //! Returns the value of the time_stamp attribute for the file_name entity.
0085   Standard_EXPORT Handle(TCollection_HAsciiString) TimeStamp() const;
0086   
0087   Standard_EXPORT void SetAuthor (const Handle(Interface_HArray1OfHAsciiString)& aAuthor);
0088   
0089   Standard_EXPORT void SetAuthorValue (const Standard_Integer num, const Handle(TCollection_HAsciiString)& aAuthor);
0090   
0091   Standard_EXPORT Handle(Interface_HArray1OfHAsciiString) Author() const;
0092   
0093   //! Returns the value of the name attribute for the file_name entity.
0094   Standard_EXPORT Handle(TCollection_HAsciiString) AuthorValue (const Standard_Integer num) const;
0095   
0096   //! Returns the number of values for the author attribute in the file_name entity.
0097   Standard_EXPORT Standard_Integer NbAuthor() const;
0098   
0099   Standard_EXPORT void SetOrganization (const Handle(Interface_HArray1OfHAsciiString)& aOrganization);
0100   
0101   Standard_EXPORT void SetOrganizationValue (const Standard_Integer num, const Handle(TCollection_HAsciiString)& aOrganization);
0102   
0103   Standard_EXPORT Handle(Interface_HArray1OfHAsciiString) Organization() const;
0104   
0105   //! Returns the value of attribute
0106   //! organization for the file_name entity.
0107   Standard_EXPORT Handle(TCollection_HAsciiString) OrganizationValue (const Standard_Integer num) const;
0108   
0109   //! Returns the number of values for
0110   //! the organization attribute in the file_name entity.
0111   Standard_EXPORT Standard_Integer NbOrganization() const;
0112   
0113   Standard_EXPORT void SetPreprocessorVersion (const Handle(TCollection_HAsciiString)& aPreprocessorVersion);
0114   
0115   //! Returns the name of the preprocessor_version for the file_name entity.
0116   Standard_EXPORT Handle(TCollection_HAsciiString) PreprocessorVersion() const;
0117   
0118   Standard_EXPORT void SetOriginatingSystem (const Handle(TCollection_HAsciiString)& aOriginatingSystem);
0119   
0120   Standard_EXPORT Handle(TCollection_HAsciiString) OriginatingSystem() const;
0121   
0122   Standard_EXPORT void SetAuthorisation (const Handle(TCollection_HAsciiString)& aAuthorisation);
0123   
0124   //! Returns the value of the authorization attribute for the file_name entity.
0125   Standard_EXPORT Handle(TCollection_HAsciiString) Authorisation() const;
0126   
0127   //! Checks whether there is a file_schema entity. Returns True if there is one.
0128   Standard_EXPORT Standard_Boolean HasFs() const;
0129   
0130   //! Returns the file_schema entity. Returns an empty entity if the file_schema entity is not initialized.
0131   Standard_EXPORT Handle(HeaderSection_FileSchema) FsValue() const;
0132   
0133   Standard_EXPORT void SetSchemaIdentifiers (const Handle(Interface_HArray1OfHAsciiString)& aSchemaIdentifiers);
0134   
0135   Standard_EXPORT void SetSchemaIdentifiersValue (const Standard_Integer num, const Handle(TCollection_HAsciiString)& aSchemaIdentifier);
0136   
0137   Standard_EXPORT Handle(Interface_HArray1OfHAsciiString) SchemaIdentifiers() const;
0138   
0139   //! Returns the value of the schema_identifier attribute for the file_schema entity.
0140   Standard_EXPORT Handle(TCollection_HAsciiString) SchemaIdentifiersValue (const Standard_Integer num) const;
0141   
0142   //! Returns the number of values for the schema_identifier attribute in the file_schema entity.
0143   Standard_EXPORT Standard_Integer NbSchemaIdentifiers() const;
0144   
0145   //! Add a subname of schema (if not yet in the list)
0146   Standard_EXPORT void AddSchemaIdentifier (const Handle(TCollection_HAsciiString)& aSchemaIdentifier);
0147   
0148   //! Checks whether there is a file_description entity. Returns True if there is one.
0149   Standard_EXPORT Standard_Boolean HasFd() const;
0150   
0151   //! Returns the file_description
0152   //! entity. Returns an empty entity if the file_description entity is not initialized.
0153   Standard_EXPORT Handle(HeaderSection_FileDescription) FdValue() const;
0154   
0155   Standard_EXPORT void SetDescription (const Handle(Interface_HArray1OfHAsciiString)& aDescription);
0156   
0157   Standard_EXPORT void SetDescriptionValue (const Standard_Integer num, const Handle(TCollection_HAsciiString)& aDescription);
0158   
0159   Standard_EXPORT Handle(Interface_HArray1OfHAsciiString) Description() const;
0160   
0161   //! Returns the value of the
0162   //! description attribute for the file_description entity.
0163   Standard_EXPORT Handle(TCollection_HAsciiString) DescriptionValue (const Standard_Integer num) const;
0164   
0165   //! Returns the number of values for
0166   //! the file_description entity in the STEP file header.
0167   Standard_EXPORT Standard_Integer NbDescription() const;
0168   
0169   Standard_EXPORT void SetImplementationLevel (const Handle(TCollection_HAsciiString)& aImplementationLevel);
0170   
0171   //! Returns the value of the
0172   //! implementation_level attribute for the file_description entity.
0173   Standard_EXPORT Handle(TCollection_HAsciiString) ImplementationLevel() const;
0174 
0175 
0176 
0177 
0178 protected:
0179 
0180 
0181 
0182 
0183 
0184 private:
0185 
0186 
0187 
0188   Standard_Boolean done;
0189   Handle(HeaderSection_FileName) fn;
0190   Handle(HeaderSection_FileSchema) fs;
0191   Handle(HeaderSection_FileDescription) fd;
0192 
0193 
0194 };
0195 
0196 
0197 
0198 
0199 
0200 
0201 
0202 #endif // _APIHeaderSection_MakeHeader_HeaderFile