SourcePro® API Reference Guide

 
Loading...
Searching...
No Matches
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 (const RWCString &str, const RWLocale &locale=RWLocale::global())
 
 RWCollectableDate (const RWDate &d)
 
 RWCollectableDate (const RWTime &t, const RWZone &zone=RWZone::local())
 
 RWCollectableDate (const struct tm *tmb)
 
 RWCollectableDate (std::istream &s, const RWLocale &locale=RWLocale::global())
 
 RWCollectableDate (unsigned d, const char *s, unsigned y, const RWLocale &loc=RWLocale::global())
 
 RWCollectableDate (unsigned d, unsigned m, unsigned y)
 
 RWCollectableDate (unsigned d, unsigned y)
 
 RWCollectableDate (unsigned j)
 
 RWCollectableDate (unsigned long jd)
 
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 (RWFile &)
 
virtual void restoreGuts (RWvistream &)
 
virtual void saveGuts (RWFile &) const
 
virtual void saveGuts (RWvostream &) const
 
- Public Member Functions inherited from RWCollectable
virtual ~RWCollectable ()
 
RWspace recursiveStoreSize () const
 
RWStringID stringID () const
 
- Public Member Functions inherited from RWDate
 RWDate ()
 
 RWDate (const RWCString &str, const RWLocale &loc=RWLocale::global())
 
 RWDate (const RWDate &d)
 
 RWDate (const RWTime &t, const RWZone &zone=RWZone::local())
 
 RWDate (const RWTimeTuple &tt)
 
 RWDate (const RWTimeTupleOffset &tt)
 
 RWDate (const struct tm *tmbuf)
 
 RWDate (std::istream &s, const RWLocale &loc=RWLocale::global())
 
 RWDate (unsigned day, const char *month, unsigned year, const RWLocale &loc=RWLocale::global())
 
 RWDate (unsigned day, unsigned month, unsigned year)
 
 RWDate (unsigned day, unsigned year)
 
 RWDate (unsigned jd)
 
 RWDate (unsigned long jd)
 
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 () const
 
unsigned firstDayOfMonth (unsigned month) 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>
Inherits from classes RWDate and RWCollectable.
Definition colldate.h:50
Persistence
Polymorphic

Constructor & Destructor Documentation

◆ RWCollectableDate() [1/11]

RWCollectableDate::RWCollectableDate ( )

Calls the corresponding constructor of the base class RWDate.

◆ RWCollectableDate() [2/11]

RWCollectableDate::RWCollectableDate ( unsigned j)
inline

Calls the corresponding constructor of the base class RWDate.

◆ RWCollectableDate() [3/11]

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() [4/11]

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

Calls the corresponding constructor of the base class RWDate.

◆ RWCollectableDate() [5/11]

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() [6/11]

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

Calls the corresponding constructor of the base class RWDate.

◆ RWCollectableDate() [7/11]

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

Calls the corresponding constructor of the base class RWDate.

◆ RWCollectableDate() [8/11]

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

Calls the corresponding constructor of the base class RWDate.

◆ RWCollectableDate() [9/11]

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() [10/11]

RWCollectableDate::RWCollectableDate ( const RWDate & d)
inline

Calls the corresponding constructor of the base class RWDate.

◆ RWCollectableDate() [11/11]

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

Calls the corresponding constructor of the base class RWDate.

◆ ~RWCollectableDate()

virtual RWCollectableDate::~RWCollectableDate ( )
virtual

Empty destructor.

Member Function Documentation

◆ binaryStoreSize()

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.

◆ classIsA()

static RWClassID RWCollectableDate::classIsA ( )
static

Returns the RWClassID of this class.

◆ compareTo()

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.

◆ copy()

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.

◆ hash()

virtual unsigned RWCollectableDate::hash ( ) const
virtual

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

Reimplemented from RWCollectable.

◆ isA()

virtual RWClassID RWCollectableDate::isA ( ) const
virtual

Returns the unique ID for RWCollectableDate.

Reimplemented from RWCollectable.

◆ isEqual()

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.

◆ newSpecies()

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.

◆ restoreGuts() [1/2]

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.

◆ restoreGuts() [2/2]

virtual void RWCollectableDate::restoreGuts ( RWvistream & )
virtual

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

Reimplemented from RWCollectable.

◆ saveGuts() [1/2]

virtual void RWCollectableDate::saveGuts ( RWFile & ) const
virtual

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

Reimplemented from RWCollectable.

◆ saveGuts() [2/2]

virtual void RWCollectableDate::saveGuts ( RWvostream & ) const
virtual

Writes an object's state to an output stream.

Reimplemented from RWCollectable.

Copyright © 2024 Rogue Wave Software, Inc., a Perforce company. All Rights Reserved.