Commit 768d9762 authored by Jan Möbius's avatar Jan Möbius

Add private copy constructor to avoid accidental copying

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@18210 383ad7c9-94d9-4d36-a494-682f7c89f535
parent fced76b6
......@@ -52,6 +52,8 @@
#include "../parser/element.hh"
#include "../parser/context.hh"
#include <iostream>
//== NAMESPACES ===============================================================
namespace VSI {
......@@ -88,6 +90,17 @@ ElementInOut::ElementInOut (InOut *_io, SceneElement *_parent):
descText_->setHorizontalStretch (true);
}
ElementInOut::ElementInOut(const ElementInOut& _orig) :
io_(NULL),
element_(NULL),
conn_(NULL),
typeText_(NULL),
descText_(NULL)
{
std::cerr << "Illegal use of copy constructor in class ElementInOut, which is not implemented yet!" << std::endl;
};
//------------------------------------------------------------------------------
/// Destructor
......
......@@ -106,12 +106,16 @@ class ElementInOut {
bool validConnection (ElementInOut *_e);
/// InOut context object
InOut *inOut () const { return io_; };
InOut* inOut () const { return io_; };
/// Scene element
SceneElement *element () { return element_; };
SceneElement* element() { return element_; };
private:
/// Private copy constructor to avoid accidental copy
ElementInOut( const ElementInOut& _orig );
InOut *io_;
SceneElement *element_;
......@@ -126,4 +130,4 @@ class ElementInOut {
}
//=============================================================================
#endif
\ No newline at end of file
#endif
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment