Member Functions | |||
asString() |
operator RWDBDateTime() |
operator=() |
#include <rw/db/dbdatevec.h> RWDBDateVector dateVector = db.dateVector(n); RWDBVendorDate date = dateVector[i];
RWDBVendorDates are used to encapsulate vendor-specific date structures. RWDBDateVectors are arrays of RWDBVendorDates. Methods are provided to transfer date values between RWDBVendorDates and RWDBDateTimes.
RWDBVendorDate is designed around the Interface/Implementation paradigm. An RWDBVendorDate instance is an interface to a reference-counted implementation; copy constructors and assignment operators produce additional references to a shared implementation.
In the following example a vector dateVector is produced. The vector is initialized with the current date and the following four days:
RWDBDateVector dateVector = aDB.dateVector(5); RWDBDateTime dt; // Today's date. for (int k = 0; k < 5; k++) { dateVector[k] = dt; dt.addDays(1); }
RWDBVendorDate(const RWDBVendorDate& date);
Copies the date held in date to self.
RWDBVendorDate& operator=(const RWDBVendorDate& date);
Assigns the date value held in date to self.
RWDBVendorDate& operator=(const RWDBDateTime& dt);
Assigns the date value held in dt to self.
operator RWDBDateTime();
Conversion operator. Returns an RWDBDateTime representation of self.
RWCString asString() const;
Returns a string representation of the date held in self.
©Copyright 1999, Rogue Wave Software, Inc.
Contact Rogue Wave about documentation or support issues.