mirror of
https://github.com/davisking/dlib.git
synced 2024-11-01 10:14:53 +08:00
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
This commit is contained in:
parent
89f51930c3
commit
35f117702b
@ -3,33 +3,7 @@
|
||||
#ifndef DLIB_BASe64_
|
||||
#define DLIB_BASe64_
|
||||
|
||||
|
||||
#include "base64/base64_kernel_1.h"
|
||||
|
||||
|
||||
|
||||
namespace dlib
|
||||
{
|
||||
|
||||
|
||||
class base64
|
||||
{
|
||||
|
||||
base64() {}
|
||||
|
||||
|
||||
public:
|
||||
|
||||
//----------- kernels ---------------
|
||||
|
||||
// kernel_1a
|
||||
typedef base64_kernel_1
|
||||
kernel_1a;
|
||||
|
||||
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
#endif // DLIB_BASe64_
|
||||
|
||||
|
@ -13,7 +13,7 @@ namespace dlib
|
||||
|
||||
// ----------------------------------------------------------------------------------------
|
||||
|
||||
base64_kernel_1::line_ending_type base64_kernel_1::
|
||||
base64::line_ending_type base64::
|
||||
line_ending (
|
||||
) const
|
||||
{
|
||||
@ -22,7 +22,7 @@ namespace dlib
|
||||
|
||||
// ----------------------------------------------------------------------------------------
|
||||
|
||||
void base64_kernel_1::
|
||||
void base64::
|
||||
set_line_ending (
|
||||
line_ending_type eol_style_
|
||||
)
|
||||
@ -32,8 +32,8 @@ namespace dlib
|
||||
|
||||
// ----------------------------------------------------------------------------------------
|
||||
|
||||
base64_kernel_1::
|
||||
base64_kernel_1 (
|
||||
base64::
|
||||
base64 (
|
||||
) :
|
||||
encode_table(0),
|
||||
decode_table(0),
|
||||
@ -149,8 +149,8 @@ namespace dlib
|
||||
|
||||
// ----------------------------------------------------------------------------------------
|
||||
|
||||
base64_kernel_1::
|
||||
~base64_kernel_1 (
|
||||
base64::
|
||||
~base64 (
|
||||
)
|
||||
{
|
||||
delete [] encode_table;
|
||||
@ -159,7 +159,7 @@ namespace dlib
|
||||
|
||||
// ----------------------------------------------------------------------------------------
|
||||
|
||||
void base64_kernel_1::
|
||||
void base64::
|
||||
encode (
|
||||
std::istream& in_,
|
||||
std::ostream& out_
|
||||
@ -306,7 +306,7 @@ namespace dlib
|
||||
|
||||
// ----------------------------------------------------------------------------------------
|
||||
|
||||
void base64_kernel_1::
|
||||
void base64::
|
||||
decode (
|
||||
std::istream& in_,
|
||||
std::ostream& out_
|
||||
|
@ -10,7 +10,7 @@
|
||||
namespace dlib
|
||||
{
|
||||
|
||||
class base64_kernel_1
|
||||
class base64
|
||||
{
|
||||
/*!
|
||||
INITIAL VALUE
|
||||
@ -33,14 +33,16 @@ namespace dlib
|
||||
!*/
|
||||
|
||||
public:
|
||||
// this is here for backwards compatibility with older versions of dlib.
|
||||
typedef base64 kernel_1a;
|
||||
|
||||
class decode_error : public dlib::error { public:
|
||||
decode_error( const std::string& e) : error(e) {}};
|
||||
|
||||
base64_kernel_1 (
|
||||
base64 (
|
||||
);
|
||||
|
||||
virtual ~base64_kernel_1 (
|
||||
virtual ~base64 (
|
||||
);
|
||||
|
||||
enum line_ending_type
|
||||
@ -75,8 +77,8 @@ namespace dlib
|
||||
line_ending_type eol_style;
|
||||
|
||||
// restricted functions
|
||||
base64_kernel_1(base64_kernel_1&); // copy constructor
|
||||
base64_kernel_1& operator=(base64_kernel_1&); // assignment operator
|
||||
base64(base64&); // copy constructor
|
||||
base64& operator=(base64&); // assignment operator
|
||||
|
||||
};
|
||||
|
||||
|
@ -196,7 +196,7 @@ LCBleGNlZWRzIHRoZSBzaG9ydCB2ZWhlbWVuY2Ugb2YgYW55IGNhcm5hbCBwbGVhc3VyZS4=";
|
||||
)
|
||||
{
|
||||
print_spinner();
|
||||
base64_kernel_test<base64::kernel_1a>();
|
||||
base64_kernel_test<base64>();
|
||||
}
|
||||
} a;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user