SourcePro® C++ API Reference Guide

Product Documentation:
   SourcePro C++
Documentation Home
List of all members | Public Member Functions | Static Public Member Functions
RWCollectableDate Class Reference

Inherits from classes RWDate and RWCollectable. More...

#include <rw/colldate.h>

Inheritance diagram for RWCollectableDate:
RWCollectable RWDate

Public Member Functions

 RWCollectableDate ()
 
 RWCollectableDate (unsigned long j)
 
 RWCollectableDate (unsigned d, unsigned y)
 
 RWCollectableDate (unsigned d, const char *s, unsigned y, const RWLocale &loc=RWLocale::global())
 
 RWCollectableDate (unsigned d, unsigned m, unsigned y)
 
 RWCollectableDate (std::istream &s, const RWLocale &locale=RWLocale::global())
 
 RWCollectableDate (const RWCString &str, const RWLocale &locale=RWLocale::global())
 
 RWCollectableDate (const RWTime &t, const RWZone &zone=RWZone::local())
 
 RWCollectableDate (const RWDate &d)
 
 RWCollectableDate (const struct tm *tmb)
 
virtual ~RWCollectableDate ()
 
virtual RWspace binaryStoreSize () const
 
virtual int compareTo (const RWCollectable *) const
 
virtual RWCollectablecopy () const
 
virtual unsigned hash () const
 
virtual RWClassID isA () const
 
virtual bool isEqual (const RWCollectable *) const
 
virtual RWCollectablenewSpecies () const
 
virtual void restoreGuts (RWvistream &)
 
virtual void restoreGuts (RWFile &)
 
virtual void saveGuts (RWvostream &) const
 
virtual void saveGuts (RWFile &) const
 
- Public Member Functions inherited from RWCollectable
virtual ~RWCollectable ()
 
RWspace recursiveStoreSize () const
 
RWStringID stringID () const
 
- Public Member Functions inherited from RWDate
 RWDate ()
 
 RWDate (unsigned long jd)
 
 RWDate (unsigned day, unsigned year)
 
 RWDate (unsigned day, const char *month, unsigned year, const RWLocale &loc=RWLocale::global())
 
 RWDate (unsigned day, unsigned month, unsigned year)
 
 RWDate (std::istream &s, const RWLocale &loc=RWLocale::global())
 
 RWDate (const RWCString &str, const RWLocale &loc=RWLocale::global())
 
 RWDate (const RWTime &t, const RWZone &zone=RWZone::local())
 
 RWDate (const struct tm *tmbuf)
 
 RWDate (const RWTimeTuple &tt)
 
 RWDate (const RWTimeTupleOffset &tt)
 
 RWDate (const RWDate &d)
 
RWCString asString (char format= 'x', const RWLocale &loc=RWLocale::global()) const
 
RWCString asString (const char *format, const RWLocale &loc=RWLocale::global()) const
 
bool between (const RWDate &a, const RWDate &b) const
 
RWspace binaryStoreSize () const
 
int compareTo (const RWDate *d) const
 
unsigned day () const
 
unsigned dayOfMonth () const
 
void extract (struct tm *tmbuf) const
 
unsigned firstDayOfMonth (unsigned month) const
 
unsigned firstDayOfMonth () const
 
unsigned hash () const
 
bool isValid () const
 
unsigned long julian () const
 
void julian (const unsigned long j)
 
bool leap () const
 
RWDate max (const RWDate &dt) const
 
RWDate min (const RWDate &dt) const
 
unsigned month () const
 
RWCString monthName (const RWLocale &loc=RWLocale::global()) const
 
RWDate next (const char *dayName, const RWLocale &loc=RWLocale::global()) const
 
RWDate next (unsigned dayNum) const
 
RWDateoperator++ ()
 
RWDate operator++ (int)
 
RWDateoperator+= (unsigned long s)
 
RWDateoperator-- ()
 
RWDate operator-- (int)
 
RWDateoperator-= (unsigned long s)
 
RWDateoperator= (const RWDate &d)
 
RWDate previous (const char *dayName, const RWLocale &loc=RWLocale::global()) const
 
RWDate previous (unsigned dayNum) const
 
unsigned weekDay () const
 
RWCString weekDayName (const RWLocale &loc=RWLocale::global()) const
 
unsigned year () const
 

Static Public Member Functions

static RWClassID classIsA ()
 
- Static Public Member Functions inherited from RWCollectable
static RWClassID classID (const RWStringID &name)
 
static RWClassID classIsA ()
 
static bool isAtom (RWClassID id)
 
static RWspace nilStoreSize ()
 
- Static Public Member Functions inherited from RWDate
static unsigned dayOfWeek (const char *dayName, const RWLocale &loc=RWLocale::global())
 
static unsigned daysInMonthYear (unsigned month, unsigned year)
 
static unsigned daysInYear (unsigned year)
 
static bool dayWithinMonth (unsigned month, unsigned day, unsigned year)
 
static unsigned hash (const RWDate &d)
 
static unsigned indexOfMonth (const char *monthName, const RWLocale &loc=RWLocale::global())
 
static unsigned long jday (unsigned month, unsigned day, unsigned year)
 
static bool leapYear (unsigned year)
 
static RWCString nameOfMonth (unsigned monNum, const RWLocale &loc=RWLocale::global())
 
static RWDate now ()
 
static RWCString weekDayName (unsigned day, const RWLocale &loc=RWLocale::global())
 

Additional Inherited Members

Detailed Description

Collectable Dates. Inherits from classes RWDate and RWCollectable. This class is useful when dates are used as keys in the "dictionary" collection classes, or if dates are stored and retrieved as RWCollectable instances.

The virtual functions of the base class RWCollectable have been redefined.

Synopsis
typedef RWCollectableDate Date; // Smalltalk typedef
#include <rw/colldate.h>
Persistence
Polymorphic

Constructor & Destructor Documentation

RWCollectableDate::RWCollectableDate ( )

Calls the corresponding constructor of the base class RWDate.

RWCollectableDate::RWCollectableDate ( unsigned long  j)
inline

Calls the corresponding constructor of the base class RWDate.

RWCollectableDate::RWCollectableDate ( unsigned  d,
unsigned  y 
)
inline

Calls the corresponding constructor of the base class RWDate.

RWCollectableDate::RWCollectableDate ( unsigned  d,
const char *  s,
unsigned  y,
const RWLocale loc = RWLocale::global() 
)
inline

Calls the corresponding constructor of the base class RWDate.

RWCollectableDate::RWCollectableDate ( unsigned  d,
unsigned  m,
unsigned  y 
)
inline

Calls the corresponding constructor of the base class RWDate.

RWCollectableDate::RWCollectableDate ( std::istream &  s,
const RWLocale locale = RWLocale::global() 
)
inline

Calls the corresponding constructor of the base class RWDate.

RWCollectableDate::RWCollectableDate ( const RWCString str,
const RWLocale locale = RWLocale::global() 
)
inline

Calls the corresponding constructor of the base class RWDate.

RWCollectableDate::RWCollectableDate ( const RWTime t,
const RWZone zone = RWZone::local() 
)
inline
Deprecated:
As of SourcePro 13, Use RWDateTime::toRWDate(const RWZone&) instead.

Calls the corresponding constructor of the base class RWDate.

RWCollectableDate::RWCollectableDate ( const RWDate d)
inline

Calls the corresponding constructor of the base class RWDate.

RWCollectableDate::RWCollectableDate ( const struct tm *  tmb)
inline

Calls the corresponding constructor of the base class RWDate.

virtual RWCollectableDate::~RWCollectableDate ( )
virtual

Empty destructor.

Member Function Documentation

virtual RWspace RWCollectableDate::binaryStoreSize ( ) const
inlinevirtual

Returns the number of bytes used by the virtual function saveGuts(RWFile&) to store an object. Typically, this involves adding up the space required to store all primitives, plus the results of calling recursiveStoreSize() for all objects inheriting from RWCollectable. See the Essential Tools Module User's Guide for details.

Reimplemented from RWCollectable.

static RWClassID RWCollectableDate::classIsA ( )
static

Returns the RWClassID of this class.

virtual int RWCollectableDate::compareTo ( const RWCollectable ) const
virtual

Returns the results of calling RWDate::compareTo().

Reimplemented from RWCollectable.

virtual RWCollectable* RWCollectableDate::copy ( ) const
virtual

Returns a new, copy-constructed object of the same type as self. The caller is responsible for deleting the object.

Reimplemented from RWCollectable.

virtual unsigned RWCollectableDate::hash ( ) const
virtual

Returns the results of calling RWDate::hash().

Reimplemented from RWCollectable.

virtual RWClassID RWCollectableDate::isA ( ) const
virtual

Returns the unique ID for RWCollectableDate.

Reimplemented from RWCollectable.

virtual bool RWCollectableDate::isEqual ( const RWCollectable ) const
virtual

Returns the results of calling operator==() for the base class RWDate by using appropriate casts.

Reimplemented from RWCollectable.

virtual RWCollectable* RWCollectableDate::newSpecies ( ) const
virtual

Returns a new, default-constructed object of the same type as self. The caller is responsible for deleting the object.

Reimplemented from RWCollectable.

virtual void RWCollectableDate::restoreGuts ( RWvistream )
virtual

Reads an object's state from an input stream, replacing the previous state.

Reimplemented from RWCollectable.

virtual void RWCollectableDate::restoreGuts ( RWFile )
virtual

Reads an object's state from a binary file, using class RWFile, replacing the previous state.

Reimplemented from RWCollectable.

virtual void RWCollectableDate::saveGuts ( RWvostream ) const
virtual

Writes an object's state to an output stream.

Reimplemented from RWCollectable.

virtual void RWCollectableDate::saveGuts ( RWFile ) const
virtual

Writes an object's state to a binary file, using class RWFile.

Reimplemented from RWCollectable.

Copyright © 2016 Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave and SourcePro are registered trademarks of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.
Provide feedback to Rogue Wave about its documentation.