![]() |
set_t Class ReferenceImplements MySQL SET datatype. More...
Collaboration diagram for set_t: ![]()
Detailed DescriptionImplements MySQL SET datatype.
Definition at line 47 of file set_t.h. Constructor & Destructor Documentation
Member Function Documentation
Definition at line 80 of file set_t.cpp. References m_mmap, m_strvalue, and m_value. Referenced by c_str(). 00081 { 00082 std::string str; 00083 for (std::map<std::string, uint64_t>::iterator it = m_mmap.begin(); it != m_mmap.end(); it++) 00084 { 00085 std::string tmp = (*it).first; 00086 uint64_t bit = (*it).second; 00087 if (m_value & bit) 00088 { 00089 if (str.size()) 00090 str += ","; 00091 str += tmp; 00092 } 00093 } 00094 m_strvalue = str; 00095 return m_strvalue; 00096 }
Definition at line 45 of file set_t.cpp. References m_mmap, and m_value. 00046 { 00047 size_t x = 0; 00048 size_t i; 00049 m_value = 0; 00050 for (i = 0; i < str.size(); i++) 00051 { 00052 if (str[i] == ',') 00053 { 00054 m_value |= m_mmap[str.substr(x,i - x)]; 00055 x = i + 1; 00056 } 00057 } 00058 m_value |= m_mmap[str.substr(x,i - x)]; 00059 }
Definition at line 119 of file set_t.cpp. References m_mmap, and m_value. 00120 { 00121 size_t x = 0; 00122 size_t i; 00123 for (i = 0; i < str.size(); i++) 00124 { 00125 if (str[i] == ',') 00126 { 00127 m_value |= m_mmap[str.substr(x,i - x)]; 00128 x = i + 1; 00129 } 00130 } 00131 m_value |= m_mmap[str.substr(x,i - x)]; 00132 }
Definition at line 135 of file set_t.cpp. References m_mmap, and m_value. 00136 { 00137 size_t x = 0; 00138 size_t i; 00139 for (i = 0; i < str.size(); i++) 00140 { 00141 if (str[i] == ',') 00142 { 00143 m_value &= ~m_mmap[str.substr(x,i - x)]; 00144 x = i + 1; 00145 } 00146 } 00147 m_value &= ~m_mmap[str.substr(x,i - x)]; 00148 }
Member Data Documentation
Definition at line 66 of file set_t.h. Referenced by in_set(), operator+=(), operator-=(), operator=(), and String().
Definition at line 67 of file set_t.h. Referenced by in_set(), operator &=(), operator+=(), operator-=(), operator=(), operator|=(), String(), and Value().
The documentation for this class was generated from the following files: |