Shiokaze Framework
A research-oriented fluid solver for computer graphics
deadline.h
Go to the documentation of this file.
1 /*
2 ** deadline.h
3 **
4 ** This is part of Shiokaze, a research-oriented fluid solver for computer graphics.
5 ** Created by Ryoichi Ando <rand@nii.ac.jp> on Jan 31, 2017.
6 **
7 ** Permission is hereby granted, free of charge, to any person obtaining a copy of
8 ** this software and associated documentation files (the "Software"), to deal in
9 ** the Software without restriction, including without limitation the rights to use,
10 ** copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the
11 ** Software, and to permit persons to whom the Software is furnished to do so,
12 ** subject to the following conditions:
13 **
14 ** The above copyright notice and this permission notice shall be included in all copies
15 ** or substantial portions of the Software.
16 **
17 ** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
18 ** INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
19 ** PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
20 ** HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
21 ** CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
22 ** OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23 */
24 //
25 #ifndef SHKZ_DEADLINE_H
26 #define SHKZ_DEADLINE_H
27 //
28 /************** How to use this code ***************
29 //
30 deadline deadlines;
31 deadlines.add_deadline("SIGGRAPH",1,17);
32 deadlines.add_deadline("SIGGRAPH Asia",5,17);
33 deadlines.add_deadline("SIGGRAPH Asia Technical Briefs",8,15);
34 deadlines.add_deadline("Eurographics",10,14);
35 //
36 std::string name; int days;
37 deadlines.get_next_deadline(name,days);
38 //
39 printf( "Next deadline: %s, %d days.\n", name.c_str(), days );
40 //
41 ****************************************************/
42 //
43 #include <vector>
44 #include <string>
45 #include <shiokaze/core/common.h>
46 //
48 //
50 class deadline {
53 public:
64  void add_deadline( std::string name, int month, int day );
73  void get_next_deadline( std::string &name, int &days ) const;
74  //
75 private:
76  //
77  typedef struct {
78  std::string name;
79  int month;
80  int day;
81  } _deadline;
82  //
83  std::vector<_deadline> m_deadlines;
84 };
85 //
87 //
88 #endif
deadline::get_next_deadline
void get_next_deadline(std::string &name, int &days) const
Get days until next closest deadline.
deadline
Class that tells you the next deadline.
Definition: deadline.h:52
SHKZ_BEGIN_NAMESPACE
#define SHKZ_BEGIN_NAMESPACE
Name space beggining definition for shiokaze.
Definition: common.h:39
common.h
deadline::add_deadline
void add_deadline(std::string name, int month, int day)
Add a new deadline.
SHKZ_END_NAMESPACE
#define SHKZ_END_NAMESPACE
Name space end definition for shiokaze.
Definition: common.h:44