linuxdcpp-team team mailing list archive
-
linuxdcpp-team team
-
Mailing list archive
-
Message #05075
[Branch ~dcplusplus-team/dcplusplus/trunk] Rev 2762: Intellisense help for getset (*sigh*)
------------------------------------------------------------
revno: 2762
committer: Jacek Sieka <arnetheduck@xxxxxxxxx>
branch nick: dcplusplus
timestamp: Tue 2011-12-27 21:47:59 +0100
message:
Intellisense help for getset (*sigh*)
modified:
dcpp/GetSet.h
--
lp:dcplusplus
https://code.launchpad.net/~dcplusplus-team/dcplusplus/trunk
Your team Dcplusplus-team is subscribed to branch lp:dcplusplus.
To unsubscribe from this branch go to https://code.launchpad.net/~dcplusplus-team/dcplusplus/trunk/+edit-subscription
=== modified file 'dcpp/GetSet.h'
--- dcpp/GetSet.h 2011-12-25 17:31:16 +0000
+++ dcpp/GetSet.h 2011-12-27 20:47:59 +0000
@@ -35,6 +35,8 @@
#include <boost/mpl/if.hpp>
#include <type_traits>
+#ifndef DCPLUSPLUS_SIMPLE_GETSET
+
#define GETSET(t, name, name2) \
private: t name; \
public: boost::mpl::if_c<std::is_class<t>::value, const t&, t>::type get##name2() const { return name; } \
@@ -48,4 +50,13 @@
template<typename GetSetT> typename std::enable_if<std::is_class<GetSetT>::value, void>::type \
set##name2(const GetSetT& name) { this->name = name; } /* large type: copy the parameter */
+#else
+
+// This version is for my stupid editor =)
+#define GETSET(t, name, name2) \
+ private: t name; \
+ public: t get##name2() const; void set##name2(t name);
+
+#endif
+
#endif /* GETSET_H_ */