00001 /*======================================================================= 00002 *** THE CONTENT OF THIS WORK IS PROPRIETARY TO FEI S.A.S, (FEI S.A.S.), *** 00003 *** AND IS DISTRIBUTED UNDER A LICENSE AGREEMENT. *** 00004 *** *** 00005 *** REPRODUCTION, DISCLOSURE, OR USE, IN WHOLE OR IN PART, OTHER THAN AS *** 00006 *** SPECIFIED IN THE LICENSE ARE NOT TO BE UNDERTAKEN EXCEPT WITH PRIOR *** 00007 *** WRITTEN AUTHORIZATION OF FEI S.A.S. *** 00008 *** *** 00009 *** RESTRICTED RIGHTS LEGEND *** 00010 *** USE, DUPLICATION, OR DISCLOSURE BY THE GOVERNMENT OF THE CONTENT OF THIS *** 00011 *** WORK OR RELATED DOCUMENTATION IS SUBJECT TO RESTRICTIONS AS SET FORTH IN *** 00012 *** SUBPARAGRAPH (C)(1) OF THE COMMERCIAL COMPUTER SOFTWARE RESTRICTED RIGHT *** 00013 *** CLAUSE AT FAR 52.227-19 OR SUBPARAGRAPH (C)(1)(II) OF THE RIGHTS IN *** 00014 *** TECHNICAL DATA AND COMPUTER SOFTWARE CLAUSE AT DFARS 52.227-7013. *** 00015 *** *** 00016 *** COPYRIGHT (C) 1996-2014 BY FEI S.A.S, *** 00017 *** BORDEAUX, FRANCE *** 00018 *** ALL RIGHTS RESERVED *** 00019 **=======================================================================*/ 00020 /*======================================================================= 00021 ** Author : VSG (MMM YYYY) 00022 **=======================================================================*/ 00023 00024 #ifndef _PO_DATE_FORMAT_MAPPING_ 00025 #define _PO_DATE_FORMAT_MAPPING_ 00026 00027 #include <MeshViz/nodes/PoNode.h> 00028 #include <Inventor/fields/SoSFFloat.h> 00029 #include <Inventor/fields/SoSFString.h> 00030 00031 class PbDateFormatMapping ; 00032 class SoFieldSensor ; 00033 00106 class PoDateFormatMapping : public PoNode { 00107 00108 SO_NODE_HEADER(PoDateFormatMapping) ; 00109 00110 00111 public: 00112 00113 /* Fields */ 00114 00120 SoSFString date1 ; 00121 00126 SoSFString date2 ; 00127 00132 SoSFFloat coord1 ; 00133 00138 SoSFFloat coord2 ; 00139 00143 SoSFString format ; 00144 00145 /* Methods */ 00146 00150 PoDateFormatMapping() ; 00151 00158 SbBool getCoordinate(const char *date, float &coord) ; 00159 00160 /*----------------------------------------------------------------------------*/ 00161 00162 00163 private: 00164 virtual void doAction(SoAction *action) ; 00165 00166 private: 00167 static void initClass() ; 00168 static void exitClass() ; 00169 00170 private: 00171 virtual ~PoDateFormatMapping() ; 00172 00173 private: 00174 static void formatChangedCB(void *data, SoSensor *) ; 00175 static void dateCoordChangedCB(void *data, SoSensor *) ; 00176 00177 void updateDateFormatMapping() ; 00178 00179 SbBool m_formatChanged ; 00180 SbBool m_dateCoordChanged ; 00181 PbDateFormatMapping *m_format ; 00182 SoFieldSensor *m_date1Sensor ; 00183 SoFieldSensor *m_date2Sensor ; 00184 SoFieldSensor *m_coord1Sensor ; 00185 SoFieldSensor *m_coord2Sensor ; 00186 SoFieldSensor *m_formatSensor ; 00187 00188 } ; 00189 /*----------------------------------------------------------------------------*/ 00190 00191 #endif /* _PO_DATE_FORMAT_MAPPING_ */ 00192 00193