Swarm-NG  1.1
log.cpp
Go to the documentation of this file.
1 /*************************************************************************
2  * Copyright (C) 2011 by Eric Ford and the Swarm-NG Development Team *
3  * *
4  * This program is free software; you can redistribute it and/or modify *
5  * it under the terms of the GNU General Public License as published by *
6  * the Free Software Foundation; either version 3 of the License. *
7  * *
8  * This program is distributed in the hope that it will be useful, *
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
11  * GNU General Public License for more details. *
12  * *
13  * You should have received a copy of the GNU General Public License *
14  * along with this program; if not, write to the *
15  * Free Software Foundation, Inc., *
16  * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
17  ************************************************************************/
18 
25 #include "log.hpp"
26 namespace swarm { namespace log {
28  int num_ints_for_event(const int code)
29  {
30  switch(code)
31  {
32  case EVT_RV_OBS:
33  case EVT_ASTROM_OBS:
34  case EVT_TIMING_OBS:
36  case EVT_TRANSIT:
37  case EVT_OCCULTATION:
38  return 1;
39  case EVT_MUTUAL_EVENT:
40  return 2;
41  default:
42  return 0;
43  }
44  }
45 
47  int num_doubles_for_event(const int code)
48  {
49  switch(code)
50  {
51  case EVT_RV_OBS:
52  case EVT_TIMING_OBS:
53  return 1;
54  case EVT_ASTROM_OBS:
55  case EVT_TRANSIT:
56  case EVT_OCCULTATION:
57  case EVT_MUTUAL_EVENT:
58  return 2;
60  return 3;
61  default:
62  return 0;
63  }
64  }
65 
66 } } // namespace log:: swarm