SourcePro® API Reference Guide

 
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 j)
 
 RWCollectableDate (unsigned long jd)
 
 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 *c) 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 jd)
 
 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 julian () const
 
void julian (unsigned 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 s)
 
RWDateoperator-- ()
 
RWDate operator-- (int)
 
RWDateoperator-= (unsigned 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 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  j)
inline

Calls the corresponding constructor of the base class RWDate.

RWCollectableDate::RWCollectableDate ( unsigned long  jd)
explicit
Deprecated:
As of SourcePro 2017, use RWCollectableDate(unsigned) instead.

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 c) const
virtual

If c is an RWCollectableDate, returns the result of calling RWDate::compareTo(), otherwise returns a nonzero value based on the type of c.

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 t) const
virtual

Behaves as if compareTo(t) was invoked, returning true if the result equals 0, false otherwise.

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 © 2023 Rogue Wave Software, Inc., a Perforce company. All Rights Reserved.