MCPcopy Create free account
hub / github.com/devosoft/avida / cCharProxy

Class cCharProxy

avida-core/source/tools/cString.h:54–71  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

52
53 // cCharProxy -- To detect rvalue vs lvalue ---------------------
54 class cCharProxy
55 {
56 private:
57 cString& string;
58 int index;
59
60 public:
61 cCharProxy(cString& _string, int _index) : string(_string), index(_index) { ; }
62
63 inline cCharProxy& operator=(char c); // lvalue
64 inline cCharProxy& operator+=(char c); // lvalue
65 inline cCharProxy& operator-=(char c); // lvalue
66 inline cCharProxy& operator++(); // lvalue (prefix)
67 inline char operator++(int dummy); // lvalue (postfix)
68 inline cCharProxy& operator--(); // lvalue (prefix)
69 inline char operator--(int dummy); // lvalue (postfix)
70 inline operator char () const; // rvalue
71 };
72 friend class cCharProxy; // Telling rvalue vs lvalue ....
73
74 // cStringData -- Holds the actual data and is reference count --

Callers 1

operator[]Method · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected