equal
deleted
inserted
replaced
52 * reflecting how the nodes are called in the original topology file. |
52 * reflecting how the nodes are called in the original topology file. |
53 */ |
53 */ |
54 class Link |
54 class Link |
55 { |
55 { |
56 public: |
56 public: |
57 /** |
57 /** |
58 * \brief Constant iterator to scan the map of link attributes. |
58 * \brief Constant iterator to scan the map of link attributes. |
59 */ |
59 */ |
60 typedef std::map<std::string, std::string>::const_iterator ConstAttributesIterator; |
60 typedef std::map<std::string, std::string>::const_iterator ConstAttributesIterator; |
61 |
61 |
62 /** |
62 /** |
63 * \brief Constructor |
63 * \brief Constructor |
64 * \param fromPtr Ptr to the node the link is orginating from |
64 * \param fromPtr Ptr to the node the link is orginating from |
121 */ |
121 */ |
122 ConstAttributesIterator AttributesEnd (void); |
122 ConstAttributesIterator AttributesEnd (void); |
123 |
123 |
124 private: |
124 private: |
125 Link (); |
125 Link (); |
126 std::string m_fromName; |
126 std::string m_fromName; //!< Name of the node the links originates from |
127 Ptr< Node > m_fromPtr; |
127 Ptr< Node > m_fromPtr; //!< The node the links originates from |
128 std::string m_toName; |
128 std::string m_toName; //!< Name of the node the links is directed to |
129 Ptr< Node > m_toPtr; |
129 Ptr< Node > m_toPtr; //!< The node the links is directed to |
130 std::map<std::string, std::string> m_linkAttr; |
130 std::map<std::string, std::string> m_linkAttr; ///< Container of the link attributes (if any) |
131 }; |
131 }; |
132 |
132 |
133 /** |
133 /** |
134 * \brief Constant iterator to the list of the links. |
134 * \brief Constant iterator to the list of the links. |
135 */ |
135 */ |
136 typedef std::list< Link >::const_iterator ConstLinksIterator; |
136 typedef std::list< Link >::const_iterator ConstLinksIterator; |
137 |
137 |
|
138 /** |
|
139 * \brief Get the type ID. |
|
140 * \return the object TypeId |
|
141 */ |
138 static TypeId GetTypeId (void); |
142 static TypeId GetTypeId (void); |
139 |
143 |
140 TopologyReader (); |
144 TopologyReader (); |
141 virtual ~TopologyReader (); |
145 virtual ~TopologyReader (); |
142 |
146 |
194 * \param link the link to be added. |
198 * \param link the link to be added. |
195 */ |
199 */ |
196 void AddLink (Link link); |
200 void AddLink (Link link); |
197 |
201 |
198 private: |
202 private: |
199 TopologyReader (const TopologyReader&); |
203 |
200 TopologyReader& operator= (const TopologyReader&); |
204 /** |
201 |
205 * the name of the input file |
|
206 */ |
202 std::string m_fileName; |
207 std::string m_fileName; |
|
208 |
|
209 /** |
|
210 * the container of the links between the nodes |
|
211 */ |
203 std::list<Link> m_linksList; |
212 std::list<Link> m_linksList; |
204 |
213 |
205 // end class TopologyReader |
214 // end class TopologyReader |
206 }; |
215 }; |
207 |
216 |