-Clock::Clock ( SGPropertyNode *node )
- : _is_serviceable(true),
- _gmt_time_sec(0),
- _offset_sec(0),
- _indicated_sec(0),
- _standstill_offset(0),
- name("clock"),
- num(0)
-{
- _indicated_string[0] = '\0';
-
- int i;
- for ( i = 0; i < node->nChildren(); ++i ) {
- SGPropertyNode *child = node->getChild(i);
- string cname = child->getName();
- string cval = child->getStringValue();
- if ( cname == "name" ) {
- name = cval;
- } else if ( cname == "number" ) {
- num = child->getIntValue();
- } else {
- SG_LOG( SG_INSTR, SG_WARN, "Error in clock config logic" );
- if ( name.length() ) {
- SG_LOG( SG_INSTR, SG_WARN, "Section = " << name );
- }
- }
- }
-}
-
-Clock::Clock ()
- : _is_serviceable(true),
- _gmt_time_sec(0),
- _offset_sec(0),
- _indicated_sec(0),
- _standstill_offset(0)
+Clock::Clock(SGPropertyNode *node) :
+ _name(node->getStringValue("name", "clock")),
+ _num(node->getIntValue("number", 0)),
+ _is_serviceable(true),
+ _gmt_time_sec(0),
+ _offset_sec(0),
+ _indicated_sec(0),
+ _indicated_min(0),
+ _indicated_hour(0),
+ _local_hour(0),
+ _standstill_offset(0)