Main Page | Modules | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members | Related Pages
comet::currency_t Class Reference
[Com type wrappers.]
#include <currency.h>
Public Member Functions | |
| currency_t () throw () | |
| Default Constructor. | |
| currency_t (const CY &cy) | |
| CY constructor. | |
| currency_t (double val) | |
| Double Conversion constructor. | |
| currency_t (long val) | |
| Long Conversion constructor. | |
| currency_t (int val) | |
| void | swap (currency_t &c) throw () |
| currency_t & | round_to (int decimals) |
| int | cmp (const currency_t &cy) const |
| int | cmp (double cy) const |
| std::basic_string< TCHAR > | format (int mindigits=0, int minprecision=0, int width=0) const |
| Format the string with the given digits, precision and width. | |
| currency_t & | parse (const bstr_t &str, LCID locale=::GetThreadLocale()) |
| Parse the string to a currency. | |
| bool | valid () const throw () |
| Returns true if this is a valid number. | |
| CY | detach () throw () |
| Detaches the CY value. Provided for consistancy. | |
Assignment Operators | |
| currency_t & | operator= (double newVal) |
| currency_t & | operator= (long newVal) |
| currency_t & | operator= (int newVal) |
| currency_t & | operator= (const tagCY &newVal) throw () |
Mathematical Operators | |
| currency_t & | operator+= (const currency_t &cy) |
| currency_t & | operator-= (const currency_t &cy) |
| currency_t & | operator *= (const currency_t &cy) |
| currency_t & | operator *= (long cy) |
| currency_t & | operator *= (int val) |
| currency_t & | operator *= (double val) |
| currency_t & | operator/= (int val) const |
| currency_t & | operator/= (long val) |
| currency_t | operator+ (const currency_t &cy) const |
| currency_t | operator- (const currency_t &cy) const |
| currency_t | operator * (const currency_t &cy) const |
| currency_t | operator * (long cy) const |
| currency_t | operator * (int cy) const |
| currency_t | operator * (double cy) const |
| double | operator/ (const currency_t &cy) const |
| Calculate approximate ratio. | |
| currency_t | operator/ (int val) const |
| Divide by int. | |
| currency_t | operator/ (long val) const |
| Divide by long. | |
| double | operator/ (double val) const |
| Divide by double. | |
| currency_t | operator- () const |
| Unary negate. | |
Logical Operators | |
| bool | operator!= (const currency_t &cy) const |
| bool | operator!= (double val) const |
| bool | operator== (const currency_t &cy) const |
| bool | operator== (double val) const |
| bool | operator<= (const currency_t &cy) const |
| bool | operator<= (double val) const |
| bool | operator>= (const currency_t &cy) const |
| bool | operator>= (double val) const |
| bool | operator< (const currency_t &cy) const |
| bool | operator< (double val) const |
| bool | operator> (const currency_t &cy) const |
| bool | operator> (double val) const |
Access converters | |
| tagCY | get () const |
| tagCY | in () const |
| tagCY * | in_ptr () const |
| tagCY * | out () |
| tagCY * | inout () |
Static Public Member Functions | |
| const currency_t & | create_const_reference (const CY &s) throw () |
| currency_t & | create_reference (CY &s) throw () |
| CY | detach (currency_t &cy) throw () |
| Detaches the CY value. Provided for consistancy. | |
Protected Member Functions | |
| template<typename CH> void | do_format (std::basic_string< CH > &val, int mindigits, int minprecision, int) const |
Friends | |
| std::basic_ostream< char > & | operator<< (std::basic_ostream< char > &str, const currency_t &val) |
| std::basic_ostream< wchar_t > & | operator<< (std::basic_ostream< wchar_t > &str, const currency_t &val) |
Detailed Description
Wrapper for CURRENCY type. CURRENCY is a fixed point (to 4 decimal places) 64 bit value.
Member Function Documentation
|
|
Compares the value like strcmp.
|
|
|
Compares the value like strcmp.
|
|
||||||||||||||||||||||||
|
Return a string representation of the value.
|
|
|
Rounds the value to specified number of decimal places.
|
The documentation for this class was generated from the following files: