Hi,
I would prefer a simple wrapper type just like tntdb::Date, tntdb::Time and
tntdb::Datetime. Passing a non-const reference to receive a return code is
just ugly. It just look much more natural, when an own type is used:
class Decimal
{
public:
typedef int64_t DataType;
typedef int32_t ExponentType;
Decimal();
explicit Decimal(double value);
Decimal(DataType data, ExponentType exponent);
DataType getData() const;
ExponentType getExponent() const;
double getDouble();
};
class Value
{
public:
Decimal getDecimal() const;
};
class Statement
{
public:
void setDecimal(const std::string& col, const Decimal& value);
}:
----------------
Rather than implementing an incomplete set of arithmentic operations
tntdb::Decimal must not implement any just like tntdb::Date does not
implement any date-logic. The types are trivial to pass to a better library
for doing this.
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Tntnet-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tntnet-general