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-2020 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 00107 class PoDateFormatMapping : public PoNode { 00108 00109 SO_NODE_HEADER(PoDateFormatMapping) ; 00110 00111 00112 public: 00113 00114 /* Fields */ 00115 00121 SoSFString date1 ; 00122 00127 SoSFString date2 ; 00128 00133 SoSFFloat coord1 ; 00134 00139 SoSFFloat coord2 ; 00140 00144 SoSFString format ; 00145 00146 /* Methods */ 00147 00151 PoDateFormatMapping() ; 00152 00159 SbBool getCoordinate(const char *date, float &coord) ; 00160 00161 /*----------------------------------------------------------------------------*/ 00162 00163 00164 private: 00165 virtual void doAction(SoAction *action) ; 00166 00167 private: 00168 static void initClass() ; 00169 static void exitClass() ; 00170 00171 private: 00172 virtual ~PoDateFormatMapping() ; 00173 00174 private: 00175 static void formatChangedCB(void *data, SoSensor *) ; 00176 static void dateCoordChangedCB(void *data, SoSensor *) ; 00177 00178 void updateDateFormatMapping() ; 00179 00180 SbBool m_formatChanged ; 00181 SbBool m_dateCoordChanged ; 00182 PbDateFormatMapping *m_format ; 00183 SoFieldSensor *m_date1Sensor ; 00184 SoFieldSensor *m_date2Sensor ; 00185 SoFieldSensor *m_coord1Sensor ; 00186 SoFieldSensor *m_coord2Sensor ; 00187 SoFieldSensor *m_formatSensor ; 00188 00189 } ; 00190 /*----------------------------------------------------------------------------*/ 00191 00192 #endif /* _PO_DATE_FORMAT_MAPPING_ */ 00193 00194