include/objects/general/Date_std.hpp

Go to the documentation of this file.
00001 /* $Id: Date_std.hpp 103491 2007-05-04 17:18:18Z kazimird $
00002  * ===========================================================================
00003  *
00004  *                            PUBLIC DOMAIN NOTICE
00005  *               National Center for Biotechnology Information
00006  *
00007  *  This software/database is a "United States Government Work" under the
00008  *  terms of the United States Copyright Act.  It was written as part of
00009  *  the author's official duties as a United States Government employee and
00010  *  thus cannot be copyrighted.  This software/database is freely available
00011  *  to the public for use. The National Library of Medicine and the U.S.
00012  *  Government have not placed any restriction on its use or reproduction.
00013  *
00014  *  Although all reasonable efforts have been taken to ensure the accuracy
00015  *  and reliability of the software and data, the NLM and the U.S.
00016  *  Government do not and cannot warrant the performance or results that
00017  *  may be obtained by using this software or data. The NLM and the U.S.
00018  *  Government disclaim all warranties, express or implied, including
00019  *  warranties of performance, merchantability or fitness for any particular
00020  *  purpose.
00021  *
00022  *  Please cite the author in any work or product based on this material.
00023  *
00024  * ===========================================================================
00025  *
00026  * Author:  Aaron Ucko, NCBI
00027  *
00028  * File Description:
00029  *   Useful member functions for standard dates: comparison and formatting
00030  *
00031  * Remark:
00032  *   This code was originally generated by application DATATOOL
00033  *   using specifications from the ASN data definition file
00034  *   'general.asn'.
00035  */
00036 
00037 #ifndef OBJECTS_GENERAL_DATE_STD_HPP
00038 #define OBJECTS_GENERAL_DATE_STD_HPP
00039 
00040 
00041 // generated includes
00042 #include <objects/general/Date_std_.hpp>
00043 
00044 #include <objects/general/Date.hpp>
00045 
00046 // generated classes
00047 
00048 BEGIN_NCBI_SCOPE
00049 
00050 BEGIN_objects_SCOPE // namespace ncbi::objects::
00051 
00052 class  CDate_std : public CDate_std_Base
00053 {
00054     typedef CDate_std_Base Tparent;
00055 public:
00056     // constructors
00057     CDate_std(void);
00058     CDate_std(const CTime& time,
00059               CDate::EPrecision prec = CDate::ePrecision_second);
00060     explicit CDate_std(time_t time,
00061                        CDate::EPrecision prec = CDate::ePrecision_second);
00062     
00063     // destructor
00064     ~CDate_std(void);
00065 
00066     // conversion to/from CTime
00067     void  SetToTime(const CTime& time,
00068                     CDate::EPrecision prec = CDate::ePrecision_second);
00069     CTime AsCTime  (CTime::ETimeZone tz = CTime::eLocal) const;
00070 
00071     CDate::ECompare Compare(const CDate_std& date) const;
00072 
00073     // See explanation of format in Date.hpp
00074     void GetDate(string* label, const string& format) const;
00075 
00076 private:
00077     // Prohibit copy constructor and assignment operator
00078     CDate_std(const CDate_std& value);
00079     CDate_std& operator=(const CDate_std& value);
00080 
00081 };
00082 
00083 
00084 
00085 /////////////////// CDate_std inline methods
00086 
00087 // constructor
00088 inline
00089 CDate_std::CDate_std(void)
00090 {
00091 }
00092 
00093 inline
00094 CDate_std::CDate_std(const CTime& time, CDate::EPrecision prec)
00095 {
00096     SetToTime(time, prec);
00097 }
00098 
00099 inline
00100 CDate_std::CDate_std(time_t time, CDate::EPrecision prec)
00101 {
00102     SetToTime(CTime(time), prec);
00103 }
00104 
00105 
00106 /////////////////// end of CDate_std inline methods
00107 
00108 
00109 END_objects_SCOPE // namespace ncbi::objects::
00110 
00111 END_NCBI_SCOPE
00112 
00113 #endif // OBJECTS_GENERAL_DATE_STD_HPP
00114 /* Original file checksum: lines: 90, chars: 2388, CRC32: 3888bc05 */
00115 
00116 

Generated on Wed Feb 11 22:38:55 2009 for NCBI C++ ToolKit by  doxygen 1.4.6
Modified on Thu Feb 12 01:03:12 2009 by modify_doxy.py rev. 117643