As described in the Common C++ changelog, the new version contains
multiple API changes, resulting in backward-incompatible ABI changes in
the shared library.
From Common C++ 1.5.2 to 1.5.3
- some code cleanup of operators and const members
I'm including a diff which contains all changes of header files from
1.5.1 to 1.5.3.
/Mikael
--- commoncpp2-1.5.1/include/cc++/address.h 2006-10-01 14:07:12.000000000 +0200
+++ commoncpp2-1.5.3/include/cc++/address.h 2006-11-21 14:40:05.000000000 +0100
@@ -167,7 +167,7 @@
protected:
struct in_addr netmask, network;
- unsigned getMask(const char *cp);
+ unsigned getMask(const char *cp) const;
public:
/**
* Get network address associated with this cidr.
@@ -225,7 +225,7 @@
* @param saddr pointer to test.
* @return true if member of cidr.
*/
- bool isMember(struct sockaddr *saddr);
+ bool isMember(const struct sockaddr *saddr) const;
/**
* See if a low level address object is a member of this cidr's net.
@@ -233,14 +233,14 @@
* @param inaddr object to test.
* @return true if member of cidr.
*/
- bool isMember(struct in_addr &inaddr);
-};
+ bool isMember(const struct in_addr &inaddr) const;
-inline bool operator==(struct sockaddr *sa, IPV4Cidr &cidr)
- {return cidr.isMember(sa);};
+ inline bool operator==(const struct sockaddr *a) const
+ {return isMember(a);};
-inline bool operator==(struct in_addr &a, IPV4Cidr &cidr)
- {return cidr.isMember(a);};
+ inline bool operator==(const struct in_addr &a) const
+ {return isMember(a);};
+};
#ifdef CCXX_IPV6
/**
@@ -255,7 +255,7 @@
protected:
struct in6_addr netmask, network;
- unsigned getMask(const char *cp);
+ unsigned getMask(const char *cp) const;
public:
/**
* Get network address associated with this cidr.
@@ -313,7 +313,7 @@
* @param saddr pointer to test.
* @return true if member of cidr.
*/
- bool isMember(struct sockaddr *saddr);
+ bool isMember(const struct sockaddr *saddr) const;
/**
* See if a low level address object is a member of this cidr's net.
@@ -321,14 +321,14 @@
* @param inaddr object to test.
* @return true if member of cidr.
*/
- bool isMember(struct in6_addr &inaddr);
-};
+ bool isMember(const struct in6_addr &inaddr) const;
-inline bool operator==(struct sockaddr *sa, IPV6Cidr &cidr)
- {return cidr.isMember(sa);};
+ inline bool operator==(const struct sockaddr *sa) const
+ {return isMember(sa);};
-inline bool operator==(struct in6_addr &a, IPV6Cidr &cidr)
- {return cidr.isMember(a);};
+ inline bool operator==(const struct in6_addr &a) const
+ {return isMember(a);};
+};
#endif
--- commoncpp2-1.5.1/include/cc++/misc.h 2006-09-30 18:52:17.000000000 +0200
+++ commoncpp2-1.5.3/include/cc++/misc.h 2006-11-21 15:55:26.000000000 +0100
@@ -695,7 +695,7 @@
virtual void *getMemory(size_t size) = 0;
public:
- void *getPointer(const char *id);
+ void *getPointer(const char *id) const;
void setPointer(const char *id, void *data);
};
--- commoncpp2-1.5.1/include/cc++/thread.h 2006-04-27 21:16:53.000000000 +0200
+++ commoncpp2-1.5.3/include/cc++/thread.h 2006-11-21 14:37:09.000000000 +0100
@@ -1410,14 +1410,14 @@
*
* @return true if the thread is still executing.
*/
- bool isRunning(void);
+ bool isRunning(void) const;
/**
* Check if this thread is detached.
*
* @return true if the thread is detached.
*/
- bool isDetached(void);
+ bool isDetached(void) const;
/**
* Blocking call which unlocks when thread terminates.
@@ -1430,7 +1430,7 @@
*
* @return true if the current context is this object.
*/
- bool isThread(void);
+ bool isThread(void) const;
/**
* Get system thread numeric identifier.
@@ -1445,7 +1445,7 @@
*
* @return debug name.
*/
- const char *getName(void)
+ const char *getName(void) const
{return _name;};
/**
@@ -1475,7 +1475,7 @@
{if (th._start) th._start->wait();};
#ifdef WIN32
- bool isCancelled();
+ bool isCancelled() const;
static DWORD waitThread(HANDLE hRef, timeout_t timeout);
#endif