diff options
author | Mike Buland <eichlan@xagasoft.com> | 2010-05-25 17:45:03 +0000 |
---|---|---|
committer | Mike Buland <eichlan@xagasoft.com> | 2010-05-25 17:45:03 +0000 |
commit | 24ab24777d7cd72b7ff35a9d02cb43e26f006b0d (patch) | |
tree | 09b1e2e72e05ff6e7502f02edb6d3fc6100cc741 /src/myriad.h | |
parent | b4e1fa15d0c809439139db3a60a3969d848dcf77 (diff) | |
download | libbu++-24ab24777d7cd72b7ff35a9d02cb43e26f006b0d.tar.gz libbu++-24ab24777d7cd72b7ff35a9d02cb43e26f006b0d.tar.bz2 libbu++-24ab24777d7cd72b7ff35a9d02cb43e26f006b0d.tar.xz libbu++-24ab24777d7cd72b7ff35a9d02cb43e26f006b0d.zip |
More myriad testing, fixes, arrangement, etc. UnitSuite add-ons, it has some
command line parameters now, I would like to also add an automatic paramter that
would switch it to a computer-readable output mode for use in a larger testing
framework.
Diffstat (limited to 'src/myriad.h')
-rw-r--r-- | src/myriad.h | 31 |
1 files changed, 21 insertions, 10 deletions
diff --git a/src/myriad.h b/src/myriad.h index 900037b..b5cd18c 100644 --- a/src/myriad.h +++ b/src/myriad.h | |||
@@ -19,7 +19,16 @@ namespace Bu | |||
19 | class Stream; | 19 | class Stream; |
20 | class MyriadStream; | 20 | class MyriadStream; |
21 | 21 | ||
22 | subExceptionDecl( MyriadException ) | 22 | subExceptionDeclBegin( MyriadException ) |
23 | enum | ||
24 | { | ||
25 | emptyStream, | ||
26 | invalidFormat, | ||
27 | badVersion, | ||
28 | invalidWordSize, | ||
29 | noSuchStream | ||
30 | }; | ||
31 | subExceptionDeclEnd() | ||
23 | 32 | ||
24 | /** | 33 | /** |
25 | * Numerically Indexed Data Streams. This is a working name so I can | 34 | * Numerically Indexed Data Streams. This is a working name so I can |
@@ -69,18 +78,10 @@ namespace Bu | |||
69 | { | 78 | { |
70 | friend class MyriadStream; | 79 | friend class MyriadStream; |
71 | public: | 80 | public: |
72 | Myriad( Bu::Stream &sStore ); | 81 | Myriad( Bu::Stream &sStore, int iBlockSize=512, int iPreallocate=8 ); |
73 | virtual ~Myriad(); | 82 | virtual ~Myriad(); |
74 | 83 | ||
75 | /** | 84 | /** |
76 | * Initialize this object based on the data already in the assosiated | ||
77 | * stream. This will be called automatically for you if you forget, | ||
78 | * but if you want to pre-initialize for some reason, just call this | ||
79 | * once before you actually start doing anything with your Myriad. | ||
80 | */ | ||
81 | void initialize(); | ||
82 | |||
83 | /** | ||
84 | * Create a new Myriad system in the assosiated stream. This should be | 85 | * Create a new Myriad system in the assosiated stream. This should be |
85 | * used carefully, it will destroy all data already within the stream. | 86 | * used carefully, it will destroy all data already within the stream. |
86 | * More options will probably be added soon. | 87 | * More options will probably be added soon. |
@@ -114,7 +115,17 @@ namespace Bu | |||
114 | */ | 115 | */ |
115 | void sync(); | 116 | void sync(); |
116 | 117 | ||
118 | static bool isMyriad( Bu::Stream &sStore ); | ||
119 | |||
117 | private: | 120 | private: |
121 | /** | ||
122 | * Initialize this object based on the data already in the assosiated | ||
123 | * stream. This will be called automatically for you if you forget, | ||
124 | * but if you want to pre-initialize for some reason, just call this | ||
125 | * once before you actually start doing anything with your Myriad. | ||
126 | */ | ||
127 | void initialize(); | ||
128 | |||
118 | enum | 129 | enum |
119 | { | 130 | { |
120 | blockUnused = 0xFFFFFFFFUL | 131 | blockUnused = 0xFFFFFFFFUL |