WT_Timestamp Class Reference

#include <timestamp.h>

Inheritance diagram for WT_Timestamp:

Inheritance graph
[legend]
Collaboration diagram for WT_Timestamp:

Collaboration graph
[legend]
List of all members.

Detailed Description

Metadata describing a time instant (in seconds) with an associated GUID.

Definition at line 30 of file timestamp.h.

Public Member Functions

WT_Result serialize (WT_File &file, char const *exAsciiOpcode) const
 Causes the serialization of the object to the file.
 WT_Timestamp ()
 Constructs a WT_Timestamp object.
 WT_Timestamp (WT_Integer32 seconds, char const *exAsciiOpcode)
 Constructs a WT_Timestamp object.
 WT_Timestamp (WT_Timestamp const &ts)
 Constructs a WT_Timestamp object. Copy constructor.
virtual ~WT_Timestamp ()
WT_String const & string (void) const
 Returns the extended ASCII opcode to use when seriailizing.
WT_Integer32 seconds (void) const
 Returns the seconds value (seconds since midnight 00:00:00 January 1, 1970.).
WT_String const & guid (void) const
 Returns the GUID string associated with this timestamp.
void set (char const *exAsciiOpcode)
 Sets the extended ASCII opcode to use when seriailizing.
void set (WT_String const &exAsciiOpcode)
 Sets the extended ASCII opcode to use when seriailizing.
void set (WT_Unsigned_Integer16 const *exAsciiOpcode)
 Sets the extended ASCII opcode to use when seriailizing.
void set (WT_Integer32 seconds, char const *exAsciiOpcode)
 Sets the value of this timestamp.
void set (WT_Integer32 seconds, WT_String const &string)
 Sets the value of this timestamp.
void set (WT_Integer32 seconds, WT_Unsigned_Integer16 const *string)
 Sets the value of this timestamp.
void set (WT_Timestamp const &ts)
 Copies the value of the given timestamp to this one.
void set_guid (WT_String const &guid)
 Sets the GUID associated with this timestamp.
WT_Timestamp const & operator= (WT_Timestamp const &ts)
 Assignment operator. Assigns the value of the given timestamp to this one.
WT_Result materialize (WT_Opcode const &opcode, WT_File &file)
 Materializes the contents of the object from the file and the given opcode.
WT_Type object_type () const
 Returns the WT_Type for this object.
WT_Result skip_operand (WT_Opcode const &opcode, WT_File &file)
 Causes the file reading to proceed to the end of this object.

Protected Types

enum  WT_Materialize_Stage

Protected Attributes

WT_String m_string
WT_Integer32 m_seconds
WT_String m_guid


Constructor & Destructor Documentation

WT_Timestamp::WT_Timestamp WT_Integer32  seconds,
char const *  exAsciiOpcode
 

Constructs a WT_Timestamp object.

Parameters:
seconds  Seconds since midnight 00:00:00 January 1, 1970.
exAsciiOpcode  The extended ASCII opcode to use when seriailizing.


Member Function Documentation

WT_Result WT_Timestamp::materialize WT_Opcode const &  opcode,
WT_File file
[virtual]
 

Materializes the contents of the object from the file and the given opcode.

Reads in the object data and causes the file reading to proceed to the end of this object.

Warning:
This is used by the framework and should not be called by client code.
Return values:
WT_Result::Success The operation was successful.
WT_Result::Opcode_Not_Valid_For_This_Object The object does not support the opcode type.
WT_Result::Internal_Error Something went very wrong.

Implements WT_Object.

WT_Result WT_Timestamp::serialize WT_File file,
char const *  exAsciiOpcode
const
 

Causes the serialization of the object to the file.

Return values:
WT_Result::Success The operation was successful.
Parameters:
file  The file being written.
exAsciiOpcode  The extended ASCII opcode to use when seriailizing.

void WT_Timestamp::set WT_Integer32  seconds,
WT_Unsigned_Integer16 const *  string
 

Sets the value of this timestamp.

Parameters:
seconds  Seconds since midnight 00:00:00 January 1, 1970.
string  The extended ASCII opcode to use when seriailizing.

void WT_Timestamp::set WT_Integer32  seconds,
WT_String const &  string
 

Sets the value of this timestamp.

Parameters:
seconds  Seconds since midnight 00:00:00 January 1, 1970.
string  The extended ASCII opcode to use when seriailizing.

void WT_Timestamp::set WT_Integer32  seconds,
char const *  exAsciiOpcode
 

Sets the value of this timestamp.

Parameters:
seconds  Seconds since midnight 00:00:00 January 1, 1970.
exAsciiOpcode  The extended ASCII opcode to use when seriailizing.

WT_Result WT_Timestamp::skip_operand WT_Opcode const &  opcode,
WT_File file
[virtual]
 

Causes the file reading to proceed to the end of this object.

Warning:
This is used by the framework and should not be called by client code.
Bug:
Not all objects perform skip_operand() correctly; this is a known problem. For best results, if client code must use WT_File::get_next_object_shell() manually, it should also call the corresponding WT_Object::materialize() method to avoid this problem.
See also:
WT_File::get_next_object_shell(), WT_File_Heuristics::set_deferred_delete().

Reimplemented from WT_Object.


The documentation for this class was generated from the following file:
Generated on Tue Jan 6 22:41:27 2009 for Autodesk DWF Whip 2D Toolkit by  doxygen 1.4.5