From 0bd8b8cf19687229b53e37468dfe36c4217fbbf1 Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Wed, 3 Dec 2008 17:05:26 +0000 Subject: Alright, the caching system now passes the basic CRUD tests with arbitrary keytypes. It doesn't yet use the stackable CacheStore concept, but the code is all in place to make it easy to switch to. There also needs to be some more accounting code in place, so that we can actually use the Schedulers, whatever they happen to be called in the future. A whacky side note, it turns out that we totally need to ensure an object is loaded from the cache in order to delete it, we can't ensure that any references to other objects that are in the cache will be loaded otherwise. --- src/trace.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'src/trace.cpp') diff --git a/src/trace.cpp b/src/trace.cpp index dab53d6..242d110 100644 --- a/src/trace.cpp +++ b/src/trace.cpp @@ -58,7 +58,7 @@ template<> void Bu::__tracer_format( const char &v ) { printf("%hhd", v ); } -/* + template<> void Bu::__tracer_format( const long &v ) { printf("%ld", v ); @@ -67,7 +67,7 @@ template<> void Bu::__tracer_format( const long &v ) template<> void Bu::__tracer_format( const unsigned long &v ) { printf("%lu", v ); -}*/ +} template<> void Bu::__tracer_format( const float &v ) { @@ -93,7 +93,11 @@ template<> void Bu::__tracer_format( char ** const &v ) { printf("["); for( int j = 0; v[j]; j++ ) + { + if( j > 0 ) + printf(", "); printf("\"%s\"", v[j] ); + } printf("]"); } @@ -111,6 +115,10 @@ template<> void Bu::__tracer_format( char const ** const &v ) { printf("["); for( int j = 0; v[j]; j++ ) + { + if( j > 0 ) + printf(", "); printf("\"%s\"", v[j] ); + } printf("]"); } -- cgit v1.2.3