1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276
|
import OCP.AppStd
from typing import *
from typing import Iterable as iterable
from typing import Iterator as iterator
from numpy import float64
_Shape = Tuple[int, ...]
import OCP.PCDM
import OCP.Resource
import OCP.TDocStd
import OCP.Message
import OCP.TColStd
import OCP.CDM
import OCP.Standard
import io
import OCP.TCollection
import OCP.CDF
__all__ = [
"AppStd_Application"
]
class AppStd_Application(OCP.TDocStd.TDocStd_Application, OCP.CDF.CDF_Application, OCP.CDM.CDM_Application, OCP.Standard.Standard_Transient):
"""
Legacy class defining resources name for standard OCAF documentsLegacy class defining resources name for standard OCAF documentsLegacy class defining resources name for standard OCAF documents
"""
def BeginOfUpdate(self,aDocument : OCP.CDM.CDM_Document) -> None:
"""
this method is called before the update of a document. By default, writes in MessageDriver().
"""
def CanClose(self,aDocument : OCP.CDM.CDM_Document) -> OCP.CDM.CDM_CanCloseStatus:
"""
None
"""
@overload
def CanRetrieve(self,theFolder : OCP.TCollection.TCollection_ExtendedString,theName : OCP.TCollection.TCollection_ExtendedString,theAppendMode : bool) -> OCP.PCDM.PCDM_ReaderStatus:
"""
None
None
"""
@overload
def CanRetrieve(self,theFolder : OCP.TCollection.TCollection_ExtendedString,theName : OCP.TCollection.TCollection_ExtendedString,theVersion : OCP.TCollection.TCollection_ExtendedString,theAppendMode : bool) -> OCP.PCDM.PCDM_ReaderStatus: ...
def Close(self,aDoc : OCP.TDocStd.TDocStd_Document) -> None:
"""
Close the given document. the document is not any more handled by the applicative session.
"""
def DecrementRefCounter(self) -> int:
"""
Decrements the reference counter of this object; returns the decremented value
"""
def DefaultFolder(self) -> str:
"""
None
"""
def DefineFormat(self,theFormat : OCP.TCollection.TCollection_AsciiString,theDescription : OCP.TCollection.TCollection_AsciiString,theExtension : OCP.TCollection.TCollection_AsciiString,theReader : OCP.PCDM.PCDM_RetrievalDriver,theWriter : OCP.PCDM.PCDM_StorageDriver) -> None:
"""
Sets up resources and registers read and storage drivers for the specified format.
"""
def Delete(self) -> None:
"""
Memory deallocator for transient classes
"""
def DumpJson(self,theOStream : io.BytesIO,theDepth : int=-1) -> None:
"""
Dumps the content of me into the stream
"""
def DynamicType(self) -> OCP.Standard.Standard_Type:
"""
None
"""
def EndOfUpdate(self,aDocument : OCP.CDM.CDM_Document,theStatus : bool,ErrorString : OCP.TCollection.TCollection_ExtendedString) -> None:
"""
this method is called affter the update of a document. By default, writes in MessageDriver().
"""
def Format(self,aFileName : OCP.TCollection.TCollection_ExtendedString,theFormat : OCP.TCollection.TCollection_ExtendedString) -> bool:
"""
try to retrieve a Format directly in the file or in application resource by using extension. returns True if found;
"""
def GetDocument(self,index : int,aDoc : OCP.TDocStd.TDocStd_Document) -> Any:
"""
Constructs the new document aDoc. aDoc is identified by the index index which is any integer between 1 and n where n is the number of documents returned by NbDocument. Example Handle(TDocStd_Application) anApp; if (!CafTest::Find(A)) return 1; Handle(TDocStd) aDoc; Standard_Integer nbdoc = anApp->NbDocuments(); for (Standard_Integer i = 1; i <= nbdoc; i++) { aApp->GetDocument(i,aDoc);
"""
def GetRefCount(self) -> int:
"""
Get the reference counter of this object
"""
def GetRetrieveStatus(self) -> OCP.PCDM.PCDM_ReaderStatus:
"""
Checks status after Retrieve
"""
def IncrementRefCounter(self) -> None:
"""
Increments the reference counter of this object
"""
def InitDocument(self,aDoc : OCP.CDM.CDM_Document) -> None:
"""
Initialize the document aDoc for the applicative session. This virtual function is called by NewDocument and is to be redefined for each specific application. Modified flag (different of disk version) ============= to open/save a document =======================
"""
def IsDriverLoaded(self) -> bool:
"""
Check if meta data driver was successfully loaded by the application constructor
"""
def IsInSession(self,path : OCP.TCollection.TCollection_ExtendedString) -> int:
"""
Returns an index for the document found in the path path in this applicative session. If the returned value is 0, the document is not present in the applicative session. This method can be used for the interactive part of an application. For instance, on a call to Open, the document to be opened may already be in memory. IsInSession checks to see if this is the case. Open can be made to depend on the value of the index returned: if IsInSession returns 0, the document is opened; if it returns another value, a message is displayed asking the user if he wants to override the version of the document in memory. Example: Standard_Integer insession = A->IsInSession(aDoc); if (insession > 0) { std::cout << "document " << insession << " is already in session" << std::endl; return 0; }
"""
@overload
def IsInstance(self,theType : OCP.Standard.Standard_Type) -> bool:
"""
Returns a true value if this is an instance of Type.
Returns a true value if this is an instance of TypeName.
"""
@overload
def IsInstance(self,theTypeName : str) -> bool: ...
@overload
def IsKind(self,theTypeName : str) -> bool:
"""
Returns true if this is an instance of Type or an instance of any class that inherits from Type. Note that multiple inheritance is not supported by OCCT RTTI mechanism.
Returns true if this is an instance of TypeName or an instance of any class that inherits from TypeName. Note that multiple inheritance is not supported by OCCT RTTI mechanism.
"""
@overload
def IsKind(self,theType : OCP.Standard.Standard_Type) -> bool: ...
@staticmethod
def Load_s(aGUID : OCP.Standard.Standard_GUID) -> OCP.CDF.CDF_Application:
"""
plugs an application.
"""
def MessageDriver(self) -> OCP.Message.Message_Messenger:
"""
Returns default messenger;
"""
def MetaDataDriver(self) -> OCP.CDF.CDF_MetaDataDriver:
"""
returns MetaDatdDriver of this application
"""
def MetaDataLookUpTable(self) -> Any:
"""
Returns MetaData LookUpTable
"""
def Name(self) -> OCP.TCollection.TCollection_ExtendedString:
"""
Returns the application name.
"""
def NbDocuments(self) -> int:
"""
returns the number of documents handled by the current applicative session.
"""
@overload
def NewDocument(self,format : OCP.TCollection.TCollection_ExtendedString,aDoc : OCP.TDocStd.TDocStd_Document) -> Any:
"""
Constructs the empty new document aDoc. This document will have the format format. If InitDocument is redefined for a specific application, the new document is handled by the applicative session.
A non-virtual method taking a TDocStd_Documment object as an input. Internally it calls a virtual method NewDocument() with CDM_Document object.
"""
@overload
def NewDocument(self,format : OCP.TCollection.TCollection_ExtendedString,aDoc : OCP.CDM.CDM_Document) -> Any: ...
def OnAbortTransaction(self,theDoc : OCP.TDocStd.TDocStd_Document) -> None:
"""
Notification that is fired at each AbortTransaction event.
"""
def OnCommitTransaction(self,theDoc : OCP.TDocStd.TDocStd_Document) -> None:
"""
Notification that is fired at each CommitTransaction event.
"""
def OnOpenTransaction(self,theDoc : OCP.TDocStd.TDocStd_Document) -> None:
"""
Notification that is fired at each OpenTransaction event.
"""
@overload
def Open(self,theIStream : io.BytesIO,theDoc : OCP.TDocStd.TDocStd_Document,theRange : OCP.Message.Message_ProgressRange=OCP.Message.Message_ProgressRange) -> OCP.PCDM.PCDM_ReaderStatus:
"""
Retrieves the document from specified file. In order not to override a version of the document which is already in memory, this method can be made to depend on the value returned by IsInSession.
Retrieves the document from specified file. In order not to override a version of the document which is already in memory, this method can be made to depend on the value returned by IsInSession.
Retrieves document from standard stream.
Retrieves document from standard stream.
"""
@overload
def Open(self,theIStream : io.BytesIO,theDoc : OCP.TDocStd.TDocStd_Document,theFilter : OCP.PCDM.PCDM_ReaderFilter,theRange : OCP.Message.Message_ProgressRange=OCP.Message.Message_ProgressRange) -> OCP.PCDM.PCDM_ReaderStatus: ...
@overload
def Open(self,thePath : OCP.TCollection.TCollection_ExtendedString,theDoc : OCP.TDocStd.TDocStd_Document,theRange : OCP.Message.Message_ProgressRange=OCP.Message.Message_ProgressRange) -> OCP.PCDM.PCDM_ReaderStatus: ...
@overload
def Open(self,thePath : OCP.TCollection.TCollection_ExtendedString,theDoc : OCP.TDocStd.TDocStd_Document,theFilter : OCP.PCDM.PCDM_ReaderFilter,theRange : OCP.Message.Message_ProgressRange=OCP.Message.Message_ProgressRange) -> OCP.PCDM.PCDM_ReaderStatus: ...
def Read(self,theIStream : io.BytesIO,theDocument : OCP.CDM.CDM_Document,theFilter : OCP.PCDM.PCDM_ReaderFilter=None,theRange : OCP.Message.Message_ProgressRange=OCP.Message.Message_ProgressRange) -> Any:
"""
Reads theDocument from standard SEEKABLE stream theIStream, the stream should support SEEK functionality
"""
def ReaderFromFormat(self,aFormat : OCP.TCollection.TCollection_ExtendedString) -> OCP.PCDM.PCDM_Reader:
"""
Returns instance of read driver for specified format.
"""
def ReadingFormats(self,theFormats : OCP.TColStd.TColStd_SequenceOfAsciiString) -> None:
"""
Returns the sequence of reading formats supported by the application.
"""
def Resources(self) -> OCP.Resource.Resource_Manager:
"""
Returns resource manager defining supported persistent formats.
"""
def ResourcesName(self) -> str:
"""
returns the file name which contains application resources
"""
@overload
def Retrieve(self,aFolder : OCP.TCollection.TCollection_ExtendedString,aName : OCP.TCollection.TCollection_ExtendedString,aVersion : OCP.TCollection.TCollection_ExtendedString,UseStorageConfiguration : bool=True,theFilter : OCP.PCDM.PCDM_ReaderFilter=None,theRange : OCP.Message.Message_ProgressRange=OCP.Message.Message_ProgressRange) -> OCP.CDM.CDM_Document:
"""
This method retrieves a document from the database. If the Document references other documents which have been updated, the latest version of these documents will be used if {UseStorageConfiguration} is Standard_True. The content of {aFolder}, {aName} and {aVersion} depends on the Database Manager system. If the DBMS is only based on the OS, {aFolder} is a directory and {aName} is the name of a file. In this case the use of the syntax with {aVersion} has no sense. For example:
This method retrieves a document from the database. If the Document references other documents which have been updated, the latest version of these documents will be used if {UseStorageConfiguration} is Standard_True. -- If the DBMS is only based on the OS, this syntax should not be used.
"""
@overload
def Retrieve(self,aFolder : OCP.TCollection.TCollection_ExtendedString,aName : OCP.TCollection.TCollection_ExtendedString,UseStorageConfiguration : bool=True,theFilter : OCP.PCDM.PCDM_ReaderFilter=None,theRange : OCP.Message.Message_ProgressRange=OCP.Message.Message_ProgressRange) -> OCP.CDM.CDM_Document: ...
@overload
def Save(self,theDoc : OCP.TDocStd.TDocStd_Document,theStatusMessage : OCP.TCollection.TCollection_ExtendedString,theRange : OCP.Message.Message_ProgressRange=OCP.Message.Message_ProgressRange) -> OCP.PCDM.PCDM_StoreStatus:
"""
Save aDoc active document. Exceptions: Standard_NotImplemented if the document was not retrieved in the applicative session by using Open.
Save the document overwriting the previous file
"""
@overload
def Save(self,theDoc : OCP.TDocStd.TDocStd_Document,theRange : OCP.Message.Message_ProgressRange=OCP.Message.Message_ProgressRange) -> OCP.PCDM.PCDM_StoreStatus: ...
@overload
def SaveAs(self,theDoc : OCP.TDocStd.TDocStd_Document,theOStream : io.BytesIO,theStatusMessage : OCP.TCollection.TCollection_ExtendedString,theRange : OCP.Message.Message_ProgressRange=OCP.Message.Message_ProgressRange) -> OCP.PCDM.PCDM_StoreStatus:
"""
Save the active document in the file <name> in the path <path> ; o verwrites the file if it already exists.
Save theDoc to standard SEEKABLE stream theOStream. the stream should support SEEK functionality
Save the active document in the file <name> in the path <path> . overwrite the file if it already exist.
Save theDoc TO standard SEEKABLE stream theOStream. the stream should support SEEK functionality
"""
@overload
def SaveAs(self,theDoc : OCP.TDocStd.TDocStd_Document,theOStream : io.BytesIO,theRange : OCP.Message.Message_ProgressRange=OCP.Message.Message_ProgressRange) -> OCP.PCDM.PCDM_StoreStatus: ...
@overload
def SaveAs(self,theDoc : OCP.TDocStd.TDocStd_Document,path : OCP.TCollection.TCollection_ExtendedString,theStatusMessage : OCP.TCollection.TCollection_ExtendedString,theRange : OCP.Message.Message_ProgressRange=OCP.Message.Message_ProgressRange) -> OCP.PCDM.PCDM_StoreStatus: ...
@overload
def SaveAs(self,theDoc : OCP.TDocStd.TDocStd_Document,path : OCP.TCollection.TCollection_ExtendedString,theRange : OCP.Message.Message_ProgressRange=OCP.Message.Message_ProgressRange) -> OCP.PCDM.PCDM_StoreStatus: ...
def SetDefaultFolder(self,aFolder : str) -> bool:
"""
None
"""
def This(self) -> OCP.Standard.Standard_Transient:
"""
Returns non-const pointer to this object (like const_cast). For protection against creating handle to objects allocated in stack or call from constructor, it will raise exception Standard_ProgramError if reference counter is zero.
"""
def Version(self) -> OCP.TCollection.TCollection_AsciiString:
"""
Returns the application version.
"""
def Write(self,aString : str) -> None:
"""
writes the string in the application MessagerDriver.
"""
def WriterFromFormat(self,aFormat : OCP.TCollection.TCollection_ExtendedString) -> OCP.PCDM.PCDM_StorageDriver:
"""
Returns instance of storage driver for specified format.
"""
def WritingFormats(self,theFormats : OCP.TColStd.TColStd_SequenceOfAsciiString) -> None:
"""
Returns the sequence of writing formats supported by the application.
"""
def __init__(self) -> None: ...
@staticmethod
def get_type_descriptor_s() -> OCP.Standard.Standard_Type:
"""
None
"""
@staticmethod
def get_type_name_s() -> str:
"""
None
"""
pass
|