2 #include <unordered_map>
31 for (
auto insert : tmp) {
58 auto insert = std::dynamic_pointer_cast<
const entity::Insert>(cadEntity);
59 if (insert !=
nullptr && std::dynamic_pointer_cast<const entity::CustomEntity>(cadEntity) ==
nullptr) {
70 auto insert = std::dynamic_pointer_cast<
const entity::Insert>(entity);
71 if (insert !=
nullptr && std::dynamic_pointer_cast<const entity::CustomEntity>(entity) ==
nullptr) {
90 auto layer = std::dynamic_pointer_cast<
const Layer>(dmt);
91 if (layer !=
nullptr) {
97 if (linePattern !=
nullptr) {
104 auto layer = std::dynamic_pointer_cast<
const Layer>(dmt);
105 if (layer !=
nullptr) {
111 if (linePattern !=
nullptr) {
118 auto oldLayer = std::dynamic_pointer_cast<
const Layer>(oldDmt);
119 if (oldLayer !=
nullptr) {
120 auto newLayer = std::dynamic_pointer_cast<
const Layer>(newDmt);
121 if (newLayer !=
nullptr) {
130 if (oldLinePattern !=
nullptr) {
132 if (newLinePattern !=
nullptr) {
virtual Nano::Signal< void(const lc::ReplaceLayerEvent &)> & replaceLayerEvent()
Event to replace a layer.
std::map< std::string, Layer_CSPtr > allLayers() const override
Returns all layers.
DocumentImpl(StorageManager_SPtr storageManager)
std::map< std::string, DocumentMetaType_CSPtr, lc::StringHelper::cmpCaseInsensetive > allMetaTypes() override
virtual Nano::Signal< void(const lc::RemoveLayerEvent &)> & removeLayerEvent()
Event to remove an layer.
virtual Nano::Signal< void(const lc::AddEntityEvent &)> & addEntityEvent()
Event to add an Entity.
EntityContainer< entity::CADEntity_CSPtr > & entityContainer() override
entityContainer Return a copy of all entities within the document
DxfLinePatternByValue_CSPtr linePatternByName(const std::string &linePatternName) const override
return a line pattern by it's name
void removeDocumentMetaType(DocumentMetaType_CSPtr dmt) override
remove a layer from the document
virtual void operationStart(operation::DocumentOperation_SPtr operation)
operationStart Starts the operation.
virtual void operationProcess(operation::DocumentOperation_SPtr operation)
operationProcess process the operation.
virtual Nano::Signal< void(const lc::AddLinePatternEvent &)> & addLinePatternEvent()
Event to add a line pattern.
void execute(operation::DocumentOperation_SPtr operation) override
execute's a operation
std::mutex _documentMutex
std::vector< DxfLinePatternByValue_CSPtr > linePatterns() const override
return all line patterns
std::unordered_set< entity::Insert_CSPtr > _newWaitingCustomEntities
StorageManager_SPtr storageManager() const
virtual Nano::Signal< void(const lc::BeginProcessEvent &)> & beginProcessEvent()
begins a Process Event
EntityContainer< entity::CADEntity_CSPtr > entitiesByLayer(Layer_CSPtr layer) override
entitiesByLayer
Event that gets emitted when a new line pattern was removed from the document.
Layer_CSPtr layerByName(const std::string &layerName) const override
return a layer by it's name
virtual Nano::Signal< void(const lc::RemoveLinePatternEvent &)> & removeLinePatternEvent()
Event to remove a line pattern.
EntityContainer< entity::CADEntity_CSPtr > entitiesByBlock(Block_CSPtr block) override
Search entities in a given block.
std::unordered_set< entity::Insert_CSPtr > waitingCustomEntities(const std::string &pluginName) override
void insertEntity(entity::CADEntity_CSPtr cadEntity) override
add an entity to document.
std::vector< Block_CSPtr > blocks() const override
Event that gets emitted when a new line pattern was replaced in the document.
void begin(operation::DocumentOperation_SPtr operation) override
begins operation
virtual Nano::Signal< void(const lc::RemoveEntityEvent &)> & removeEntityEvent()
Event to remove an Entity.
virtual Nano::Signal< void(const lc::ReplaceLinePatternEvent &)> & replaceLinePatternEvent()
Event to replace a line pattern.
void commit(operation::DocumentOperation_SPtr operation) override
commits operation
virtual Nano::Signal< void(const lc::CommitProcessEvent &)> & commitProcessEvent()
commits a Process Event
virtual Nano::Signal< void(const lc::AddLayerEvent &)> & addLayerEvent()
Event to add a layer.
void removeEntity(entity::CADEntity_CSPtr entity) override
removes an entity from the document.
virtual Nano::Signal< void(const NewWaitingCustomEntityEvent &)> & newWaitingCustomEntityEvent()
Event called when an unmanaged entity is added to the document.
std::map< std::string, std::unordered_set< entity::Insert_CSPtr > > _waitingCustomEntities
void addDocumentMetaType(DocumentMetaType_CSPtr dmt) override
add a new layer to the document
Event that gets emitted when a new line pattern was added to the document.
StorageManager_SPtr _storageManager
void replaceDocumentMetaType(DocumentMetaType_CSPtr oldDmt, DocumentMetaType_CSPtr newDmt) override
remove a layer from the document
Class for storage of components of custom entities Child of Block for compatibility with other CAD so...