aboutsummaryrefslogtreecommitdiff
path: root/src/trace.cpp
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2008-12-03 17:05:26 +0000
committerMike Buland <eichlan@xagasoft.com>2008-12-03 17:05:26 +0000
commit0bd8b8cf19687229b53e37468dfe36c4217fbbf1 (patch)
tree9597c83c6770473b7dc43b6917a8787f0d4c87c6 /src/trace.cpp
parent6f3b85c5af1855e1695885fb28220c34f6a0673f (diff)
downloadlibbu++-0bd8b8cf19687229b53e37468dfe36c4217fbbf1.tar.gz
libbu++-0bd8b8cf19687229b53e37468dfe36c4217fbbf1.tar.bz2
libbu++-0bd8b8cf19687229b53e37468dfe36c4217fbbf1.tar.xz
libbu++-0bd8b8cf19687229b53e37468dfe36c4217fbbf1.zip
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.
Diffstat (limited to 'src/trace.cpp')
-rw-r--r--src/trace.cpp12
1 files changed, 10 insertions, 2 deletions
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<char>( const char &v )
58{ 58{
59 printf("%hhd", v ); 59 printf("%hhd", v );
60} 60}
61/* 61
62template<> void Bu::__tracer_format<long>( const long &v ) 62template<> void Bu::__tracer_format<long>( const long &v )
63{ 63{
64 printf("%ld", v ); 64 printf("%ld", v );
@@ -67,7 +67,7 @@ template<> void Bu::__tracer_format<long>( const long &v )
67template<> void Bu::__tracer_format<unsigned long>( const unsigned long &v ) 67template<> void Bu::__tracer_format<unsigned long>( const unsigned long &v )
68{ 68{
69 printf("%lu", v ); 69 printf("%lu", v );
70}*/ 70}
71 71
72template<> void Bu::__tracer_format<float>( const float &v ) 72template<> void Bu::__tracer_format<float>( const float &v )
73{ 73{
@@ -93,7 +93,11 @@ template<> void Bu::__tracer_format<char **>( char ** const &v )
93{ 93{
94 printf("["); 94 printf("[");
95 for( int j = 0; v[j]; j++ ) 95 for( int j = 0; v[j]; j++ )
96 {
97 if( j > 0 )
98 printf(", ");
96 printf("\"%s\"", v[j] ); 99 printf("\"%s\"", v[j] );
100 }
97 printf("]"); 101 printf("]");
98} 102}
99 103
@@ -111,6 +115,10 @@ template<> void Bu::__tracer_format<char const **>( char const ** const &v )
111{ 115{
112 printf("["); 116 printf("[");
113 for( int j = 0; v[j]; j++ ) 117 for( int j = 0; v[j]; j++ )
118 {
119 if( j > 0 )
120 printf(", ");
114 printf("\"%s\"", v[j] ); 121 printf("\"%s\"", v[j] );
122 }
115 printf("]"); 123 printf("]");
116} 124}