LibreCAD
|
#include <documentimpl.h>
Public Member Functions | |
DocumentImpl (StorageManager_SPtr storageManager) | |
virtual | ~DocumentImpl () |
void | insertEntity (entity::CADEntity_CSPtr cadEntity) override |
add an entity to document. More... | |
void | removeEntity (entity::CADEntity_CSPtr entity) override |
removes an entity from the document. More... | |
void | addDocumentMetaType (DocumentMetaType_CSPtr dmt) override |
add a new layer to the document More... | |
void | removeDocumentMetaType (DocumentMetaType_CSPtr dmt) override |
remove a layer from the document More... | |
void | replaceDocumentMetaType (DocumentMetaType_CSPtr oldDmt, DocumentMetaType_CSPtr newDmt) override |
remove a layer from the document More... | |
std::map< std::string, DocumentMetaType_CSPtr, lc::StringHelper::cmpCaseInsensetive > | allMetaTypes () override |
EntityContainer < entity::CADEntity_CSPtr > | entitiesByLayer (Layer_CSPtr layer) override |
entitiesByLayer More... | |
EntityContainer < entity::CADEntity_CSPtr > | entitiesByBlock (Block_CSPtr block) override |
Search entities in a given block. More... | |
EntityContainer < entity::CADEntity_CSPtr > & | entityContainer () override |
entityContainer Return a copy of all entities within the document More... | |
std::map< std::string, Layer_CSPtr > | allLayers () const override |
Returns all layers. More... | |
Layer_CSPtr | layerByName (const std::string &layerName) const override |
return a layer by it's name More... | |
DxfLinePatternByValue_CSPtr | linePatternByName (const std::string &linePatternName) const override |
return a line pattern by it's name More... | |
std::vector < DxfLinePatternByValue_CSPtr > | linePatterns () const override |
return all line patterns More... | |
std::unordered_set < entity::Insert_CSPtr > | waitingCustomEntities (const std::string &pluginName) override |
std::vector< Block_CSPtr > | blocks () const override |
![]() | |
Document () | |
virtual | ~Document () |
virtual Nano::Signal< void(const lc::BeginProcessEvent &)> & | beginProcessEvent () |
begins a Process Event More... | |
virtual Nano::Signal< void(const lc::CommitProcessEvent &)> & | commitProcessEvent () |
commits a Process Event More... | |
virtual Nano::Signal< void(const lc::AddEntityEvent &)> & | addEntityEvent () |
Event to add an Entity. More... | |
virtual Nano::Signal< void(const lc::ReplaceEntityEvent &)> & | replaceEntityEvent () |
Event to replace an Entity. More... | |
virtual Nano::Signal< void(const lc::RemoveEntityEvent &)> & | removeEntityEvent () |
Event to remove an Entity. More... | |
virtual Nano::Signal< void(const lc::RemoveLayerEvent &)> & | removeLayerEvent () |
Event to remove an layer. More... | |
virtual Nano::Signal< void(const lc::AddLayerEvent &)> & | addLayerEvent () |
Event to add a layer. More... | |
virtual Nano::Signal< void(const lc::ReplaceLayerEvent &)> & | replaceLayerEvent () |
Event to replace a layer. More... | |
virtual Nano::Signal< void(const lc::RemoveLinePatternEvent &)> & | removeLinePatternEvent () |
Event to remove a line pattern. More... | |
virtual Nano::Signal< void(const lc::AddLinePatternEvent &)> & | addLinePatternEvent () |
Event to add a line pattern. More... | |
virtual Nano::Signal< void(const lc::ReplaceLinePatternEvent &)> & | replaceLinePatternEvent () |
Event to replace a line pattern. More... | |
virtual Nano::Signal< void(const NewWaitingCustomEntityEvent &)> & | newWaitingCustomEntityEvent () |
Event called when an unmanaged entity is added to the document. More... | |
Protected Member Functions | |
void | execute (operation::DocumentOperation_SPtr operation) override |
execute's a operation More... | |
void | begin (operation::DocumentOperation_SPtr operation) override |
begins operation More... | |
void | commit (operation::DocumentOperation_SPtr operation) override |
commits operation More... | |
StorageManager_SPtr | storageManager () const |
![]() | |
virtual void | operationStart (operation::DocumentOperation_SPtr operation) |
operationStart Starts the operation. More... | |
virtual void | operationFinnish (operation::DocumentOperation_SPtr operation) |
operationFinnish Finishes the operation. More... | |
virtual void | operationProcess (operation::DocumentOperation_SPtr operation) |
operationProcess process the operation. More... | |
Private Attributes | |
std::mutex | _documentMutex |
StorageManager_SPtr | _storageManager |
std::map< std::string, std::unordered_set < entity::Insert_CSPtr > > | _waitingCustomEntities |
std::unordered_set < entity::Insert_CSPtr > | _newWaitingCustomEntities |
Definition at line 15 of file documentimpl.h.
DocumentImpl::DocumentImpl | ( | StorageManager_SPtr | storageManager | ) |
Definition at line 11 of file documentimpl.cpp.
|
virtual |
Definition at line 15 of file documentimpl.cpp.
|
overridevirtual |
add a new layer to the document
layer | layer to be added. |
Implements lc::Document.
Definition at line 87 of file documentimpl.cpp.
|
overridevirtual |
|
overridevirtual |
|
overrideprotectedvirtual |
begins operation
operation |
Implements lc::Document.
Definition at line 37 of file documentimpl.cpp.
|
overridevirtual |
Implements lc::Document.
Definition at line 182 of file documentimpl.cpp.
|
overrideprotectedvirtual |
commits operation
operation |
Implements lc::Document.
Definition at line 43 of file documentimpl.cpp.
|
overridevirtual |
Search entities in a given block.
block |
Implements lc::Document.
Definition at line 178 of file documentimpl.cpp.
|
overridevirtual |
entitiesByLayer
layer |
Implements lc::Document.
Definition at line 143 of file documentimpl.cpp.
|
overridevirtual |
entityContainer Return a copy of all entities within the document
Implements lc::Document.
Definition at line 153 of file documentimpl.cpp.
|
overrideprotectedvirtual |
execute's a operation
operation |
Implements lc::Document.
Definition at line 19 of file documentimpl.cpp.
|
overridevirtual |
add an entity to document.
layerName | Name of layer to which entity is to be added |
cadEntity | Entity to be added |
Implements lc::Document.
Definition at line 49 of file documentimpl.cpp.
|
overridevirtual |
return a layer by it's name
Implements lc::Document.
Definition at line 162 of file documentimpl.cpp.
|
overridevirtual |
return a line pattern by it's name
Implements lc::Document.
Definition at line 166 of file documentimpl.cpp.
|
overridevirtual |
return all line patterns
Return all line patterns
Implements lc::Document.
Definition at line 174 of file documentimpl.cpp.
|
overridevirtual |
remove a layer from the document
layer | layer to be added. |
Implements lc::Document.
Definition at line 102 of file documentimpl.cpp.
|
overridevirtual |
removes an entity from the document.
id | ID of the entity to be removed. |
Implements lc::Document.
Definition at line 69 of file documentimpl.cpp.
|
overridevirtual |
remove a layer from the document
Implements lc::Document.
Definition at line 116 of file documentimpl.cpp.
|
protected |
Definition at line 148 of file documentimpl.cpp.
|
overridevirtual |
Implements lc::Document.
Definition at line 186 of file documentimpl.cpp.
|
private |
Definition at line 75 of file documentimpl.h.
|
private |
Definition at line 80 of file documentimpl.h.
|
private |
Definition at line 77 of file documentimpl.h.
|
private |
Definition at line 79 of file documentimpl.h.