aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2007-04-10 13:53:18 +0000
committerMike Buland <eichlan@xagasoft.com>2007-04-10 13:53:18 +0000
commit5a0d7856dc265580cebaa833e0367d03ef21bbc3 (patch)
treeebd127d25b3658d3f0417cdb1706e0049a9a28de
parent997f13ec4791adcda91cd4db41cdb5962b73d47d (diff)
downloadlibbu++-5a0d7856dc265580cebaa833e0367d03ef21bbc3.tar.gz
libbu++-5a0d7856dc265580cebaa833e0367d03ef21bbc3.tar.bz2
libbu++-5a0d7856dc265580cebaa833e0367d03ef21bbc3.tar.xz
libbu++-5a0d7856dc265580cebaa833e0367d03ef21bbc3.zip
Woo, changed the name of Achable to Archival, I dig that, and added the ground-
work for the SSocket, that should be cool.
Diffstat (limited to '')
-rw-r--r--src/archable.cpp10
-rw-r--r--src/archival.cpp10
-rw-r--r--src/archival.h (renamed from src/archable.h)13
-rw-r--r--src/archive.cpp6
-rw-r--r--src/archive.h8
-rw-r--r--src/fstring.h4
-rw-r--r--src/hash.h2
-rw-r--r--src/ssocket.cpp9
-rw-r--r--src/ssocket.h24
9 files changed, 61 insertions, 25 deletions
diff --git a/src/archable.cpp b/src/archable.cpp
deleted file mode 100644
index 38fc31f..0000000
--- a/src/archable.cpp
+++ /dev/null
@@ -1,10 +0,0 @@
1#include "archable.h"
2
3Bu::Archable::Archable()
4{
5}
6
7Bu::Archable::~Archable()
8{
9}
10
diff --git a/src/archival.cpp b/src/archival.cpp
new file mode 100644
index 0000000..79c28f1
--- /dev/null
+++ b/src/archival.cpp
@@ -0,0 +1,10 @@
1#include "archival.h"
2
3Bu::Archival::Archival()
4{
5}
6
7Bu::Archival::~Archival()
8{
9}
10
diff --git a/src/archable.h b/src/archival.h
index ed05a78..e2c803c 100644
--- a/src/archable.h
+++ b/src/archival.h
@@ -1,5 +1,5 @@
1#ifndef ARCHABLE_H 1#ifndef ARCHIVAL_H
2#define ARCHABLE_H 2#define ARCHIVAL_H
3 3
4namespace Bu 4namespace Bu
5{ 5{
@@ -7,19 +7,22 @@ namespace Bu
7 * The base class for any class you want to archive. Simply include this as 7 * The base class for any class you want to archive. Simply include this as
8 * a base class, implement the purely virtual archive function and you've 8 * a base class, implement the purely virtual archive function and you've
9 * got an easily archiveable class. 9 * got an easily archiveable class.
10 *
11 * Archival: "of or pertaining to archives or valuable records; contained
12 * in or comprising such archives or records."
10 */ 13 */
11 class Archable 14 class Archival
12 { 15 {
13 public: 16 public:
14 /** 17 /**
15 * Does nothing, here for completeness. 18 * Does nothing, here for completeness.
16 */ 19 */
17 Archable(); 20 Archival();
18 21
19 /** 22 /**
20 * Here to ensure the deconstructor is virtual. 23 * Here to ensure the deconstructor is virtual.
21 */ 24 */
22 virtual ~Archable(); 25 virtual ~Archival();
23 26
24 /** 27 /**
25 * This is the main workhorse of the archive system, just override and 28 * This is the main workhorse of the archive system, just override and
diff --git a/src/archive.cpp b/src/archive.cpp
index be06c0e..edc8625 100644
--- a/src/archive.cpp
+++ b/src/archive.cpp
@@ -312,20 +312,20 @@ Bu::Archive &Bu::Archive::operator&&(long double &p)
312} 312}
313 313
314 314
315Bu::Archive &Bu::operator<<(Bu::Archive &s, Bu::Archable &p) 315Bu::Archive &Bu::operator<<(Bu::Archive &s, Bu::Archival &p)
316{ 316{
317 p.archive( s ); 317 p.archive( s );
318 return s; 318 return s;
319} 319}
320 320
321Bu::Archive &Bu::operator>>(Bu::Archive &s, Bu::Archable &p) 321Bu::Archive &Bu::operator>>(Bu::Archive &s, Bu::Archival &p)
322{ 322{
323 p.archive( s ); 323 p.archive( s );
324 return s; 324 return s;
325} 325}
326 326
327/* 327/*
328Bu::Archive &Bu::operator&&(Bu::Archive &s, Bu::Archable &p) 328Bu::Archive &Bu::operator&&(Bu::Archive &s, Bu::Archival &p)
329{ 329{
330 if (s.isLoading()) 330 if (s.isLoading())
331 { 331 {
diff --git a/src/archive.h b/src/archive.h
index 26e430b..a8ce53e 100644
--- a/src/archive.h
+++ b/src/archive.h
@@ -3,7 +3,7 @@
3 3
4#include <stdint.h> 4#include <stdint.h>
5#include <string> 5#include <string>
6#include "archable.h" 6#include "archival.h"
7#include "stream.h" 7#include "stream.h"
8 8
9namespace Bu 9namespace Bu
@@ -73,9 +73,9 @@ namespace Bu
73 Stream &rStream; 73 Stream &rStream;
74 }; 74 };
75 75
76 Archive &operator<<(Archive &, class Bu::Archable &); 76 Archive &operator<<(Archive &, class Bu::Archival &);
77 Archive &operator>>(Archive &, class Bu::Archable &); 77 Archive &operator>>(Archive &, class Bu::Archival &);
78 //Archive &operator&&(Archive &s, class Bu::Archable &p); 78 //Archive &operator&&(Archive &s, class Bu::Archival &p);
79 79
80 Archive &operator<<(Archive &, std::string &); 80 Archive &operator<<(Archive &, std::string &);
81 Archive &operator>>(Archive &, std::string &); 81 Archive &operator>>(Archive &, std::string &);
diff --git a/src/fstring.h b/src/fstring.h
index 717068f..0184301 100644
--- a/src/fstring.h
+++ b/src/fstring.h
@@ -3,7 +3,7 @@
3 3
4#include <stdint.h> 4#include <stdint.h>
5#include <memory> 5#include <memory>
6#include "archable.h" 6#include "archival.h"
7#include "archive.h" 7#include "archive.h"
8#include "hash.h" 8#include "hash.h"
9 9
@@ -29,7 +29,7 @@ namespace Bu
29 * FBasicString into a ref-counting container class. 29 * FBasicString into a ref-counting container class.
30 */ 30 */
31 template< typename chr, typename chralloc=std::allocator<chr>, typename chunkalloc=std::allocator<struct FStringChunk<chr> > > 31 template< typename chr, typename chralloc=std::allocator<chr>, typename chunkalloc=std::allocator<struct FStringChunk<chr> > >
32 class FBasicString : public Archable 32 class FBasicString : public Archival
33 { 33 {
34#ifndef VALTEST 34#ifndef VALTEST
35#define cpy( dest, src, size ) memcpy( dest, src, size*sizeof(chr) ) 35#define cpy( dest, src, size ) memcpy( dest, src, size*sizeof(chr) )
diff --git a/src/hash.h b/src/hash.h
index 9e498f1..dc097df 100644
--- a/src/hash.h
+++ b/src/hash.h
@@ -8,7 +8,7 @@
8#include <list> 8#include <list>
9#include <utility> 9#include <utility>
10#include "exceptionbase.h" 10#include "exceptionbase.h"
11#include "archable.h" 11#include "archival.h"
12#include "archive.h" 12#include "archive.h"
13 13
14#define bitsToBytes( n ) (n/32+(n%32>0 ? 1 : 0)) 14#define bitsToBytes( n ) (n/32+(n%32>0 ? 1 : 0))
diff --git a/src/ssocket.cpp b/src/ssocket.cpp
new file mode 100644
index 0000000..bdaac24
--- /dev/null
+++ b/src/ssocket.cpp
@@ -0,0 +1,9 @@
1#include "ssocket.h"
2
3SSocket::SSocket()
4{
5}
6
7SSocket::~SSocket()
8{
9}
diff --git a/src/ssocket.h b/src/ssocket.h
new file mode 100644
index 0000000..ce02091
--- /dev/null
+++ b/src/ssocket.h
@@ -0,0 +1,24 @@
1#ifndef S_SOCKET_H
2#define S_SOCKET_H
3
4#include <stdint.h>
5
6#include "stream.h"
7
8namespace Bu
9{
10 /**
11 *
12 */
13 class SSocket : public Stream
14 {
15 public:
16 SSocket();
17 virtual ~SSocket();
18
19 private:
20
21 };
22}
23
24#endif