Class to store the elements in the clipboard.
More...
#include <ElementDataObject.h>
Class to store the elements in the clipboard.
- Author
- Thales Lima Oliveira thale.nosp@m.s@uf.nosp@m.u.br
- Date
- 06/10/2017
Definition at line 36 of file ElementDataObject.h.
◆ ElementDataObject() [1/2]
| ElementDataObject::ElementDataObject |
( |
| ) |
|
Definition at line 20 of file ElementDataObject.cpp.
20 : wxDataObjectSimple(wxDataFormat(wxT("PSPCopy")))
21{
22 m_elementsLists = new ElementsLists();
23}
◆ ElementDataObject() [2/2]
| ElementDataObject::ElementDataObject |
( |
std::vector< Element * > | elementList | ) |
|
Definition at line 25 of file ElementDataObject.cpp.
25 : wxDataObjectSimple(wxDataFormat(wxT("PSPCopy")))
26{
27 m_elementsLists = new ElementsLists();
28 if(elementList.size() > 0) {
29
30 for(auto it = elementList.begin(), itEnd = elementList.end(); it != itEnd; ++it) {
31 Element* copy = (*it)->GetCopy();
32 if(copy) {
33 if(Bus* bus = dynamic_cast<Bus*>(copy))
34 m_elementsLists->parentList.push_back(bus);
35 else
36 m_elementsLists->elementList.push_back(copy);
37 }
38 }
39 }
40}
◆ ~ElementDataObject()
| ElementDataObject::~ElementDataObject |
( |
| ) |
|
◆ GetDataHere()
| bool ElementDataObject::GetDataHere |
( |
void * | buf | ) |
const |
|
override |
Definition at line 49 of file ElementDataObject.cpp.
50{
51 *(ElementsLists**)buf = m_elementsLists;
52
53 return true;
54}
◆ GetDataSize()
| size_t ElementDataObject::GetDataSize |
( |
| ) |
const |
|
override |
◆ GetElementsLists()
◆ SetData()
| bool ElementDataObject::SetData |
( |
size_t | len, |
|
|
const void * | buf ) |
|
override |
Definition at line 56 of file ElementDataObject.cpp.
57{
58 m_elementsLists = *(ElementsLists**)buf;
59
60 return true;
61}
◆ m_elementsLists
The documentation for this class was generated from the following files: