rename old VALUE leftovers
This commit is contained in:
1 parent
8bfed4f1db
commit
a32c30f33f
24 files changed
+45
-45
No files matched your search
@@ -125,7 +125,7 @@ DoParse (const std::string s, uint64_t *v)
|
||||
|
||||
namespace ns3 {
|
||||
|
||||
VALUE_HELPER_CPP (DataRate);
|
||||
ATTRIBUTE_HELPER_CPP (DataRate);
|
||||
|
||||
DataRate::DataRate ()
|
||||
: m_bps (0)
|
||||
|
||||
@@ -81,7 +81,7 @@ public:
|
||||
*/
|
||||
uint64_t GetBitRate() const;
|
||||
|
||||
VALUE_HELPER_HEADER_1 (DataRate);
|
||||
ATTRIBUTE_HELPER_HEADER_1 (DataRate);
|
||||
private:
|
||||
uint64_t m_bps;
|
||||
static uint64_t Parse(const std::string);
|
||||
@@ -90,7 +90,7 @@ private:
|
||||
std::ostream &operator << (std::ostream &os, const DataRate &rate);
|
||||
std::istream &operator >> (std::istream &is, DataRate &rate);
|
||||
|
||||
VALUE_HELPER_HEADER_2 (DataRate);
|
||||
ATTRIBUTE_HELPER_HEADER_2 (DataRate);
|
||||
|
||||
/**
|
||||
* \param lhs
|
||||
|
||||
@@ -17,8 +17,8 @@
|
||||
*
|
||||
* Authors: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
|
||||
*/
|
||||
#ifndef VALUE_HELPER_H
|
||||
#define VALUE_HELPER_H
|
||||
#ifndef ATTRIBUTE_HELPER_H
|
||||
#define ATTRIBUTE_HELPER_H
|
||||
|
||||
#include "attribute.h"
|
||||
#include "object-base.h"
|
||||
@@ -130,19 +130,19 @@
|
||||
}
|
||||
|
||||
|
||||
#define VALUE_HELPER_HEADER_1(type) \
|
||||
#define ATTRIBUTE_HELPER_HEADER_1(type) \
|
||||
ATTRIBUTE_CONVERTER_DEFINE (type)
|
||||
|
||||
#define VALUE_HELPER_HEADER_2(type) \
|
||||
#define ATTRIBUTE_HELPER_HEADER_2(type) \
|
||||
ATTRIBUTE_VALUE_DEFINE (type); \
|
||||
ATTRIBUTE_ACCESSOR_DEFINE (type); \
|
||||
ATTRIBUTE_CHECKER_DEFINE (type);
|
||||
|
||||
#define VALUE_HELPER_CPP(type) \
|
||||
#define ATTRIBUTE_HELPER_CPP(type) \
|
||||
ATTRIBUTE_CHECKER_IMPLEMENT (type); \
|
||||
ATTRIBUTE_CONVERTER_IMPLEMENT (type); \
|
||||
ATTRIBUTE_VALUE_IMPLEMENT (type);
|
||||
|
||||
|
||||
|
||||
#endif /* VALUE_HELPER_H */
|
||||
#endif /* ATTRIBUTE_HELPER_H */
|
||||
@@ -37,7 +37,7 @@ class ValueClassTest
|
||||
{
|
||||
public:
|
||||
ValueClassTest () {}
|
||||
VALUE_HELPER_HEADER_1 (ValueClassTest);
|
||||
ATTRIBUTE_HELPER_HEADER_1 (ValueClassTest);
|
||||
private:
|
||||
int m_v;
|
||||
};
|
||||
@@ -53,8 +53,8 @@ std::istream & operator >> (std::istream &is, ValueClassTest &v)
|
||||
{
|
||||
return is;
|
||||
}
|
||||
VALUE_HELPER_HEADER_2 (ValueClassTest);
|
||||
VALUE_HELPER_CPP (ValueClassTest);
|
||||
ATTRIBUTE_HELPER_HEADER_2 (ValueClassTest);
|
||||
ATTRIBUTE_HELPER_CPP (ValueClassTest);
|
||||
|
||||
class AttributeTest : public Test
|
||||
{
|
||||
|
||||
@@ -57,6 +57,6 @@ std::istream & operator >> (std::istream &is, ObjectFactory &factory)
|
||||
}
|
||||
|
||||
|
||||
VALUE_HELPER_CPP (ObjectFactory);
|
||||
ATTRIBUTE_HELPER_CPP (ObjectFactory);
|
||||
|
||||
} // namespace ns3
|
||||
@@ -22,7 +22,7 @@ public:
|
||||
template <typename T>
|
||||
Ptr<T> Create (void) const;
|
||||
|
||||
VALUE_HELPER_HEADER_1 (ObjectFactory);
|
||||
ATTRIBUTE_HELPER_HEADER_1 (ObjectFactory);
|
||||
private:
|
||||
TypeId m_tid;
|
||||
AttributeList m_parameters;
|
||||
@@ -31,7 +31,7 @@ private:
|
||||
std::ostream & operator << (std::ostream &os, const ObjectFactory &factory);
|
||||
std::istream & operator >> (std::istream &is, ObjectFactory &factory);
|
||||
|
||||
VALUE_HELPER_HEADER_2 (ObjectFactory);
|
||||
ATTRIBUTE_HELPER_HEADER_2 (ObjectFactory);
|
||||
|
||||
} // namespace ns3
|
||||
|
||||
|
||||
+1
-1
@@ -723,7 +723,7 @@ std::istream & operator >> (std::istream &is, TypeId &tid)
|
||||
}
|
||||
|
||||
|
||||
VALUE_HELPER_CPP (TypeId);
|
||||
ATTRIBUTE_HELPER_CPP (TypeId);
|
||||
|
||||
bool operator == (TypeId a, TypeId b)
|
||||
{
|
||||
|
||||
+2
-2
@@ -270,7 +270,7 @@ public:
|
||||
TypeId ();
|
||||
~TypeId ();
|
||||
|
||||
VALUE_HELPER_HEADER_1 (TypeId);
|
||||
ATTRIBUTE_HELPER_HEADER_1 (TypeId);
|
||||
private:
|
||||
friend class Object;
|
||||
friend class AttributeList;
|
||||
@@ -302,7 +302,7 @@ private:
|
||||
std::ostream & operator << (std::ostream &os, TypeId tid);
|
||||
std::istream & operator >> (std::istream &is, TypeId &tid);
|
||||
|
||||
VALUE_HELPER_HEADER_2 (TypeId);
|
||||
ATTRIBUTE_HELPER_HEADER_2 (TypeId);
|
||||
|
||||
/**
|
||||
* \brief a container of attributes to be used during object's construction
|
||||
|
||||
+1
-1
@@ -40,6 +40,6 @@ std::istream &operator >> (std::istream &is, String &value)
|
||||
return is;
|
||||
}
|
||||
|
||||
VALUE_HELPER_CPP (String);
|
||||
ATTRIBUTE_HELPER_CPP (String);
|
||||
|
||||
} // namespace ns3
|
||||
+2
-2
@@ -16,7 +16,7 @@ public:
|
||||
void Set (const char *value);
|
||||
std::string Get (void) const;
|
||||
|
||||
VALUE_HELPER_HEADER_1 (String);
|
||||
ATTRIBUTE_HELPER_HEADER_1 (String);
|
||||
private:
|
||||
std::string m_value;
|
||||
};
|
||||
@@ -24,7 +24,7 @@ private:
|
||||
std::ostream & operator << (std::ostream &os, const String &value);
|
||||
std::istream &operator >> (std::istream &is, String &value);
|
||||
|
||||
VALUE_HELPER_HEADER_2 (String);
|
||||
ATTRIBUTE_HELPER_HEADER_2 (String);
|
||||
|
||||
} // namespace ns3
|
||||
|
||||
|
||||
@@ -136,7 +136,7 @@ Ssid::Deserialize (Buffer::Iterator i)
|
||||
return i;
|
||||
}
|
||||
|
||||
VALUE_HELPER_CPP (Ssid);
|
||||
ATTRIBUTE_HELPER_CPP (Ssid);
|
||||
|
||||
std::ostream &
|
||||
operator << (std::ostream &os, const Ssid &ssid)
|
||||
|
||||
@@ -45,7 +45,7 @@ public:
|
||||
Buffer::Iterator Serialize (Buffer::Iterator i) const;
|
||||
Buffer::Iterator Deserialize (Buffer::Iterator i);
|
||||
|
||||
VALUE_HELPER_HEADER_1 (Ssid);
|
||||
ATTRIBUTE_HELPER_HEADER_1 (Ssid);
|
||||
private:
|
||||
uint8_t m_ssid[33];
|
||||
uint8_t m_length;
|
||||
@@ -54,7 +54,7 @@ private:
|
||||
std::ostream &operator << (std::ostream &os, const Ssid &ssid);
|
||||
std::istream &operator >> (std::istream &is, Ssid &ssid);
|
||||
|
||||
VALUE_HELPER_HEADER_2 (Ssid);
|
||||
ATTRIBUTE_HELPER_HEADER_2 (Ssid);
|
||||
|
||||
} // namespace ns3
|
||||
|
||||
|
||||
@@ -108,7 +108,7 @@ WifiMode::WifiMode (uint32_t uid)
|
||||
: m_uid (uid)
|
||||
{}
|
||||
|
||||
VALUE_HELPER_CPP (WifiMode);
|
||||
ATTRIBUTE_HELPER_CPP (WifiMode);
|
||||
|
||||
WifiModeFactory::WifiModeFactory ()
|
||||
{}
|
||||
|
||||
@@ -107,7 +107,7 @@ class WifiMode
|
||||
*/
|
||||
WifiMode ();
|
||||
|
||||
VALUE_HELPER_HEADER_1 (WifiMode);
|
||||
ATTRIBUTE_HELPER_HEADER_1 (WifiMode);
|
||||
private:
|
||||
friend class WifiModeFactory;
|
||||
WifiMode (uint32_t uid);
|
||||
@@ -118,7 +118,7 @@ bool operator == (const WifiMode &a, const WifiMode &b);
|
||||
std::ostream & operator << (std::ostream & os, const WifiMode &mode);
|
||||
std::istream & operator >> (std::istream &is, WifiMode &mode);
|
||||
|
||||
VALUE_HELPER_HEADER_2 (WifiMode);
|
||||
ATTRIBUTE_HELPER_HEADER_2 (WifiMode);
|
||||
|
||||
/**
|
||||
* \brief create WifiMode class instances and keep track of them.
|
||||
|
||||
@@ -119,7 +119,7 @@ Rectangle::CalculateIntersection (const Vector ¤t, const Vector &speed) co
|
||||
|
||||
}
|
||||
|
||||
VALUE_HELPER_CPP (Rectangle);
|
||||
ATTRIBUTE_HELPER_CPP (Rectangle);
|
||||
|
||||
std::ostream &
|
||||
operator << (std::ostream &os, const Rectangle &rectangle)
|
||||
|
||||
@@ -62,13 +62,13 @@ public:
|
||||
double yMin;
|
||||
double yMax;
|
||||
|
||||
VALUE_HELPER_HEADER_1 (Rectangle);
|
||||
ATTRIBUTE_HELPER_HEADER_1 (Rectangle);
|
||||
};
|
||||
|
||||
std::ostream &operator << (std::ostream &os, const Rectangle &rectangle);
|
||||
std::istream &operator >> (std::istream &is, Rectangle &rectangle);
|
||||
|
||||
VALUE_HELPER_HEADER_2 (Rectangle);
|
||||
ATTRIBUTE_HELPER_HEADER_2 (Rectangle);
|
||||
|
||||
} // namespace ns3
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
namespace ns3 {
|
||||
|
||||
VALUE_HELPER_CPP (Vector);
|
||||
ATTRIBUTE_HELPER_CPP (Vector);
|
||||
|
||||
|
||||
Vector::Vector (double _x, double _y, double _z)
|
||||
|
||||
@@ -58,12 +58,12 @@ public:
|
||||
*/
|
||||
double z;
|
||||
|
||||
VALUE_HELPER_HEADER_1 (Vector);
|
||||
ATTRIBUTE_HELPER_HEADER_1 (Vector);
|
||||
};
|
||||
|
||||
double CalculateDistance (const Vector &a, const Vector &b);
|
||||
|
||||
VALUE_HELPER_HEADER_2 (Vector);
|
||||
ATTRIBUTE_HELPER_HEADER_2 (Vector);
|
||||
|
||||
std::ostream &operator << (std::ostream &os, const Vector &vector);
|
||||
std::istream &operator >> (std::istream &is, Vector &vector);
|
||||
|
||||
+1
-1
@@ -107,7 +107,7 @@ Address::Register (void)
|
||||
return type;
|
||||
}
|
||||
|
||||
VALUE_HELPER_CPP (Address);
|
||||
ATTRIBUTE_HELPER_CPP (Address);
|
||||
|
||||
bool operator == (const Address &a, const Address &b)
|
||||
{
|
||||
|
||||
+2
-2
@@ -154,7 +154,7 @@ public:
|
||||
*/
|
||||
static uint8_t Register (void);
|
||||
|
||||
VALUE_HELPER_HEADER_1 (Address);
|
||||
ATTRIBUTE_HELPER_HEADER_1 (Address);
|
||||
private:
|
||||
friend bool operator == (const Address &a, const Address &b);
|
||||
friend bool operator < (const Address &a, const Address &b);
|
||||
@@ -165,7 +165,7 @@ private:
|
||||
uint8_t m_data[MAX_SIZE];
|
||||
};
|
||||
|
||||
VALUE_HELPER_HEADER_2 (Address);
|
||||
ATTRIBUTE_HELPER_HEADER_2 (Address);
|
||||
|
||||
bool operator == (const Address &a, const Address &b);
|
||||
bool operator != (const Address &a, const Address &b);
|
||||
|
||||
@@ -325,7 +325,7 @@ bool operator != (Ipv4Mask const &a, Ipv4Mask const &b)
|
||||
return !a.IsEqual (b);
|
||||
}
|
||||
|
||||
VALUE_HELPER_CPP (Ipv4Address);
|
||||
VALUE_HELPER_CPP (Ipv4Mask);
|
||||
ATTRIBUTE_HELPER_CPP (Ipv4Address);
|
||||
ATTRIBUTE_HELPER_CPP (Ipv4Mask);
|
||||
|
||||
} // namespace ns3
|
||||
@@ -143,7 +143,7 @@ public:
|
||||
static Ipv4Address GetBroadcast (void);
|
||||
static Ipv4Address GetLoopback (void);
|
||||
|
||||
VALUE_HELPER_HEADER_1 (Ipv4Address);
|
||||
ATTRIBUTE_HELPER_HEADER_1 (Ipv4Address);
|
||||
private:
|
||||
Address ConvertTo (void) const;
|
||||
static uint8_t GetType (void);
|
||||
@@ -181,13 +181,13 @@ public:
|
||||
static Ipv4Mask GetLoopback (void);
|
||||
static Ipv4Mask GetZero (void);
|
||||
|
||||
VALUE_HELPER_HEADER_1 (Ipv4Mask);
|
||||
ATTRIBUTE_HELPER_HEADER_1 (Ipv4Mask);
|
||||
private:
|
||||
uint32_t m_mask;
|
||||
};
|
||||
|
||||
VALUE_HELPER_HEADER_2 (Ipv4Address);
|
||||
VALUE_HELPER_HEADER_2 (Ipv4Mask);
|
||||
ATTRIBUTE_HELPER_HEADER_2 (Ipv4Address);
|
||||
ATTRIBUTE_HELPER_HEADER_2 (Ipv4Mask);
|
||||
|
||||
std::ostream& operator<< (std::ostream& os, Ipv4Address const& address);
|
||||
std::ostream& operator<< (std::ostream& os, Ipv4Mask const& mask);
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
namespace ns3 {
|
||||
|
||||
VALUE_HELPER_CPP (Mac48Address);
|
||||
ATTRIBUTE_HELPER_CPP (Mac48Address);
|
||||
|
||||
#define ASCII_a (0x41)
|
||||
#define ASCII_z (0x5a)
|
||||
|
||||
@@ -96,7 +96,7 @@ public:
|
||||
*/
|
||||
static Mac48Address GetBroadcast (void);
|
||||
|
||||
VALUE_HELPER_HEADER_1 (Mac48Address);
|
||||
ATTRIBUTE_HELPER_HEADER_1 (Mac48Address);
|
||||
private:
|
||||
/**
|
||||
* \returns a new Address instance
|
||||
@@ -111,7 +111,7 @@ private:
|
||||
uint8_t m_address[6];
|
||||
};
|
||||
|
||||
VALUE_HELPER_HEADER_2 (Mac48Address);
|
||||
ATTRIBUTE_HELPER_HEADER_2 (Mac48Address);
|
||||
|
||||
bool operator == (const Mac48Address &a, const Mac48Address &b);
|
||||
bool operator != (const Mac48Address &a, const Mac48Address &b);
|
||||
|
||||
Reference in new issue
Block a user