Back to home page

EIC code displayed by LXR

 
 

    


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

0001 // Created on: 1995-11-13
0002 // Created by: Jean-Louis Frenkel
0003 // Copyright (c) 1995-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 _CDF_Store_HeaderFile
0018 #define _CDF_Store_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_DefineAlloc.hxx>
0022 #include <Standard_Handle.hxx>
0023 
0024 #include <TCollection_ExtendedString.hxx>
0025 #include <PCDM_StoreStatus.hxx>
0026 #include <CDF_StoreSetNameStatus.hxx>
0027 #include <TCollection_HExtendedString.hxx>
0028 
0029 #include <Message_ProgressRange.hxx>
0030 
0031 class CDF_StoreList;
0032 class CDM_Document;
0033 
0034 
0035 
0036 class CDF_Store 
0037 {
0038 public:
0039 
0040   DEFINE_STANDARD_ALLOC
0041 
0042   
0043   //! creates a store list  from the document of the current selection.
0044   Standard_EXPORT CDF_Store(const Handle(CDM_Document)& aDocument);
0045   
0046   //! returns the folder in which the current document will be stored.
0047   Standard_EXPORT Handle(TCollection_HExtendedString) Folder() const;
0048   
0049   //! returns the name under which the current document will be stored
0050   Standard_EXPORT Handle(TCollection_HExtendedString) Name() const;
0051   
0052   //! returns true if the current document is already stored
0053   Standard_EXPORT Standard_Boolean IsStored() const;
0054   
0055   Standard_EXPORT Standard_Boolean IsModified() const;
0056   
0057   Standard_EXPORT Standard_Boolean CurrentIsConsistent() const;
0058   
0059   Standard_EXPORT Standard_Boolean IsConsistent() const;
0060   
0061   Standard_EXPORT Standard_Boolean HasAPreviousVersion() const;
0062   
0063   Standard_EXPORT Handle(TCollection_HExtendedString) PreviousVersion() const;
0064   
0065   //! returns true if the currentdocument is the main one, ie the document
0066   //! of the current selection.
0067   Standard_EXPORT Standard_Boolean IsMainDocument() const;
0068   
0069   //! defines the   folder in which  the document  should be
0070   //! stored.  returns  Standard_True if  the Folder exists,
0071   //! Standard_False otherwise.
0072   Standard_EXPORT Standard_Boolean SetFolder (const TCollection_ExtendedString& aFolder);
0073   
0074   //! defines the name under which the document should be stored.
0075   Standard_EXPORT CDF_StoreSetNameStatus SetName (const Standard_ExtString aName);
0076   
0077   Standard_EXPORT void SetComment (const Standard_ExtString aComment);
0078   
0079   Standard_EXPORT Handle(TCollection_HExtendedString) Comment() const;
0080   
0081   //! defines the name under which the document should be stored.
0082   //! uses for example after modification of the folder.
0083   Standard_EXPORT CDF_StoreSetNameStatus RecheckName();
0084   
0085   Standard_EXPORT Standard_Boolean SetPreviousVersion (const Standard_ExtString aPreviousVersion);
0086   
0087   Standard_EXPORT void Realize (const Message_ProgressRange& theRange = Message_ProgressRange());
0088   
0089   //! returns the complete path of the created meta-data.
0090   Standard_EXPORT Standard_ExtString Path() const;
0091   
0092   //! returns the path of  the previous store is the object
0093   //! is already stored, otherwise an empty string;
0094   Standard_EXPORT Handle(TCollection_HExtendedString) MetaDataPath() const;
0095   
0096   //! returns the description of the format of the main object.
0097   Standard_EXPORT Handle(TCollection_HExtendedString) Description() const;
0098   
0099   Standard_EXPORT void SetCurrent (const Standard_ExtString aPresentation);
0100   
0101   //! the two following methods can
0102   //! be used just after Realize  or Import --  method to know if
0103   //! thes methods worked correctly, and if not why.
0104   Standard_EXPORT void SetMain();
0105   
0106   Standard_EXPORT PCDM_StoreStatus StoreStatus() const;
0107   
0108   Standard_EXPORT Standard_ExtString AssociatedStatusText() const;
0109   
0110   //! defines the name under which the document should be stored.
0111   Standard_EXPORT CDF_StoreSetNameStatus SetName (const TCollection_ExtendedString& aName);
0112   
0113   //! defines the   folder in which  the document  should be
0114   //! stored.  returns  Standard_True if  the Folder exists,
0115   //! Standard_False otherwise.
0116   Standard_EXPORT Standard_Boolean SetFolder (const Standard_ExtString aFolder);
0117 
0118 
0119 
0120 
0121 protected:
0122 
0123 
0124 
0125 
0126 
0127 private:
0128 
0129   
0130   Standard_EXPORT CDF_Store();
0131   
0132   Standard_EXPORT void FindDefault();
0133   
0134   Standard_EXPORT void Init();
0135 
0136 
0137   Handle(CDF_StoreList) myList;
0138   Handle(CDM_Document) myMainDocument;
0139   Handle(CDM_Document) myCurrentDocument;
0140   Standard_Boolean myHasSubComponents;
0141   Standard_Boolean myIsMainDocument;
0142   TCollection_ExtendedString myPath;
0143   TCollection_ExtendedString myText;
0144   PCDM_StoreStatus myStatus;
0145 
0146 
0147 };
0148 
0149 
0150 
0151 
0152 
0153 
0154 
0155 #endif // _CDF_Store_HeaderFile