ftc/include/ftc/AccessKey.h

00001 // -*- coding: iso-8859-1-unix -*-
00002 #ifndef ACCESSKEY_V1_04_01_H_
00003 #define ACCESSKEY_V1_04_01_H_
00004 
00005 #if defined(_MSC_VER) && (_MSC_VER >= 1020)
00006 # pragma once
00007 #endif
00008 
00009 #include <boost/cstdint.hpp>
00010 #include <vector>
00011 
00012 namespace tecgraf { namespace ftc { namespace v1_04_01 {
00013 
00031   class AccessKey {
00032   public:
00034     static const uint8_t DEFAULT_SIZE = 16U;
00036     static const uint8_t MAX_SIZE = 255U;
00037 
00044     AccessKey();
00045 
00051     AccessKey(AccessKey const& key);
00052 
00063     AccessKey(unsigned char * new_key, uint8_t size, bool copy);
00064 
00072     AccessKey(const std::vector<uint8_t>& new_key);
00073 
00077     ~AccessKey();
00078 
00084     const unsigned char * key() const;
00085 
00091     uint8_t size() const;
00092 
00093     AccessKey & operator=(AccessKey const &);
00094     bool operator==(AccessKey const &) const;
00095     bool operator<=(AccessKey const &) const;
00096     bool operator>=(AccessKey const &) const;
00097     bool operator<(AccessKey const &) const;
00098     bool operator>(AccessKey const &) const;
00099   private:
00100     unsigned char *m_key;
00101     uint8_t m_size;
00102     bool deleteKey;
00103   };
00104 
00108   class key_less_comp
00109   {
00110   public:
00111     bool operator() (const AccessKey* lhs, const AccessKey* rhs) const 
00112     {
00113       return ((*lhs) < (*rhs));
00114     }
00115   };
00116 
00117 }}}
00118 
00119 #endif
00120 

Gerado em Mon Feb 3 03:15:08 2014 para FTC[C++] por  doxygen 1.4.7