diff options
author | Mike Buland <eichlan@xagasoft.com> | 2007-06-18 22:49:39 +0000 |
---|---|---|
committer | Mike Buland <eichlan@xagasoft.com> | 2007-06-18 22:49:39 +0000 |
commit | 8a7fed8386c152023ddae611fe274b966287370a (patch) | |
tree | 0f6029b5a7d8795469f27ebfb37a00db3a23b8a6 /src/atom.h | |
parent | 33012c4ef4d39efad4fbc2b19f494f5c860fff51 (diff) | |
download | libbu++-8a7fed8386c152023ddae611fe274b966287370a.tar.gz libbu++-8a7fed8386c152023ddae611fe274b966287370a.tar.bz2 libbu++-8a7fed8386c152023ddae611fe274b966287370a.tar.xz libbu++-8a7fed8386c152023ddae611fe274b966287370a.zip |
Added more helper guys to atom, it seems weird, but I think it's ok...
Diffstat (limited to 'src/atom.h')
-rw-r--r-- | src/atom.h | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -84,6 +84,20 @@ namespace Bu | |||
84 | return *this; | 84 | return *this; |
85 | } | 85 | } |
86 | 86 | ||
87 | t *operator ->() | ||
88 | { | ||
89 | if( !pData ) | ||
90 | throw Bu::ExceptionBase("Not set"); | ||
91 | return pData; | ||
92 | } | ||
93 | |||
94 | t &operator *() | ||
95 | { | ||
96 | if( !pData ) | ||
97 | throw Bu::ExceptionBase("Not set"); | ||
98 | return *pData; | ||
99 | } | ||
100 | |||
87 | private: | 101 | private: |
88 | t *pData; | 102 | t *pData; |
89 | talloc ta; | 103 | talloc ta; |