An object that represents a particular point in time. More...
#include <earth_time.h>


Public Types | |
| enum | locus_formats { LONG_YEAR = 0x1, SHORT_YEAR = 0x2 } |
< Returns true if this time_locus is earlier than "to_compare" More... | |
Public Member Functions | |
| time_locus () | |
| DEFINE_CLASS_NAME ("time_locus") | |
| time_locus (const clock_time &ct, const day_in_year &ytd, int year_in) | |
| Constructs a location in time given its components. | |
| int | packed_size () const |
| Estimates the space needed for the packed structure. | |
| virtual void | pack (basis::byte_array &packed_form) const |
| Packs a time_locus object into an array of bytes. | |
| virtual bool | unpack (basis::byte_array &packed_form) |
| Unpacks a time_locus object from an array of bytes. | |
| virtual bool | equal_to (const basis::equalizable &s2) const |
| virtual bool | less_than (const basis::orderable &s2) const |
| virtual void | text_form (basis::base_string &state_fill) const |
| Provides a text view of all the important info owned by this object. | |
| basis::astring | text_form_long (int t=clock_time::MERIDIAN, int d=day_in_year::SHORT_MONTH, int y=LONG_YEAR) const |
| void | text_form_long (basis::astring &to_stuff, int t=clock_time::MERIDIAN, int d=day_in_year::SHORT_MONTH, int y=LONG_YEAR) const |
| Prints out the time_locus given the way to print each component. | |
Static Public Member Functions | |
| static int | normalize (time_locus &to_fix) |
| Same as text_form() above, but stores into "to_stuff". | |
Public Attributes | |
| int | year |
| The year, using the gregorian calendar. | |
An object that represents a particular point in time.
It contains both a time of day and the day in the year.
Definition at line 178 of file earth_time.h.
< Returns true if this time_locus is earlier than "to_compare"
< Returns true if this time_locus is equal to "to_compare" Enumerates the ways to show the year.
| LONG_YEAR |
default: full four digit year (problems in 9999). |
| SHORT_YEAR |
use only last two digits of year. ugh--Y2K danger. |
Definition at line 209 of file earth_time.h.
| timely::time_locus::time_locus | ( | ) | [inline] |
Definition at line 184 of file earth_time.h.
| timely::time_locus::time_locus | ( | const clock_time & | ct, | |
| const day_in_year & | ytd, | |||
| int | year_in | |||
| ) | [inline] |
Constructs a location in time given its components.
Definition at line 189 of file earth_time.h.
| timely::time_locus::DEFINE_CLASS_NAME | ( | "time_locus" | ) |
| bool timely::time_locus::equal_to | ( | const basis::equalizable & | s2 | ) | const [virtual] |
| bool timely::time_locus::less_than | ( | const basis::orderable & | s2 | ) | const [virtual] |
Definition at line 259 of file earth_time.cpp.
| int timely::time_locus::normalize | ( | time_locus & | to_fix | ) | [static] |
Same as text_form() above, but stores into "to_stuff".
normalizes the time_locus for its clock time and date.
Definition at line 289 of file earth_time.cpp.
References timely::day_in_year::day_in_month, and year.
| void timely::time_locus::pack | ( | basis::byte_array & | packed_form | ) | const [virtual] |
Packs a time_locus object into an array of bytes.
Reimplemented from timely::clock_time.
Definition at line 229 of file earth_time.cpp.
References basis::attach(), and year.
| int timely::time_locus::packed_size | ( | ) | const [inline, virtual] |
Estimates the space needed for the packed structure.
Reimplemented from timely::clock_time.
Definition at line 192 of file earth_time.h.
References structures::PACKED_SIZE_INT32.
| virtual void timely::time_locus::text_form | ( | basis::base_string & | state_fill | ) | const [inline, virtual] |
Provides a text view of all the important info owned by this object.
It is understood that there could be a large amount of information and that this function might take a relatively long time to complete.
Implements basis::text_formable.
Definition at line 215 of file earth_time.h.
References basis::base_string::assign(), LONG_YEAR, timely::clock_time::MERIDIAN, timely::day_in_year::SHORT_MONTH, and text_form_long().
Referenced by text_form_long().
| void timely::time_locus::text_form_long | ( | basis::astring & | to_stuff, | |
| int | t = clock_time::MERIDIAN, |
|||
| int | d = day_in_year::SHORT_MONTH, |
|||
| int | y = LONG_YEAR | |||
| ) | const |
Prints out the time_locus given the way to print each component.
Definition at line 269 of file earth_time.cpp.
References SHORT_YEAR, text_form(), text_form_long(), and year.
| astring timely::time_locus::text_form_long | ( | int | t = clock_time::MERIDIAN, |
|
| int | d = day_in_year::SHORT_MONTH, |
|||
| int | y = LONG_YEAR | |||
| ) | const |
Definition at line 244 of file earth_time.cpp.
Referenced by timely::time_stamp::notarize(), text_form(), and text_form_long().
| bool timely::time_locus::unpack | ( | basis::byte_array & | packed_form | ) | [virtual] |
Unpacks a time_locus object from an array of bytes.
Reimplemented from timely::clock_time.
Definition at line 236 of file earth_time.cpp.
References basis::detach(), timely::day_in_year::unpack(), timely::clock_time::unpack(), and year.
The year, using the gregorian calendar.
Definition at line 182 of file earth_time.h.
Referenced by timely::convert(), equal_to(), less_than(), normalize(), pack(), timely::time_control::set_time(), text_form_long(), and unpack().
1.6.3