Commit 35f11770 authored by Davis King's avatar Davis King

Changed the base64 object so you don't have to say base64::kernel_1a anymore to

declare it.  Now you just say base64.

--HG--
extra : convert_revision : svn%3Afdd8eb12-d10e-0410-9acb-85c331704f74/trunk%404223
parent 89f51930
...@@ -3,33 +3,7 @@ ...@@ -3,33 +3,7 @@
#ifndef DLIB_BASe64_ #ifndef DLIB_BASe64_
#define DLIB_BASe64_ #define DLIB_BASe64_
#include "base64/base64_kernel_1.h" #include "base64/base64_kernel_1.h"
namespace dlib
{
class base64
{
base64() {}
public:
//----------- kernels ---------------
// kernel_1a
typedef base64_kernel_1
kernel_1a;
};
}
#endif // DLIB_BASe64_ #endif // DLIB_BASe64_
...@@ -13,7 +13,7 @@ namespace dlib ...@@ -13,7 +13,7 @@ namespace dlib
// ---------------------------------------------------------------------------------------- // ----------------------------------------------------------------------------------------
base64_kernel_1::line_ending_type base64_kernel_1:: base64::line_ending_type base64::
line_ending ( line_ending (
) const ) const
{ {
...@@ -22,7 +22,7 @@ namespace dlib ...@@ -22,7 +22,7 @@ namespace dlib
// ---------------------------------------------------------------------------------------- // ----------------------------------------------------------------------------------------
void base64_kernel_1:: void base64::
set_line_ending ( set_line_ending (
line_ending_type eol_style_ line_ending_type eol_style_
) )
...@@ -32,8 +32,8 @@ namespace dlib ...@@ -32,8 +32,8 @@ namespace dlib
// ---------------------------------------------------------------------------------------- // ----------------------------------------------------------------------------------------
base64_kernel_1:: base64::
base64_kernel_1 ( base64 (
) : ) :
encode_table(0), encode_table(0),
decode_table(0), decode_table(0),
...@@ -149,8 +149,8 @@ namespace dlib ...@@ -149,8 +149,8 @@ namespace dlib
// ---------------------------------------------------------------------------------------- // ----------------------------------------------------------------------------------------
base64_kernel_1:: base64::
~base64_kernel_1 ( ~base64 (
) )
{ {
delete [] encode_table; delete [] encode_table;
...@@ -159,7 +159,7 @@ namespace dlib ...@@ -159,7 +159,7 @@ namespace dlib
// ---------------------------------------------------------------------------------------- // ----------------------------------------------------------------------------------------
void base64_kernel_1:: void base64::
encode ( encode (
std::istream& in_, std::istream& in_,
std::ostream& out_ std::ostream& out_
...@@ -306,7 +306,7 @@ namespace dlib ...@@ -306,7 +306,7 @@ namespace dlib
// ---------------------------------------------------------------------------------------- // ----------------------------------------------------------------------------------------
void base64_kernel_1:: void base64::
decode ( decode (
std::istream& in_, std::istream& in_,
std::ostream& out_ std::ostream& out_
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
namespace dlib namespace dlib
{ {
class base64_kernel_1 class base64
{ {
/*! /*!
INITIAL VALUE INITIAL VALUE
...@@ -33,14 +33,16 @@ namespace dlib ...@@ -33,14 +33,16 @@ namespace dlib
!*/ !*/
public: public:
// this is here for backwards compatibility with older versions of dlib.
typedef base64 kernel_1a;
class decode_error : public dlib::error { public: class decode_error : public dlib::error { public:
decode_error( const std::string& e) : error(e) {}}; decode_error( const std::string& e) : error(e) {}};
base64_kernel_1 ( base64 (
); );
virtual ~base64_kernel_1 ( virtual ~base64 (
); );
enum line_ending_type enum line_ending_type
...@@ -75,8 +77,8 @@ namespace dlib ...@@ -75,8 +77,8 @@ namespace dlib
line_ending_type eol_style; line_ending_type eol_style;
// restricted functions // restricted functions
base64_kernel_1(base64_kernel_1&); // copy constructor base64(base64&); // copy constructor
base64_kernel_1& operator=(base64_kernel_1&); // assignment operator base64& operator=(base64&); // assignment operator
}; };
......
...@@ -196,7 +196,7 @@ LCBleGNlZWRzIHRoZSBzaG9ydCB2ZWhlbWVuY2Ugb2YgYW55IGNhcm5hbCBwbGVhc3VyZS4="; ...@@ -196,7 +196,7 @@ LCBleGNlZWRzIHRoZSBzaG9ydCB2ZWhlbWVuY2Ugb2YgYW55IGNhcm5hbCBwbGVhc3VyZS4=";
) )
{ {
print_spinner(); print_spinner();
base64_kernel_test<base64::kernel_1a>(); base64_kernel_test<base64>();
} }
} a; } a;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment