RoadLogEvent.h
Go to the documentation of this file.
00001 /****************************************************************************
00002 **
00003 ** Copyright (c) 2008-2011 C.B. Barber. All rights reserved.
00004 ** $Id: //main/2011/qhull/src/road/RoadLogEvent.h#3 $$Change: 1342 $
00005 ** $DateTime: 2011/03/07 21:55:47 $$Author: bbarber $
00006 **
00007 ****************************************************************************/
00008 
00009 #ifndef ROADLOGEVENT_H
00010 #define ROADLOGEVENT_H
00011 
00012 #include <ostream>
00013 #include <stdexcept>
00014 #include <string>
00015 
00016 namespace orgQhull {
00017 
00018 #//Types
00019 
00020     struct RoadLogEvent;
00021 
00022 struct RoadLogEvent {
00023 
00024 public:
00025 #//Fields
00026     const char     *format_string; 
00027     int             int_1;       
00028     int             int_2;       
00029     float           float_1;     
00030     union {                      
00031         const char *cstr_1;      
00032         const void *void_1;      
00033         long long   int64_1;     
00034         double      double_1;    
00035     };
00036 
00037 #//Constants
00038 
00039 #//Constructors
00040     RoadLogEvent() : format_string(0), int_1(0), int_2(0), float_1(0), int64_1(0) {};
00041     explicit RoadLogEvent(const char *fmt) : format_string(fmt), int_1(0), int_2(0), float_1(0), int64_1(0) {};
00042     RoadLogEvent(const char *fmt, int d) : format_string(fmt), int_1(d), int_2(0), float_1(0), int64_1(0) {};
00043     RoadLogEvent(const char *fmt, int d, int d2) : format_string(fmt), int_1(d), int_2(d2), float_1(0), int64_1(0) {};
00044     RoadLogEvent(const char *fmt, int d, int d2, float f) : format_string(fmt), int_1(d), int_2(d2), float_1(f), int64_1(0) {};
00045     RoadLogEvent(const char *fmt, int d, int d2, float f, const char *s) : format_string(fmt), int_1(d), int_2(d2), float_1(f), cstr_1(s) {};
00046     RoadLogEvent(const char *fmt, int d, int d2, float f, const void *x) : format_string(fmt), int_1(d), int_2(d2), float_1(f), void_1(x) {};
00047     RoadLogEvent(const char *fmt, int d, int d2, float f, int i) : format_string(fmt), int_1(d), int_2(d2), float_1(f), int64_1(i) {};
00048     RoadLogEvent(const char *fmt, int d, int d2, float f, long long i) : format_string(fmt), int_1(d), int_2(d2), float_1(f), int64_1(i) {};
00049     RoadLogEvent(const char *fmt, int d, int d2, float f, double g) : format_string(fmt), int_1(d), int_2(d2), float_1(f), double_1(g) {};
00050     ~RoadLogEvent() {};
00052 
00053 #//GetSet
00054     bool                isDefined() const { return format_string!=0; }
00055     int                 int1() const { return int_1; };
00056     int                 int2() const { return int_2; };
00057     float               float1() const { return float_1; };
00058     const char         *format() const { return format_string; };
00059     const char         *cstr1() const { return cstr_1; };
00060     const void         *void1() const { return void_1; };
00061     long long           int64() const { return int64_1; };
00062     double              double1() const { return double_1; };
00063 
00064 #//Conversion
00065 
00066     std::string        toString(const char* tag, int code) const;
00067 
00068 private:
00069 #//Class helpers
00070     static bool         firstExtraCode(std::ostream &os, char c, char *extraCode);
00071 
00072 
00073 };//class RoadLogEvent
00074 
00075 }//namespace orgQhull
00076 
00077 #endif // ROADLOGEVENT_H
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines


libqhull
Author(s): Robert Krug
autogenerated on Tue Jun 18 2013 12:38:50