|
Last change
on this file since 5870 was 5284, checked in by mies, 16 years ago |
|
+ added new transport modules and adapted ariba to them
+ exchange endpoint descriptors an link establishment
+ clean up of base communication
+ link establishment with in the presence of multiple endpoints
+ local discovery for ipv6, ipv4 and bluetooth mac addresses
|
|
File size:
1.0 KB
|
| Line | |
|---|
| 1 | #ifndef ADDRESS_CONVENIENCE_HPP_
|
|---|
| 2 | #define ADDRESS_CONVENIENCE_HPP_
|
|---|
| 3 |
|
|---|
| 4 | #include <string>
|
|---|
| 5 | #include "compare_to_operators.hpp"
|
|---|
| 6 |
|
|---|
| 7 | namespace ariba {
|
|---|
| 8 | namespace addressing {
|
|---|
| 9 | namespace detail {
|
|---|
| 10 |
|
|---|
| 11 | /**
|
|---|
| 12 | * TODO: Doc
|
|---|
| 13 | *
|
|---|
| 14 | * @author Sebastian Mies <mies@tm.uka.de>
|
|---|
| 15 | */
|
|---|
| 16 | template<class T>
|
|---|
| 17 | class address_convenience : public compare_to_operators<T> {
|
|---|
| 18 | public:
|
|---|
| 19 | /// convenience method for assignment of addresses
|
|---|
| 20 | inline T& operator=( const T& rhs ) {
|
|---|
| 21 | static_cast<T*>(this)->assign(rhs);
|
|---|
| 22 | return *this;
|
|---|
| 23 | }
|
|---|
| 24 |
|
|---|
| 25 | /// convenience method for assignment of addresses
|
|---|
| 26 | inline T& operator=( const char* text ) {
|
|---|
| 27 | static_cast<T*>(this)->assign(text);
|
|---|
| 28 | return *this;
|
|---|
| 29 | }
|
|---|
| 30 |
|
|---|
| 31 | /// convenience method for assignment of addresses
|
|---|
| 32 | inline T& operator=( const std::string& text ) {
|
|---|
| 33 | static_cast<T*>(this)->assign(text);
|
|---|
| 34 | return *this;
|
|---|
| 35 | }
|
|---|
| 36 |
|
|---|
| 37 | /// convenience method for assignment of a c-string address
|
|---|
| 38 | inline T& assign( const char* text ) {
|
|---|
| 39 | static_cast<T*>(this)->assign( std::string(text) );
|
|---|
| 40 | return *this;
|
|---|
| 41 | }
|
|---|
| 42 | };
|
|---|
| 43 |
|
|---|
| 44 | }}} // namespace ariba::addressing::detail
|
|---|
| 45 |
|
|---|
| 46 | #endif /* ADDRESS_CONVENIENCE_HPP_ */
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.