SeComLib
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Macros Pages
date_time.h
Go to the documentation of this file.
1 /*
2 SeComLib
3 Copyright 2012-2013 TU Delft, Information Security & Privacy Lab (http://isplab.tudelft.nl/)
4 
5 Contributors:
6 Inald Lagendijk (R.L.Lagendijk@TUDelft.nl)
7 Mihai Todor (todormihai@gmail.com)
8 Thijs Veugen (P.J.M.Veugen@tudelft.nl)
9 Zekeriya Erkin (z.erkin@tudelft.nl)
10 
11 Licensed under the Apache License, Version 2.0 (the "License");
12 you may not use this file except in compliance with the License.
13 You may obtain a copy of the License at
14 
15 http://www.apache.org/licenses/LICENSE-2.0
16 
17 Unless required by applicable law or agreed to in writing, software
18 distributed under the License is distributed on an "AS IS" BASIS,
19 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
20 See the License for the specific language governing permissions and
21 limitations under the License.
22 */
29 #ifndef DATE_TIME_HEADER_GUARD
30 #define DATE_TIME_HEADER_GUARD
31 
32 //defined for WIN64 as well
33 #ifdef _WIN32
34  #define _CRT_SECURE_NO_WARNINGS
36 #endif
37 
38 //include C++ headers
39 #include <ctime>
40 #include <string>
41 
42 namespace SeComLib {
43 namespace Utils {
47  class DateTime {
48  public:
50  static std::string Now (const std::string &format = "%H:%M:%S");
51 
52  private:
54  DateTime ();
55 
57  ~DateTime ();
58 
60  DateTime (DateTime const &);
61 
63  DateTime operator= (DateTime const &);
64  };
65 
66 }//namespace Utils
67 }//namespace SeComLib
68 
69 #endif//DATE_TIME_HEADER_GUARD
DateTime operator=(DateTime const &)
Copy assignment operator - not implemented.
~DateTime()
Destructor - void implementation.
Utilitary class providing date and time functions.
Definition: date_time.h:47
DateTime()
Default constructor - not implemented.
static std::string Now(const std::string &format="%H:%M:%S")
Returns the formatted current time.
Definition: date_time.cpp:38