Power System Platform
2026w23a-beta
Loading...
Searching...
No Matches
ControlElementDataObject.h
1
/*
2
* Copyright (C) 2026 Thales Lima Oliveira <thales.oliveira@uftm.edu.br>
3
*
4
* This program is free software; you can redistribute it and/or modify
5
* it under the terms of the GNU General Public License as published by
6
* the Free Software Foundation; either version 2 of the License, or
7
* any later version.
8
*
9
* This program is distributed in the hope that it will be useful,
10
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
* GNU General Public License for more details.
13
*
14
* You should have received a copy of the GNU General Public License
15
* along with this program. If not, see <https://www.gnu.org/licenses/>.
16
*/
17
18
#ifndef CONTROLELEMENTDATAOBJECT_H
19
#define CONTROLELEMENTDATAOBJECT_H
20
21
#include <memory>
22
#include <vector>
23
24
#include <wx/dataobj.h>
25
26
class
ControlElement
;
27
class
ConnectionLine
;
28
29
struct
ControlElementsLists
{
30
std::vector<std::shared_ptr<ControlElement>> elementList;
31
std::vector<std::shared_ptr<ConnectionLine>> connectionList;
32
};
33
43
class
ControlElementDataObject
:
public
wxDataObjectSimple
44
{
45
public
:
46
ControlElementDataObject
();
47
ControlElementDataObject
(
48
const
std::vector<std::shared_ptr<ControlElement>>& elementList,
49
const
std::vector<std::shared_ptr<ConnectionLine>>& connectionList);
50
~ControlElementDataObject
()
override
;
51
52
size_t
GetDataSize()
const override
;
53
bool
GetDataHere(
void
* buf)
const override
;
54
bool
SetData(
size_t
len,
const
void
* buf)
override
;
55
56
ControlElementsLists
* GetElementsLists() {
return
m_elementsLists; }
57
58
private
:
59
ControlElementsLists
* m_elementsLists =
nullptr
;
60
bool
m_ownsLists =
false
;
61
};
62
63
#endif
// CONTROLELEMENTDATAOBJECT_H
64
ConnectionLine
Connection between two control elements or other connection line and an element.
Definition
ConnectionLine.h:31
ControlElementDataObject
Clipboard payload for ControlEditor copy/paste (control elements + connection lines).
Definition
ControlElementDataObject.h:44
ControlElement
Definition
ControlElement.h:87
ControlElementsLists
Definition
ControlElementDataObject.h:29
Project
elements
ControlElementDataObject.h
Generated by
1.9.8