CEdgeNode.h
Go to the documentation of this file.
1 #ifndef iedge_CEdgeNode_included
2 #define iedge_CEdgeNode_included
3 
4 
5 // ACF includes
6 #include "iser/ISerializable.h"
7 #include "i2d/CVector2d.h"
8 
9 
10 namespace iedge
11 {
12 
13 
18 class CEdgeNode: virtual public iser::ISerializable
19 {
20 public:
21  CEdgeNode();
22  CEdgeNode(const i2d::CVector2d& position, double weight);
23 
27  const i2d::CVector2d& GetPosition() const;
31  void SetPosition(const i2d::CVector2d& position);
36  double GetWeight() const;
41  void SetWeight(double weight);
42 
43  // reimplemented (iser::ISerializable)
44  virtual bool Serialize(iser::IArchive& archive);
45 
46 private:
50  i2d::CVector2d m_position;
51 
54  double m_weight;
55 };
56 
57 
58 // inline methods
59 
61 {
62  return m_position;
63 }
64 
65 
66 inline void CEdgeNode::SetPosition(const i2d::CVector2d& position)
67 {
68  m_position = position;
69 }
70 
71 
72 inline double CEdgeNode::GetWeight() const
73 {
74  return m_weight;
75 }
76 
77 
78 inline void CEdgeNode::SetWeight(double weight)
79 {
80  m_weight = weight;
81 }
82 
83 
84 } // namespace iedge
85 
86 
87 #endif // !iedge_CEdgeNode_included
88 
89 
void SetPosition(const i2d::CVector2d &position)
Set position of node.
Definition: CEdgeNode.h:66
const i2d::CVector2d & GetPosition() const
Get position of node.
Definition: CEdgeNode.h:60
virtual bool Serialize(iser::IArchive &archive)
void SetWeight(double weight)
Set node weight.
Definition: CEdgeNode.h:78
double GetWeight() const
Get node weight.
Definition: CEdgeNode.h:72
Description of single node of the edge.
Definition: CEdgeNode.h:18

© 2007-2011 Witold Gantzke and Kirill Lepskiy