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/tests | |
| 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 '')
| -rw-r--r-- | src/tests/atom.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/tests/atom.cpp b/src/tests/atom.cpp index cf076b1..2077bfd 100644 --- a/src/tests/atom.cpp +++ b/src/tests/atom.cpp | |||
| @@ -2,10 +2,18 @@ | |||
| 2 | #include <stdio.h> | 2 | #include <stdio.h> |
| 3 | #include <stdlib.h> | 3 | #include <stdlib.h> |
| 4 | 4 | ||
| 5 | typedef struct bob | ||
| 6 | { | ||
| 7 | int a, b; | ||
| 8 | } bob; | ||
| 5 | int main() | 9 | int main() |
| 6 | { | 10 | { |
| 7 | Bu::Atom<int> aInt; | 11 | Bu::Atom<int> aInt; |
| 8 | Bu::Atom<char *> aStr; | 12 | Bu::Atom<char *> aStr; |
| 13 | Bu::Atom<bob> aBob; | ||
| 14 | |||
| 15 | aBob = bob(); | ||
| 16 | aBob->a = 5; | ||
| 9 | 17 | ||
| 10 | aStr.set("Hey there, dude"); | 18 | aStr.set("Hey there, dude"); |
| 11 | aInt.set( 55 ); | 19 | aInt.set( 55 ); |
