2014-05-16 18:51:01 +08:00
|
|
|
//===-- MIUtilDateTimeStd.h -------------------------------------*- C++ -*-===//
|
|
|
|
//
|
|
|
|
// The LLVM Compiler Infrastructure
|
|
|
|
//
|
|
|
|
// This file is distributed under the University of Illinois Open Source
|
|
|
|
// License. See LICENSE.TXT for details.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
//++
|
|
|
|
// File: MIUtilDateTimeStd.h
|
|
|
|
//
|
|
|
|
// Overview: CMIUtilDateTimeStd interface.
|
|
|
|
//
|
|
|
|
// Environment: Compilers: Visual C++ 12.
|
|
|
|
// gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
|
|
|
|
// Libraries: See MIReadmetxt.
|
|
|
|
//
|
|
|
|
// Copyright: None.
|
|
|
|
//--
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2014-08-09 00:47:42 +08:00
|
|
|
// Third party headers
|
|
|
|
#include <ctime>
|
2014-05-16 18:51:01 +08:00
|
|
|
|
|
|
|
// In-house headers:
|
|
|
|
#include "MIUtilString.h"
|
|
|
|
|
|
|
|
//++ ============================================================================
|
|
|
|
// Details: MI common code utility class. Used to retrieve system local date
|
|
|
|
// time.
|
|
|
|
// Gotchas: None.
|
2014-08-09 00:47:42 +08:00
|
|
|
// Authors: Illya Rudkin 16/07/2014.
|
2014-05-16 18:51:01 +08:00
|
|
|
// Changes: None.
|
|
|
|
//--
|
|
|
|
class CMIUtilDateTimeStd
|
|
|
|
{
|
|
|
|
// Methods:
|
|
|
|
public:
|
|
|
|
/* ctor */ CMIUtilDateTimeStd( void );
|
|
|
|
|
2014-08-09 00:47:42 +08:00
|
|
|
CMIUtilString GetDate( void );
|
|
|
|
CMIUtilString GetTime( void );
|
2014-05-16 18:51:01 +08:00
|
|
|
|
|
|
|
// Overrideable:
|
|
|
|
public:
|
|
|
|
// From CMICmnBase
|
|
|
|
/* dtor */ virtual ~CMIUtilDateTimeStd( void );
|
|
|
|
|
2014-08-09 00:47:42 +08:00
|
|
|
// Attributes:
|
2014-05-16 18:51:01 +08:00
|
|
|
private:
|
2014-08-09 00:47:42 +08:00
|
|
|
std::time_t m_rawTime;
|
|
|
|
MIchar m_pScratch[ 16 ];
|
2014-05-16 18:51:01 +08:00
|
|
|
};
|