occurrence.h

Go to the documentation of this file.
00001 #ifndef OCCURRENCE_CLASS
00002 #define OCCURRENCE_CLASS
00003 
00004 /*****************************************************************************\
00005 *                                                                             *
00006 *  Name   : occurrence                                                        *
00007 *  Author : Chris Koeritz                                                     *
00008 *                                                                             *
00009 *******************************************************************************
00010 * Copyright (c) 1990-$now By Author.  This program is free software; you can  *
00011 * redistribute it and/or modify it under the terms of the GNU General Public  *
00012 * License as published by the Free Software Foundation; either version 2 of   *
00013 * the License or (at your option) any later version.  This is online at:      *
00014 *     http://www.fsf.org/copyleft/gpl.html                                    *
00015 * Please send any updates to: fred@gruntose.com                               *
00016 \*****************************************************************************/
00017 
00018 #include "opsysdll.h"
00019 
00020 #include <basis/earth_time.h>
00021 #include <basis/function.h>
00022 #include <basis/istring.h>
00023 #include <basis/packable.h>
00024 #include <basis/object_base.h>
00025 
00027 
00036 class OPSYSTEM_CLASS_STYLE occurrence
00037 : public packable, public virtual object_base
00038 {
00039 public:
00040   outcome _out;  
00041   earth_time::time_locus _when;  
00042   istring _operation;  
00043   istring _location;
00045 
00048   IMPLEMENT_CLASS_NAME("occurrence");
00049 
00051   inline occurrence(const outcome &o = outcome(1),
00052       const earth_time::time_locus &when = earth_time::now(),
00053       const istring &operation = istring::empty_string(),
00054       const istring &location = istring::empty_string())
00055       : _out(o), _when(when), _operation(operation), _location(location) {}
00056 
00057   bool valid() const {
00059 
00060     return non_positive(_out.value());
00061   }
00062 
00063   virtual void pack(byte_array &packed_form) const;
00065 
00066   virtual bool unpack(byte_array &packed_form);
00068 };
00069 
00070 #endif
00071 

Generated on Fri Nov 28 04:29:29 2008 for HOOPLE Libraries by  doxygen 1.5.1