Date_std.hpp
上传用户:yhdzpy8989
上传日期:2007-06-13
资源大小:13604k
文件大小:5k
- /*
- * ===========================================================================
- * PRODUCTION $Log: Date_std.hpp,v $
- * PRODUCTION Revision 1000.0 2003/10/29 21:00:48 gouriano
- * PRODUCTION PRODUCTION: IMPORTED [ORIGINAL] Dev-tree R1.6
- * PRODUCTION
- * ===========================================================================
- */
- /* $Id: Date_std.hpp,v 1000.0 2003/10/29 21:00:48 gouriano Exp $
- * ===========================================================================
- *
- * PUBLIC DOMAIN NOTICE
- * National Center for Biotechnology Information
- *
- * This software/database is a "United States Government Work" under the
- * terms of the United States Copyright Act. It was written as part of
- * the author's official duties as a United States Government employee and
- * thus cannot be copyrighted. This software/database is freely available
- * to the public for use. The National Library of Medicine and the U.S.
- * Government have not placed any restriction on its use or reproduction.
- *
- * Although all reasonable efforts have been taken to ensure the accuracy
- * and reliability of the software and data, the NLM and the U.S.
- * Government do not and cannot warrant the performance or results that
- * may be obtained by using this software or data. The NLM and the U.S.
- * Government disclaim all warranties, express or implied, including
- * warranties of performance, merchantability or fitness for any particular
- * purpose.
- *
- * Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- * Author: Aaron Ucko, NCBI
- *
- * File Description:
- * Useful member functions for standard dates: comparison and formatting
- *
- * Remark:
- * This code was originally generated by application DATATOOL
- * using specifications from the ASN data definition file
- * 'general.asn'.
- */
- #ifndef OBJECTS_GENERAL_DATE_STD_HPP
- #define OBJECTS_GENERAL_DATE_STD_HPP
- // generated includes
- #include <objects/general/Date_std_.hpp>
- #include <objects/general/Date.hpp>
- // generated classes
- BEGIN_NCBI_SCOPE
- BEGIN_objects_SCOPE // namespace ncbi::objects::
- class NCBI_GENERAL_EXPORT CDate_std : public CDate_std_Base
- {
- typedef CDate_std_Base Tparent;
- public:
- // constructors
- CDate_std(void);
- CDate_std(const CTime& time,
- CDate::EPrecision prec = CDate::ePrecision_second);
- explicit CDate_std(time_t time,
- CDate::EPrecision prec = CDate::ePrecision_second);
-
- // destructor
- ~CDate_std(void);
- // conversion to/from CTime
- void SetToTime(const CTime& time,
- CDate::EPrecision prec = CDate::ePrecision_second);
- CTime AsCTime (CTime::ETimeZone tz = CTime::eLocal) const;
- CDate::ECompare Compare(const CDate_std& date) const;
- // See explanation of format in Date.hpp
- void GetDate(string* label, const string& format) const;
- private:
- // Prohibit copy constructor and assignment operator
- CDate_std(const CDate_std& value);
- CDate_std& operator=(const CDate_std& value);
- };
- /////////////////// CDate_std inline methods
- // constructor
- inline
- CDate_std::CDate_std(void)
- {
- }
- inline
- CDate_std::CDate_std(const CTime& time, CDate::EPrecision prec)
- {
- SetToTime(time, prec);
- }
- inline
- CDate_std::CDate_std(time_t time, CDate::EPrecision prec)
- {
- SetToTime(CTime(time), prec);
- }
- /////////////////// end of CDate_std inline methods
- END_objects_SCOPE // namespace ncbi::objects::
- END_NCBI_SCOPE
- /*
- * ===========================================================================
- *
- * $Log: Date_std.hpp,v $
- * Revision 1000.0 2003/10/29 21:00:48 gouriano
- * PRODUCTION: IMPORTED [ORIGINAL] Dev-tree R1.6
- *
- * Revision 1.6 2003/02/10 21:55:43 ucko
- * Make time_t-based ctors explicit, and explicitly construct temporary CTimes.
- *
- * Revision 1.5 2002/12/26 12:40:33 dicuccio
- * Added Win32 export specifiers
- *
- * Revision 1.4 2002/12/09 17:30:10 ucko
- * Rename Assign to SetToTime to avoid shadowing CSerialObject; propagate tz
- *
- * Revision 1.3 2002/12/06 20:03:15 ucko
- * Support conversion to/from CTime and from time_t
- *
- * Revision 1.2 2002/10/04 14:45:08 ucko
- * Add a generic date formatter with flexible support for missing fields.
- *
- * Revision 1.1 2001/11/16 20:54:50 ucko
- * Added comparison for dates.
- *
- * ===========================================================================
- */
- #endif // OBJECTS_GENERAL_DATE_STD_HPP
- /* Original file checksum: lines: 90, chars: 2388, CRC32: 3888bc05 */