2 #pragma warning(disable : 4251) 26 class CoreApplicationP;
32 class AutoTransaction;
50 return ((this->Why == m.
Why) && (this->Doc == m.
Doc) && (this->CreateGui == m.
CreateGui) &&
56 bool SetAsActiveDocument =
true;
66 virtual void init() = 0;
67 virtual void release() = 0;
76 virtual void init() = 0;
77 virtual void release() = 0;
86 LX_CORE_EXTERN
template class LX_CORE_EXPORT std::set<CA_TransactionObserver*>;
87 LX_CORE_EXTERN
template class LX_CORE_EXPORT std::set<CA_CommandObserver*>;
88 LX_CORE_EXTERN
template class LX_CORE_EXPORT std::set<CoreDocument*>;
89 LX_CORE_EXTERN
template class LX_CORE_EXPORT std::map<Base::String, Core::CoreDocument*>;
111 static void destroy();
126 bool createGui =
true,
127 bool setAsActiveDocument =
true,
128 bool createDefaultObjects =
true);
134 bool createGui =
true,
135 bool savepath =
true,
136 bool setAsActiveDocument =
true);
146 std::vector<Core::CoreDocument*> getDocuments()
const;
148 void closeApplication();
155 void setModulePreferenceValue(
const std::string& moduleName,
const std::string& key,
const std::string& value);
157 std::string getModulePreferenceValue(
const std::string& moduleName,
const std::string& key);
165 #ifndef LXAPI // INTERFACES BELOW ARE -NOT- PART OF THE LEXOCAD API 207 bool closeDocument(
Core::CoreDocument* doc,
bool forceClose ,
bool dontNotify =
false);
215 bool onClose(
bool forceClose,
bool dontNotify,
bool& hardClose);
216 bool closeApplication(
bool forceClose,
bool dontNotify,
bool& hardClose);
218 int getOpenDocuments(std::vector<Core::CoreDocument*>& vec);
221 void initPython()
const;
224 void finalizePython()
const;
231 bool isClosing()
const;
233 void sethasGui(
bool on);
235 static unsigned int getVersionYear();
236 static std::string getBuildDateTime();
238 static int getDocumentVersionAsInteger();
240 static long getRefCount();
272 int setActiveTransaction(
const char*
name,
bool persist =
false);
274 const char* getActiveTransaction(
int* tid =
nullptr)
const;
284 void closeActiveTransaction(
bool abort =
false,
int id = 0);
299 static void cleanOldTempDirectories();
304 std::unique_ptr<CoreApplicationP> _pimpl =
nullptr;
307 std::set<CA_CommandObserver*> _commandObserverRegistry;
308 std::set<CA_TransactionObserver*> _transactionObserverRegistry;
315 std::string _activeTransactionName =
"";
316 int _activeTransactionID = 0;
317 int _activeTransactionGuard = 0;
318 bool _activeTransactionTmpName =
false;
Definition: CoreApplication.h:70
std::vector< CA_TransactionObserver * > CA_TransactionObserver_Vector
Definition: CA_CommandObserver.h:105
Definition: CoreApplication.h:94
virtual const char * subject_name(void)
Definition: CoreApplication.h:251
Definition: CA_CommandObserver.h:58
virtual ~LoadedDll(void)
Definition: CoreApplication.h:64
Definition: CoreApplication.h:44
Definition: CoreApplication.h:60
bool operator==(const AppChanges &m) const
Definition: CoreApplication.h:48
Core::PropertyText name
Definition: CoreDocument.h:167
Definition: CA_CommandObserver.h:70
A Utf-16 (windows) or ucs4 (unix) encoded string class.
Definition: String.h:23
LoadedDll(void)
Definition: CoreApplication.h:63
Definition: CoreApplication.h:38
bool CreateGui
Definition: CoreApplication.h:55
PartAcis(void)
Definition: CoreApplication.h:73
Definition: CoreDocument.h:210
std::map< Base::String, Core::CoreDocument * > _documentMap
Map of all documents.
Definition: CoreApplication.h:296
Definition: CoreApplication.h:43
enum Core::AppChanges::why Why
virtual bool maybeSave()
Can be overwritten to check if the undo stack is clean etc.
Definition: CoreDocument.h:612
why
Definition: CoreApplication.h:41
Base::String getTmpDirectory()
Returns the temporary directory.
Core::CoreDocument * Doc
Definition: CoreApplication.h:54
int getDocumentVersion() const
Returns the version of the document.
basic_observer< entity > observer
Alias declaration for the most common use case.
Definition: entt.hpp:3793
std::vector< CA_CommandObserver * > ca_CommandObserver_Vector
Definition: CoreApplication.h:13
why
Definition: CA_CommandObserver.h:24
virtual ~PartAcis(void)
Definition: CoreApplication.h:74
SetActiveDocument
Definition: Globals.h:41
bool SetAsActiveDocument
Definition: CoreApplication.h:56
Definition: Property.h:77
Definition: AbstractXMLReader.h:5
std::vector< CA_CommandObserver * > ca_CommandObserver_Vector
Definition: CA_CommandObserver.h:104
friend class AutoTransaction
Definition: CoreApplication.h:313
void setCommandFactory(Core::CommandFactory *commandFactory)
Definition: CoreApplication.h:248
friend class CoreApplication
Definition: CoreDocument.h:138
Core::CommandFactory * getCommandFactory() const
Definition: CoreApplication.h:249
Definition: DocObject.h:51
std::vector< CA_TransactionObserver * > CA_TransactionObserver_Vector
Definition: CoreApplication.h:16