rwlogo
SourcePro C++ 12.0

SourcePro® C++ API Reference Guide



   SourcePro C++
Documentation Home

RWCollectableDateTime Class Reference
[Dates and Times]

Provides a polymorphically persistable RWDateTime. More...

#include <rw/tools/ctdatetime.h>

Inheritance diagram for RWCollectableDateTime:
RWCollectable RWDateTime

List of all members.

Public Member Functions

virtual RWCollectablenewSpecies () const
virtual RWClassID isA () const
 RWCollectableDateTime (InitialState init_state=invalid)
 RWCollectableDateTime (const RWDateTime &dt)
 RWCollectableDateTime (rwint64 msec)
 RWCollectableDateTime (const struct tm *t, unsigned ms=0, const RWZone &zone=RWZone::local())
 RWCollectableDateTime (const RWTime &t, unsigned ms=0)
 RWCollectableDateTime (const RWDate &d, unsigned h=0, unsigned m=0, unsigned s=0, unsigned ms=0, const RWZone &zone=RWZone::local())
 RWCollectableDateTime (unsigned d, const char *mo, unsigned y, unsigned h, unsigned m, unsigned s, unsigned ms, const RWLocale &loc=RWLocale::global(), const RWZone &zone=RWZone::local())
 RWCollectableDateTime (unsigned d, unsigned mo, unsigned y, unsigned h=0, unsigned m=0, unsigned s=0, unsigned ms=0, const RWZone &zone=RWZone::local())
 RWCollectableDateTime (const RWCString &str, SetType set_type=setBoth, const RWLocale &loc=RWLocale::global(), const RWZone &zone=RWZone::local())
 RWCollectableDateTime (std::istream &s, SetType set_type, const RWLocale &loc=RWLocale::global(), const RWZone &zone=RWZone::local())
 ~RWCollectableDateTime ()
virtual RWspace binaryStoreSize () const
virtual int compareTo (const RWCollectable *c) const
virtual unsigned hash () const
virtual bool isEqual (const RWCollectable *c) const
virtual void restoreGuts (RWvistream &stream)
virtual void restoreGuts (RWFile &file)
virtual void saveGuts (RWvostream &stream) const
virtual void saveGuts (RWFile &file) const

Static Public Member Functions

static RWClassID classIsA ()

Detailed Description

Collectable RWDateTime instances. Inherits from classes RWDateTime and RWCollectable. This class is useful when date/time objects are used as keys in the "dictionary" collection classes, or if date/time objects are stored and retrieved as RWCollectable instances.

Redefines the virtual functions of the base class RWCollectable.

Synopsis

 #include <rw/tools/ctdatetime.h>
 RWCollectableDateTime d;

Persistence

Polymorphic


Constructor & Destructor Documentation

RWCollectableDateTime::RWCollectableDateTime ( InitialState  init_state = invalid  )  [inline]

Calls the corresponding constructor of the base class RWDateTime.

RWCollectableDateTime::RWCollectableDateTime ( const RWDateTime dt  )  [inline]

Calls the corresponding constructor of the base class RWDateTime.

RWCollectableDateTime::RWCollectableDateTime ( rwint64  msec  )  [inline, explicit]

Calls the corresponding constructor of the base class RWDateTime.

RWCollectableDateTime::RWCollectableDateTime ( const struct tm *  t,
unsigned  ms = 0,
const RWZone zone = RWZone::local() 
) [inline]

Calls the corresponding constructor of the base class RWDateTime.

RWCollectableDateTime::RWCollectableDateTime ( const RWTime t,
unsigned  ms = 0 
) [inline]
Deprecated:
This method is deprecated, and is no longer supported.
RWCollectableDateTime::RWCollectableDateTime ( const RWDate d,
unsigned  h = 0,
unsigned  m = 0,
unsigned  s = 0,
unsigned  ms = 0,
const RWZone zone = RWZone::local() 
) [inline]
Deprecated:
This method is deprecated, and is no longer supported.
RWCollectableDateTime::RWCollectableDateTime ( unsigned  d,
const char *  mo,
unsigned  y,
unsigned  h,
unsigned  m,
unsigned  s,
unsigned  ms,
const RWLocale loc = RWLocale::global(),
const RWZone zone = RWZone::local() 
) [inline]

Calls the corresponding constructor of the base class RWDateTime.

RWCollectableDateTime::RWCollectableDateTime ( unsigned  d,
unsigned  mo,
unsigned  y,
unsigned  h = 0,
unsigned  m = 0,
unsigned  s = 0,
unsigned  ms = 0,
const RWZone zone = RWZone::local() 
) [inline]

Calls the corresponding constructor of the base class RWDateTime.

RWCollectableDateTime::RWCollectableDateTime ( const RWCString str,
SetType  set_type = setBoth,
const RWLocale loc = RWLocale::global(),
const RWZone zone = RWZone::local() 
) [inline, explicit]

Calls the corresponding constructor of the base class RWDateTime.

RWCollectableDateTime::RWCollectableDateTime ( std::istream &  s,
SetType  set_type,
const RWLocale loc = RWLocale::global(),
const RWZone zone = RWZone::local() 
) [inline]

Calls the corresponding constructor of the base class RWDateTime.

RWCollectableDateTime::~RWCollectableDateTime (  )  [inline]

Empty destructor.


Member Function Documentation

virtual RWspace RWCollectableDateTime::binaryStoreSize (  )  const [inline, virtual]

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 RWCollectableDateTime::classIsA (  )  [static]

Returns the RWClassID of this class.

Reimplemented from RWCollectable.

virtual int RWCollectableDateTime::compareTo ( const RWCollectable c  )  const [inline, virtual]

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

Reimplemented from RWCollectable.

virtual unsigned RWCollectableDateTime::hash (  )  const [inline, virtual]

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

Reimplemented from RWCollectable.

virtual RWClassID RWCollectableDateTime::isA (  )  const [virtual]

Returns the unique ID for RWCollectableDateTime.

Reimplemented from RWCollectable.

virtual bool RWCollectableDateTime::isEqual ( const RWCollectable c  )  const [inline, virtual]

Returns the results of calling compareTo() for the base class RWDateTime by using appropriate casts.

Reimplemented from RWCollectable.

virtual RWCollectable* RWCollectableDateTime::newSpecies (  )  const [virtual]

Allocates a new object off the heap of the same type as self and returns a pointer to it. You are responsible for deleting the object when done with it.

Reimplemented from RWCollectable.

virtual void RWCollectableDateTime::restoreGuts ( RWFile  )  [inline, virtual]

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

Reimplemented from RWCollectable.

virtual void RWCollectableDateTime::restoreGuts ( RWvistream  )  [inline, virtual]

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

Reimplemented from RWCollectable.

virtual void RWCollectableDateTime::saveGuts ( RWFile  )  const [inline, virtual]

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

Reimplemented from RWCollectable.

virtual void RWCollectableDateTime::saveGuts ( RWvostream  )  const [inline, virtual]

Writes an object's state to an output stream.

Reimplemented from RWCollectable.

 All Classes Functions Variables Typedefs Enumerations Enumerator Friends

© Copyright 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.
Contact Rogue Wave about documentation or support issues.