famouso::mw::nl::awds::ComparableAttributeSet< AttrSet > Class Template Reference
#include <ComparableAttributeSet.h>
Data Structures | |
class | AttributeIterator |
class | AttributeIterator< Seq, typename boost::mpl::end< Seq >::type > |
Public Types | |
typedef AttrSet::sequence | AttrSeq |
typedef boost::shared_ptr < ComparableAttributeSet > | type |
Public Member Functions | |
void | set (awds::AWDS_Packet &p) |
Copy the attributes from the packet to this attribute instance. | |
void | print (::logging::loggingReturnType &out) |
print the attributes to the given stream. | |
type | clone () |
Creates a copy of the attributes set. | |
template<class Attrib > | |
Attrib * | find () |
Find an attribute in the set. | |
operator boost::asio::const_buffer () | |
Converts this set to a buffer to be useable by boost io. | |
uint16_t | size () |
Returns the overall runtime size of the attribute set. | |
Static Public Member Functions | |
static bool | match (const type &a, const type &b) |
Checks wether all attributes are matching. | |
static type | create () |
Creates an empty attributes instance. | |
static type | create (AWDS_Packet &p) |
Creates an new attributes instance. | |
template<class AttrSeq2 > | |
static type | create (famouso::mw::attributes::AttributeSet< AttrSeq2 > &p) |
Creates a new attributes instance. | |
static type | create (uint8_t *d) |
Creates a new attributes instance. |
template<class AttrSet = famouso::mw::attributes::AttributeSet<>>
class famouso::mw::nl::awds::ComparableAttributeSet< AttrSet >
Member Typedef Documentation
typedef AttrSet::sequence famouso::mw::nl::awds::ComparableAttributeSet< AttrSet >::AttrSeq |
The attributes sequence contained in AttrSet.
typedef boost::shared_ptr<ComparableAttributeSet> famouso::mw::nl::awds::ComparableAttributeSet< AttrSet >::type |
A list of attributes to check before publishing.
Member Function Documentation
type famouso::mw::nl::awds::ComparableAttributeSet< AttrSet >::clone | ( | ) | [inline] |
Creates a copy of the attributes set.
- Returns:
- The copied attributes set.
References famouso::mw::nl::awds::ComparableAttributeSet< AttrSet >::create().
static type famouso::mw::nl::awds::ComparableAttributeSet< AttrSet >::create | ( | uint8_t * | d | ) | [inline, static] |
Creates a new attributes instance.
The attributes data of the given set ist copied.
- Parameters:
-
d A pointer to an attribute set to copy attributes from.
- Returns:
- The new attributes set.
static type famouso::mw::nl::awds::ComparableAttributeSet< AttrSet >::create | ( | famouso::mw::attributes::AttributeSet< AttrSeq2 > & | p | ) | [inline, static] |
Creates a new attributes instance.
The attributes data of the given set ist copied.
- Parameters:
-
p An attribute set to load attributes from.
- Returns:
- The new attributes set.
- Template Parameters:
-
AttrSeq2 A boost mpl list of Attributes.
static type famouso::mw::nl::awds::ComparableAttributeSet< AttrSet >::create | ( | AWDS_Packet & | p | ) | [inline, static] |
Creates an new attributes instance.
- Parameters:
-
p An AWDS_Packet to load attributes from.
- Returns:
- An instance of attributes.
static type famouso::mw::nl::awds::ComparableAttributeSet< AttrSet >::create | ( | ) | [inline, static] |
Creates an empty attributes instance.
- Returns:
- An instance of attributes.
Referenced by famouso::mw::nl::awds::ComparableAttributeSet< AttrSet >::clone(), and famouso::mw::nl::AWDSNL::deliver().
Attrib* famouso::mw::nl::awds::ComparableAttributeSet< AttrSet >::find | ( | ) | [inline] |
Find an attribute in the set.
- Template Parameters:
-
Attrib The attribute to find.
- Returns:
- A pointer to the Attribute if found, NULL otherwise.
static bool famouso::mw::nl::awds::ComparableAttributeSet< AttrSet >::match | ( | const type & | a, | |
const type & | b | |||
) | [inline, static] |
Checks wether all attributes are matching.
The first attribute list should be the actual network attributes and the second attribute can be the publisher or subscriber defined attributes. The network attributes always have to be defined. The publisher or subscriber defined attributes can be not defined (then the match is always true because we don't have to comply with it). The actual comparator is defined by the attribute itself.
- Parameters:
-
a The first attributes list b The second attributes list.
- Returns:
- true if all attributes of the first list matches the second list of attributes, otherwise false.
Referenced by famouso::mw::nl::awds::NodeRepository::find().
famouso::mw::nl::awds::ComparableAttributeSet< AttrSet >::operator boost::asio::const_buffer | ( | ) | [inline] |
Converts this set to a buffer to be useable by boost io.
- Returns:
- A boost buffer to use for io.
References famouso::mw::nl::awds::ComparableAttributeSet< AttrSet >::size().
void famouso::mw::nl::awds::ComparableAttributeSet< AttrSet >::print | ( | ::logging::loggingReturnType & | out | ) | [inline] |
print the attributes to the given stream.
- Parameters:
-
out the output stream to print to.
void famouso::mw::nl::awds::ComparableAttributeSet< AttrSet >::set | ( | awds::AWDS_Packet & | p | ) | [inline] |
Copy the attributes from the packet to this attribute instance.
- Parameters:
-
p The packet to copy from.
References famouso::mw::nl::awds::AWDS_Packet::constants::packet_type::attributes, and famouso::mw::nl::awds::ComparableAttributeSet< AttrSet >::size().
uint16_t famouso::mw::nl::awds::ComparableAttributeSet< AttrSet >::size | ( | ) | [inline] |
Returns the overall runtime size of the attribute set.
- Returns:
- The overall runtime size of the attribute set.
Referenced by famouso::mw::nl::awds::ComparableAttributeSet< AttrSet >::operator boost::asio::const_buffer(), and famouso::mw::nl::awds::ComparableAttributeSet< AttrSet >::set().
The documentation for this class was generated from the following file:
- include/mw/nl/awds/ComparableAttributeSet.h