Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members

mysqlpp::tiny_int Class Reference

Class for holding an SQL tiny_int object. More...

#include <tiny_int.h>

List of all members.

Public Member Functions

 tiny_int ()
 Default constructor.

 tiny_int (short int v)
 Create object from any integral type that can be converted to a short int.

 operator short int () const
 Return value as a short int.

tiny_intoperator= (short int v)
 Assign a short int to the object.

tiny_intoperator+= (short int v)
 Add another value to this object.

tiny_intoperator-= (short int v)
 Subtract another value to this object.

tiny_intoperator *= (short int v)
 Multiply this value by another object.

tiny_intoperator/= (short int v)
 Divide this value by another object.

tiny_intoperator%= (short int v)
 Divide this value by another object and store the remainder.

tiny_intoperator &= (short int v)
 Bitwise AND this value by another value.

tiny_intoperator|= (short int v)
 Bitwise OR this value by another value.

tiny_intoperator^= (short int v)
 Bitwise XOR this value by another value.

tiny_intoperator<<= (short int v)
 Shift this value left by v positions.

tiny_intoperator>>= (short int v)
 Shift this value right by v positions.

tiny_intoperator++ ()
 Add one to this value and return that value.

tiny_intoperator-- ()
 Subtract one from this value and return that value.

tiny_int operator++ (int)
 Add one to this value and return the previous value.

tiny_int operator-- (int)
 Subtract one from this value and return the previous value.

tiny_int operator- (const tiny_int &i) const
 Return this value minus i.

tiny_int operator+ (const tiny_int &i) const
 Return this value plus i.

tiny_int operator * (const tiny_int &i) const
 Return this value multiplied by i.

tiny_int operator/ (const tiny_int &i) const
 Return this value divided by i.

tiny_int operator% (const tiny_int &i) const
 Return the modulus of this value divided by i.

tiny_int operator| (const tiny_int &i) const
 Return this value bitwise OR'd by i.

tiny_int operator & (const tiny_int &i) const
 Return this value bitwise AND'd by i.

tiny_int operator^ (const tiny_int &i) const
 Return this value bitwise XOR'd by i.

tiny_int operator<< (const tiny_int &i) const
 Return this value bitwise shifted left by i.

tiny_int operator>> (const tiny_int &i) const
 Return this value bitwise shifted right by i.


Detailed Description

Class for holding an SQL tiny_int object.

This is required because the closest C++ type, char, doesn't have all the right semantics. For one, inserting a char into a stream won't give you a number.

Several of the functions below accept a short int argument, but internally we store the data as a char. Beware of integer overflows!


Constructor & Destructor Documentation

mysqlpp::tiny_int::tiny_int  )  [inline]
 

Default constructor.

Value is uninitialized


The documentation for this class was generated from the following file:
Generated on Wed Jul 11 15:35:36 2007 for MySQL++ by doxygen 1.3.5