60 virtual std::size_t capacity()
const = 0;
61 virtual std::size_t size() = 0;
62 virtual const T* c_str()
const = 0;
63 virtual T* data() = 0;
64 virtual void copy(
const T * s ) = 0;
65 virtual void clear() = 0;
66 virtual void append(
const T* s) = 0;
67 virtual T& operator[](std::size_t ix) = 0;
68 virtual const T& operator[](std::size_t ix)
const = 0;
71 typedef const T* const_iterator;
74 { copy(s.c_str());
return(*
this); }
76 { copy(s);
return(*
this); }
79 { s1.comp(s2.c_str());
return(s1); }
81 {
return(comp(s) == 0); }
82 bool operator==(
const T* s)
83 {
return(comp(s) == 0); }
94 template<
class T, std::
size_t N>
99 typedef typename fixed_string_base<T>::iterator iterator;
100 typedef typename fixed_string_base<T>::const_iterator const_iterator;
108 {
if (m_len >= 0)
return;
109 for (m_len = 0; m_len < N && m_str[m_len]; m_len++)
114 void invalidate_len()
144 this->operator +=(ch);
152 const T* c_str()
const 161 std::size_t capacity()
const 178 void operator+=(
const T& ch)
182 throw(std::length_error(
"fixed_string +="));
191 T& operator[](std::size_t ix)
196 throw(std::length_error(
"fixed_string []"));
199 const T& operator[](std::size_t ix)
const 203 throw(std::length_error(
"fixed_string []"));
207 iterator begin() {
return(&m_str[0]); }
208 const iterator begin()
const {
return(&m_str[0]); }
209 iterator end() {
return(begin() + size() + 1); }
210 const iterator end()
const {
return(begin() + size() + 1); }
218 void copy(
const T* s)
231 void append(
const T* s)
233 for (
int i=0; s[i] !=0; i++)
239 inline int comp(
const char* s)
const 241 return(compare(c_str(),s));
245 return(compare(c_str(),s,c_str()));
different physics engine has different winding order.
Definition: EventBinding.h:32
Definition: fixed_string.hpp:95
Definition: fixed_string.hpp:57