Base64Encoder.hpp

Go to the documentation of this file.
00001 #pragma ident "$Id: Base64Encoder.hpp 1644 2009-01-27 19:26:14Z ckiesch $"
00002 
00005 
00006 //============================================================================
00007 //
00008 //  This file is part of GPSTk, the GPS Toolkit.
00009 //
00010 //  The GPSTk is free software; you can redistribute it and/or modify
00011 //  it under the terms of the GNU Lesser General Public License as published
00012 //  by the Free Software Foundation; either version 2.1 of the License, or
00013 //  any later version.
00014 //
00015 //  The GPSTk is distributed in the hope that it will be useful,
00016 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 //  GNU Lesser General Public License for more details.
00019 //
00020 //  You should have received a copy of the GNU Lesser General Public
00021 //  License along with GPSTk; if not, write to the Free Software Foundation,
00022 //  Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 //  
00024 //  Copyright 2004, The University of Texas at Austin
00025 //
00026 //============================================================================
00027 
00028 
00029 #ifndef VDRAW_BASE64ENCODER_H
00030 #define VDRAW_BASE64ENCODER_H
00031 
00032 #include<string>
00033 #include<sstream>
00034 
00035 #include "VDrawException.hpp"
00036 
00037 namespace vdraw
00038 {
00041 
00045   class Base64Encoder 
00046   {
00047 
00048     public:
00050       static const std::string encode_string;
00051 
00053       static char encode6(long s) { return encode_string[s&0x3F]; }      
00054 
00056       static std::string encode(const std::string &str);
00057 
00058 
00059   }; // class Base64Encoder
00060 
00062 
00063 } // namespace vdraw
00064 
00065 #endif //VDRAW_BASE64ENCODER_H
00066 

Generated on Wed Feb 8 03:30:57 2012 for GPS ToolKit Software Library by  doxygen 1.3.9.1