bpp-phyl3  3.0.0
PhyloNode.cpp
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: The Bio++ Development Group
2 //
3 // SPDX-License-Identifier: CECILL-2.1
4 
5 #include <iostream>
6 
7 #include "PhyloNode.h"
8 
9 using namespace bpp;
10 using namespace std;
11 
14 
18  name_(node.name_),
19  properties_()
20 {
21  for (map<string, Clonable*>::iterator i = node.properties_.begin(); i != node.properties_.end(); i++)
22  {
23  properties_[i->first] = i->second->clone();
24  }
25 }
26 
30 {
31  name_ = node.name_;
32  for (map<string, Clonable*>::iterator i = node.properties_.begin(); i != node.properties_.end(); i++)
33  {
34  Clonable* p = properties_[i->first];
35  if (p)
36  delete p;
37  properties_[i->first] = i->second->clone();
38  }
39 
40  return *this;
41 }
42 
43 /******************************************************************************/
static const NodeEvent speciationEvent
Definition: PhyloNode.h:45
static const NodeEvent mixtureEvent
Definition: PhyloNode.h:46
PhyloNode()
Build a new void Node object.
Definition: PhyloNode.h:71
std::string name_
Definition: PhyloNode.h:62
std::map< std::string, Clonable * > properties_
Definition: PhyloNode.h:65
PhyloNode & operator=(const PhyloNode &node)
Assignation operator.
Definition: PhyloNode.cpp:29
Defines the basic types of data flow nodes.