|
|
|||
File indexing completed on 2026-09-09 09:17:14
0001 // Created on: 2008-01-21 0002 // Created by: Vladislav ROMASHKO 0003 // Copyright (c) 2008-2014 OPEN CASCADE SAS 0004 // 0005 // This file is part of Open CASCADE Technology software library. 0006 // 0007 // This library is free software; you can redistribute it and/or modify it under 0008 // the terms of the GNU Lesser General Public License version 2.1 as published 0009 // by the Free Software Foundation, with special exception defined in the file 0010 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT 0011 // distribution for complete text of the license and disclaimer of any warranty. 0012 // 0013 // Alternatively, this file may be used under the terms of Open CASCADE 0014 // commercial license or contractual agreement. 0015 0016 #ifndef _TFunction_IFunction_HeaderFile 0017 #define _TFunction_IFunction_HeaderFile 0018 0019 #include <Standard.hxx> 0020 #include <Standard_DefineAlloc.hxx> 0021 #include <Standard_Handle.hxx> 0022 0023 #include <TDF_Label.hxx> 0024 #include <TDF_LabelList.hxx> 0025 #include <TFunction_ExecutionStatus.hxx> 0026 #include <TFunction_DoubleMapOfIntegerLabel.hxx> 0027 #include <Standard_Integer.hxx> 0028 class Standard_GUID; 0029 class TFunction_Logbook; 0030 class TFunction_Driver; 0031 class TFunction_GraphNode; 0032 0033 //! Interface class for usage of Function Mechanism 0034 class TFunction_IFunction 0035 { 0036 public: 0037 DEFINE_STANDARD_ALLOC 0038 0039 //! Sets a new function attached to a label <L> with <ID>. 0040 //! It creates a new TFunction_Function attribute initialized by the <ID>, 0041 //! a new TFunction_GraphNode with an empty list of dependencies and 0042 //! the status equal to TFunction_ES_WrongDefinition. 0043 //! It registers the function in the scope of functions for this document. 0044 Standard_EXPORT static Standard_Boolean NewFunction(const TDF_Label& L, const Standard_GUID& ID); 0045 0046 //! Deletes a function attached to a label <L>. 0047 //! It deletes a TFunction_Function attribute and a TFunction_GraphNode. 0048 //! It deletes the functions from the scope of function of this document. 0049 Standard_EXPORT static Standard_Boolean DeleteFunction(const TDF_Label& L); 0050 0051 //! Updates dependencies for all functions of the scope. 0052 //! It returns false in case of an error. 0053 //! An empty constructor. 0054 Standard_EXPORT static Standard_Boolean UpdateDependencies(const TDF_Label& Access); 0055 0056 Standard_EXPORT TFunction_IFunction(); 0057 0058 //! A constructor. 0059 //! Initializes the interface by the label of function. 0060 Standard_EXPORT TFunction_IFunction(const TDF_Label& L); 0061 0062 //! Initializes the interface by the label of function. 0063 Standard_EXPORT void Init(const TDF_Label& L); 0064 0065 //! Returns a label of the function. 0066 Standard_EXPORT const TDF_Label& Label() const; 0067 0068 //! Updates the dependencies of this function only. 0069 Standard_EXPORT Standard_Boolean UpdateDependencies() const; 0070 0071 //! The method fills-in the list by labels, 0072 //! where the arguments of the function are located. 0073 Standard_EXPORT void Arguments(TDF_LabelList& args) const; 0074 0075 //! The method fills-in the list by labels, 0076 //! where the results of the function are located. 0077 Standard_EXPORT void Results(TDF_LabelList& res) const; 0078 0079 //! Returns a list of previous functions. 0080 Standard_EXPORT void GetPrevious(TDF_LabelList& prev) const; 0081 0082 //! Returns a list of next functions. 0083 Standard_EXPORT void GetNext(TDF_LabelList& prev) const; 0084 0085 //! Returns the execution status of the function. 0086 Standard_EXPORT TFunction_ExecutionStatus GetStatus() const; 0087 0088 //! Defines an execution status for a function. 0089 Standard_EXPORT void SetStatus(const TFunction_ExecutionStatus status) const; 0090 0091 //! Returns the scope of all functions. 0092 Standard_EXPORT const TFunction_DoubleMapOfIntegerLabel& GetAllFunctions() const; 0093 0094 //! Returns the Logbook - keeper of modifications. 0095 Standard_EXPORT Handle(TFunction_Logbook) GetLogbook() const; 0096 0097 //! Returns a driver of the function. 0098 Standard_EXPORT Handle(TFunction_Driver) GetDriver(const Standard_Integer thread = 0) const; 0099 0100 //! Returns a graph node of the function. 0101 Standard_EXPORT Handle(TFunction_GraphNode) GetGraphNode() const; 0102 0103 protected: 0104 private: 0105 TDF_Label myLabel; 0106 }; 0107 0108 #endif // _TFunction_IFunction_HeaderFile
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|