From 0861fdb652408dcdbd2e7b60513f3fa24696e610 Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Mon, 25 Jan 2010 16:42:40 +0000 Subject: The order of key, object in all of the cache related systems has beed fixed, key just belongs first, that's all there is to it. --- src/cachestorenids.h | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'src/cachestorenids.h') diff --git a/src/cachestorenids.h b/src/cachestorenids.h index ae2b9a2..0d104cf 100644 --- a/src/cachestorenids.h +++ b/src/cachestorenids.h @@ -19,16 +19,16 @@ namespace Bu { - template + template keytype __cacheGetKey( const obtype *pObj ); - template + template obtype *__cacheStoreNidsAlloc( const keytype &key ) { return new obtype(); } - template + template void __cacheStoreNidsStore( Bu::Stream &s, obtype &rObj, const keytype & ) { @@ -36,17 +36,17 @@ namespace Bu ar << rObj; } - template + template obtype *__cacheStoreNidsLoad( Bu::Stream &s, const keytype &key ) { - obtype *pObj = __cacheStoreNidsAlloc( key ); + obtype *pObj = __cacheStoreNidsAlloc( key ); Bu::Archive ar( s, Bu::Archive::load ); ar >> (*pObj); return pObj; } - template - class CacheStoreNids : public CacheStore + template + class CacheStoreNids : public CacheStore { public: CacheStoreNids( Bu::Stream &sArch, @@ -83,7 +83,7 @@ namespace Bu { int iStream = hId.get( key ); NidsStream ns = nStore.openStream( iStream ); - obtype *pOb = __cacheStoreNidsLoad( ns, key ); + obtype *pOb = __cacheStoreNidsLoad( ns, key ); return pOb; } @@ -91,17 +91,17 @@ namespace Bu { int iStream = hId.get( key ); NidsStream ns = nStore.openStream( iStream ); - __cacheStoreNidsStore( ns, *pObj, key ); + __cacheStoreNidsStore( ns, *pObj, key ); delete pObj; } virtual keytype create( obtype *pSrc ) { - keytype key = __cacheGetKey( pSrc ); + keytype key = __cacheGetKey( pSrc ); int iStream = nStore.createStream(); hId.insert( key, iStream ); NidsStream ns = nStore.openStream( iStream ); - __cacheStoreNidsStore( ns, *pSrc, key ); + __cacheStoreNidsStore( ns, *pSrc, key ); return key; } @@ -118,7 +118,7 @@ namespace Bu { int iStream = hId.get( key ); NidsStream ns = nStore.openStream( iStream ); - __cacheStoreNidsStore( ns, *pSrc, key ); + __cacheStoreNidsStore( ns, *pSrc, key ); } virtual void destroy( obtype *pObj, const keytype &key ) -- cgit v1.2.3