alternative Standard Libary  0.29.8
std::fast_type< Bits, TBaseType > Template-Klassenreferenz

#include <fast_type.hpp>

+ Zusammengehörigkeiten von std::fast_type< Bits, TBaseType >:

Öffentliche Typen

using self_type = fast_type< Bits, TBaseType >
 
using value_type = TBaseType
 
using bit_type = fbit
 

Öffentliche Methoden

 fast_type (value_type v)
 
 fast_type (const fast_type &c)
 
unsigned int count ()
 
unsigned int zeros ()
 
unsigned int set (size_t pos, bool p)
 
size_t size ()
 
value_typeoperator[] (const size_t p)
 
self_typeoperator= (value_type &v)
 
self_typeoperator= (self_type &other)
 
bool operator== (self_type &other)
 
bool operator!= (self_type &other)
 
bool operator<= (self_type &other)
 
bool operator>= (self_type &other)
 
bool operator< (self_type &other)
 
bool operator> (self_type &other)
 
self_typeoperator+= (self_type &other)
 
self_typeoperator-= (self_type &other)
 
self_typeoperator*= (self_type &other)
 
self_typeoperator&= (self_type &other)
 
self_typeoperator|= (self_type &other)
 
self_typeoperator^= (self_type &other)
 
self_typeoperator<<= (self_type &other)
 
self_typeoperator>>= (self_type &other)
 
self_typeoperator/= (self_type &other)
 
self_typeoperator+= (value_type &v)
 
self_typeoperator-= (value_type &v)
 
self_typeoperator*= (value_type &v)
 
self_typeoperator/= (value_type &v)
 
self_typeoperator<<= (value_type &v)
 
self_typeoperator>>= (value_type &v)
 
self_typeoperator- (const self_type &rhs)
 
self_typeoperator+ (const self_type &rhs)
 
self_typeoperator* (const self_type &rhs)
 
self_typeoperator/ (const self_type &rhs)
 
self_typeoperator<< (const self_type &rhs)
 
self_typeoperator>> (const self_type &rhs)
 
self_typeoperator| (const self_type &rhs)
 
self_typeoperator^ (const self_type &rhs)
 
self_typeoperator& (const self_type &rhs)
 
self_typeoperator~ ()
 
self_typeoperator++ ()
 
self_typeoperator-- ()
 
self_typeoperator~ ()
 

Öffentliche Attribute

union {
   value_type   Value
 
   bit_type   bits [Bits]
 
}; 
 

Ausführliche Beschreibung

template<size_t Bits, typename TBaseType>
class std::fast_type< Bits, TBaseType >

Dokumentation der benutzerdefinierten Datentypen

◆ bit_type

template<size_t Bits, typename TBaseType >
using std::fast_type< Bits, TBaseType >::bit_type = fbit

◆ self_type

template<size_t Bits, typename TBaseType >
using std::fast_type< Bits, TBaseType >::self_type = fast_type<Bits, TBaseType>

◆ value_type

template<size_t Bits, typename TBaseType >
using std::fast_type< Bits, TBaseType >::value_type = TBaseType

Beschreibung der Konstruktoren und Destruktoren

◆ fast_type() [1/2]

template<size_t Bits, typename TBaseType >
std::fast_type< Bits, TBaseType >::fast_type ( value_type  v)
inlineexplicit
74 : Value(v) {}
value_type Value
Definition: fast_type.hpp:71

◆ fast_type() [2/2]

template<size_t Bits, typename TBaseType >
std::fast_type< Bits, TBaseType >::fast_type ( const fast_type< Bits, TBaseType > &  c)
inline
75  {
76  Value = c.Value;
77  }
value_type Value
Definition: fast_type.hpp:71

Dokumentation der Elementfunktionen

◆ count()

template<size_t Bits, typename TBaseType >
unsigned int std::fast_type< Bits, TBaseType >::count ( )
inline
79  {
80  unsigned int i;
81  for(int j = 0; j < Bits; j++)
82  i += bits[i].bit;
83  return i;
84  }
bit_type bits[Bits]
Definition: fast_type.hpp:72

◆ operator!=()

template<size_t Bits, typename TBaseType >
bool std::fast_type< Bits, TBaseType >::operator!= ( self_type other)
inline
107  {
108  return Value != other.Value;
109  }
value_type Value
Definition: fast_type.hpp:71

◆ operator&()

template<size_t Bits, typename TBaseType >
self_type& std::fast_type< Bits, TBaseType >::operator & ( const self_type rhs)
inline
196  {
197  self_type result = self_type(*this);
198  result.Value &= rhs.Value;
199  return result;
200  }
fast_type< Bits, TBaseType > self_type
Definition: fast_type.hpp:66

◆ operator&=()

template<size_t Bits, typename TBaseType >
self_type& std::fast_type< Bits, TBaseType >::operator &= ( self_type other)
inline
132  {
133  Value &= other.Value; return *this;
134  }
value_type Value
Definition: fast_type.hpp:71

◆ operator*()

template<size_t Bits, typename TBaseType >
self_type& std::fast_type< Bits, TBaseType >::operator* ( const self_type rhs)
inline
174  {
175  return self_type(*this) *= rhs;
176  }
fast_type< Bits, TBaseType > self_type
Definition: fast_type.hpp:66

◆ operator*=() [1/2]

template<size_t Bits, typename TBaseType >
self_type& std::fast_type< Bits, TBaseType >::operator*= ( self_type other)
inline
129  {
130  Value *= other.Value; return *this;
131  }
value_type Value
Definition: fast_type.hpp:71

◆ operator*=() [2/2]

template<size_t Bits, typename TBaseType >
self_type& std::fast_type< Bits, TBaseType >::operator*= ( value_type v)
inline
156  {
157  Value *= v; return *this;
158  }
value_type Value
Definition: fast_type.hpp:71

◆ operator+()

template<size_t Bits, typename TBaseType >
self_type& std::fast_type< Bits, TBaseType >::operator+ ( const self_type rhs)
inline
171  {
172  return self_type(*this) += rhs;
173  }
fast_type< Bits, TBaseType > self_type
Definition: fast_type.hpp:66

◆ operator++()

template<size_t Bits, typename TBaseType >
self_type& std::fast_type< Bits, TBaseType >::operator++ ( )
inline
207  {
208  Value++; return *this;
209  }
value_type Value
Definition: fast_type.hpp:71

◆ operator+=() [1/2]

template<size_t Bits, typename TBaseType >
self_type& std::fast_type< Bits, TBaseType >::operator+= ( self_type other)
inline
123  {
124  Value += other.Value; return *this;
125  }
value_type Value
Definition: fast_type.hpp:71

◆ operator+=() [2/2]

template<size_t Bits, typename TBaseType >
self_type& std::fast_type< Bits, TBaseType >::operator+= ( value_type v)
inline
150  {
151  Value += v; return *this;
152  }
value_type Value
Definition: fast_type.hpp:71

◆ operator-()

template<size_t Bits, typename TBaseType >
self_type& std::fast_type< Bits, TBaseType >::operator- ( const self_type rhs)
inline
168  {
169  return self_type(*this) -= rhs;
170  }
fast_type< Bits, TBaseType > self_type
Definition: fast_type.hpp:66

◆ operator--()

template<size_t Bits, typename TBaseType >
self_type& std::fast_type< Bits, TBaseType >::operator-- ( )
inline
210  {
211  Value--; return *this;
212  }
value_type Value
Definition: fast_type.hpp:71

◆ operator-=() [1/2]

template<size_t Bits, typename TBaseType >
self_type& std::fast_type< Bits, TBaseType >::operator-= ( self_type other)
inline
126  {
127  Value -= other.Value; return *this;
128  }
value_type Value
Definition: fast_type.hpp:71

◆ operator-=() [2/2]

template<size_t Bits, typename TBaseType >
self_type& std::fast_type< Bits, TBaseType >::operator-= ( value_type v)
inline
153  {
154  Value -= v; return *this;
155  }
value_type Value
Definition: fast_type.hpp:71

◆ operator/()

template<size_t Bits, typename TBaseType >
self_type& std::fast_type< Bits, TBaseType >::operator/ ( const self_type rhs)
inline
177  {
178  return self_type(*this) /= rhs;
179  }
fast_type< Bits, TBaseType > self_type
Definition: fast_type.hpp:66

◆ operator/=() [1/2]

template<size_t Bits, typename TBaseType >
self_type& std::fast_type< Bits, TBaseType >::operator/= ( self_type other)
inline
147  {
148  Value /= other.Value; return *this;
149  }
value_type Value
Definition: fast_type.hpp:71

◆ operator/=() [2/2]

template<size_t Bits, typename TBaseType >
self_type& std::fast_type< Bits, TBaseType >::operator/= ( value_type v)
inline
159  {
160  Value /= v; return *this;
161  }
value_type Value
Definition: fast_type.hpp:71

◆ operator<()

template<size_t Bits, typename TBaseType >
bool std::fast_type< Bits, TBaseType >::operator< ( self_type other)
inline
116  {
117  return Value < other.Value;
118  }
value_type Value
Definition: fast_type.hpp:71

◆ operator<<()

template<size_t Bits, typename TBaseType >
self_type& std::fast_type< Bits, TBaseType >::operator<< ( const self_type rhs)
inline
180  {
181  return self_type(*this) <<= rhs;
182  }
fast_type< Bits, TBaseType > self_type
Definition: fast_type.hpp:66

◆ operator<<=() [1/2]

template<size_t Bits, typename TBaseType >
self_type& std::fast_type< Bits, TBaseType >::operator<<= ( self_type other)
inline
141  {
142  Value <<= other.Value; return *this;
143  }
value_type Value
Definition: fast_type.hpp:71

◆ operator<<=() [2/2]

template<size_t Bits, typename TBaseType >
self_type& std::fast_type< Bits, TBaseType >::operator<<= ( value_type v)
inline
162  {
163  Value <<= v; return *this;
164  }
value_type Value
Definition: fast_type.hpp:71

◆ operator<=()

template<size_t Bits, typename TBaseType >
bool std::fast_type< Bits, TBaseType >::operator<= ( self_type other)
inline
110  {
111  return Value <= other.Value;
112  }
value_type Value
Definition: fast_type.hpp:71

◆ operator=() [1/2]

template<size_t Bits, typename TBaseType >
self_type& std::fast_type< Bits, TBaseType >::operator= ( value_type v)
inline
98  {
99  Value = v; return *this;
100  }
value_type Value
Definition: fast_type.hpp:71

◆ operator=() [2/2]

template<size_t Bits, typename TBaseType >
self_type& std::fast_type< Bits, TBaseType >::operator= ( self_type other)
inline
101  {
102  Value = other.Value; return *this;
103  }
value_type Value
Definition: fast_type.hpp:71

◆ operator==()

template<size_t Bits, typename TBaseType >
bool std::fast_type< Bits, TBaseType >::operator== ( self_type other)
inline
104  {
105  return Value == other.Value;
106  }
value_type Value
Definition: fast_type.hpp:71

◆ operator>()

template<size_t Bits, typename TBaseType >
bool std::fast_type< Bits, TBaseType >::operator> ( self_type other)
inline
119  {
120  return Value > other.Value;
121  }
value_type Value
Definition: fast_type.hpp:71

◆ operator>=()

template<size_t Bits, typename TBaseType >
bool std::fast_type< Bits, TBaseType >::operator>= ( self_type other)
inline
113  {
114  return Value >= other.Value;
115  }
value_type Value
Definition: fast_type.hpp:71

◆ operator>>()

template<size_t Bits, typename TBaseType >
self_type& std::fast_type< Bits, TBaseType >::operator>> ( const self_type rhs)
inline
183  {
184  return self_type(*this) >>= rhs;
185  }
fast_type< Bits, TBaseType > self_type
Definition: fast_type.hpp:66

◆ operator>>=() [1/2]

template<size_t Bits, typename TBaseType >
self_type& std::fast_type< Bits, TBaseType >::operator>>= ( self_type other)
inline
144  {
145  Value >>= other.Value; return *this;
146  }
value_type Value
Definition: fast_type.hpp:71

◆ operator>>=() [2/2]

template<size_t Bits, typename TBaseType >
self_type& std::fast_type< Bits, TBaseType >::operator>>= ( value_type v)
inline
165  {
166  Value >>= v; return *this;
167  }
value_type Value
Definition: fast_type.hpp:71

◆ operator[]()

template<size_t Bits, typename TBaseType >
value_type& std::fast_type< Bits, TBaseType >::operator[] ( const size_t  p)
inline
95  {
96  return bits[p];
97  }
bit_type bits[Bits]
Definition: fast_type.hpp:72

◆ operator^()

template<size_t Bits, typename TBaseType >
self_type& std::fast_type< Bits, TBaseType >::operator^ ( const self_type rhs)
inline
191  {
192  self_type result = self_type(*this);
193  result.Value ^= rhs.Value;
194  return result;
195  }
fast_type< Bits, TBaseType > self_type
Definition: fast_type.hpp:66

◆ operator^=()

template<size_t Bits, typename TBaseType >
self_type& std::fast_type< Bits, TBaseType >::operator^= ( self_type other)
inline
138  {
139  Value ^= other.Value; return *this;
140  }
value_type Value
Definition: fast_type.hpp:71

◆ operator|()

template<size_t Bits, typename TBaseType >
self_type& std::fast_type< Bits, TBaseType >::operator| ( const self_type rhs)
inline
186  {
187  self_type result = self_type(*this);
188  result.Value |= rhs.Value;
189  return result;
190  }
fast_type< Bits, TBaseType > self_type
Definition: fast_type.hpp:66

◆ operator|=()

template<size_t Bits, typename TBaseType >
self_type& std::fast_type< Bits, TBaseType >::operator|= ( self_type other)
inline
135  {
136  Value |= other.Value; return *this;
137  }
value_type Value
Definition: fast_type.hpp:71

◆ operator~() [1/2]

template<size_t Bits, typename TBaseType >
self_type& std::fast_type< Bits, TBaseType >::operator~ ( )
inline
201  {
202  self_type result = self_type(*this);
203  result.Value = ~result.Value;
204  return result;
205  }
fast_type< Bits, TBaseType > self_type
Definition: fast_type.hpp:66

◆ operator~() [2/2]

template<size_t Bits, typename TBaseType >
self_type& std::fast_type< Bits, TBaseType >::operator~ ( )
inline
213  {
214  Value = ~Value; return *this;
215  }
value_type Value
Definition: fast_type.hpp:71

◆ set()

template<size_t Bits, typename TBaseType >
unsigned int std::fast_type< Bits, TBaseType >::set ( size_t  pos,
bool  p 
)
inline
88  {
89  bits[pos].bit = p ? 1 : 0;
90  }
bit_type bits[Bits]
Definition: fast_type.hpp:72
unsigned char bit
Definition: fast_type.hpp:41

◆ size()

template<size_t Bits, typename TBaseType >
size_t std::fast_type< Bits, TBaseType >::size ( )
inline
91  {
92  return Bits;
93  }

◆ zeros()

template<size_t Bits, typename TBaseType >
unsigned int std::fast_type< Bits, TBaseType >::zeros ( )
inline
85  {
86  return Bits-count();
87  }
unsigned int count()
Definition: fast_type.hpp:79

Dokumentation der Datenelemente

◆ @4

union { ... }

◆ bits

template<size_t Bits, typename TBaseType >
bit_type std::fast_type< Bits, TBaseType >::bits[Bits]

◆ Value

template<size_t Bits, typename TBaseType >
value_type std::fast_type< Bits, TBaseType >::Value

Die Dokumentation für diese Klasse wurde erzeugt aufgrund der Datei: