famouso::mw::nl::awds::detail::Node< AttrSet > Class Template Reference
A node at the AWDS network identified by his MAC address. More...
#include <Node.h>
Data Structures | |
struct | comp |
Comparison operator for sorting nodes. More... | |
Public Types | |
typedef boost::shared_ptr< Node > | type |
A node at the AWDS network identified by his MAC address. | |
typedef ComparableAttributeSet < AttrSet >::type | NodeAttributes |
The attributes type. | |
Public Member Functions | |
const MAC & | mac () const |
Get the MAC address of the node. | |
NodeAttributes & | attr () |
Get the attributes of the node. | |
void | attr (NodeAttributes &attribs) |
Set the attributes of the node. | |
template<class Attrib > | |
Attrib * | find () |
Find an attribute in the attributes set of the node. | |
template<class Attrib > | |
Attrib::value_type | get () |
Finds an attribute and returns the value. | |
bool | operator== (const Node &o) const |
The copare operator to compare if clients are the same. | |
void | print (::logging::loggingReturnType &out) const |
prints a node to the stream. | |
Static Public Member Functions | |
static type | create (MAC mac) |
Create a node with specified MAC. |
Detailed Description
template<class AttrSet>
class famouso::mw::nl::awds::detail::Node< AttrSet >
A node at the AWDS network identified by his MAC address.
- Template Parameters:
-
AttrSet An attribute set which defines the network attributes.
Member Typedef Documentation
typedef ComparableAttributeSet<AttrSet>::type famouso::mw::nl::awds::detail::Node< AttrSet >::NodeAttributes |
The attributes type.
typedef boost::shared_ptr<Node> famouso::mw::nl::awds::detail::Node< AttrSet >::type |
A node at the AWDS network identified by his MAC address.
Member Function Documentation
void famouso::mw::nl::awds::detail::Node< AttrSet >::attr | ( | NodeAttributes & | attribs | ) | [inline] |
Set the attributes of the node.
The attributs are copied.
- Parameters:
-
attribs The attributes set to set.
NodeAttributes& famouso::mw::nl::awds::detail::Node< AttrSet >::attr | ( | ) | [inline] |
Get the attributes of the node.
- Returns:
- The attributes set of this node.
Referenced by famouso::mw::nl::awds::detail::Node< AttrSet >::find().
static type famouso::mw::nl::awds::detail::Node< AttrSet >::create | ( | MAC | mac | ) | [inline, static] |
Create a node with specified MAC.
- Parameters:
-
mac The mac of the node.
- Returns:
- The constructed node secured by a shared pointer.
Referenced by famouso::mw::nl::awds::NodeRepository::find().
Attrib* famouso::mw::nl::awds::detail::Node< AttrSet >::find | ( | ) | [inline] |
Find an attribute in the attributes set of the node.
- Template Parameters:
-
Attrib The attribute to find.
- Returns:
- A pointer to the attribute if found, NULL otherwise.
References famouso::mw::nl::awds::detail::Node< AttrSet >::attr().
Attrib::value_type famouso::mw::nl::awds::detail::Node< AttrSet >::get | ( | ) | [inline] |
Finds an attribute and returns the value.
Throws an exception when the attribute was not found.
- Template Parameters:
-
Attrib The attribute to find.
- Returns:
- Thje value of the found attribute.
const MAC& famouso::mw::nl::awds::detail::Node< AttrSet >::mac | ( | ) | const [inline] |
Get the MAC address of the node.
- Returns:
- The MAC address of the node.
bool famouso::mw::nl::awds::detail::Node< AttrSet >::operator== | ( | const Node< AttrSet > & | o | ) | const [inline] |
The copare operator to compare if clients are the same.
- Parameters:
-
o The other node to compare to.
- Returns:
- Returns true if the clients are the same, false otherwise.
void famouso::mw::nl::awds::detail::Node< AttrSet >::print | ( | ::logging::loggingReturnType & | out | ) | const [inline] |
prints a node to the stream.
- Parameters:
-
out The output stream to print to.
Referenced by logging::operator<<().
The documentation for this class was generated from the following file:
- include/mw/nl/awds/Node.h