yocto_longitude.h
Go to the documentation of this file.
1 /*********************************************************************
2  *
3  * $Id: yocto_longitude.h 28748 2017-10-03 08:23:39Z seb $
4  *
5  * Declares yFindLongitude(), the high-level API for Longitude functions
6  *
7  * - - - - - - - - - License information: - - - - - - - - -
8  *
9  * Copyright (C) 2011 and beyond by Yoctopuce Sarl, Switzerland.
10  *
11  * Yoctopuce Sarl (hereafter Licensor) grants to you a perpetual
12  * non-exclusive license to use, modify, copy and integrate this
13  * file into your software for the sole purpose of interfacing
14  * with Yoctopuce products.
15  *
16  * You may reproduce and distribute copies of this file in
17  * source or object form, as long as the sole purpose of this
18  * code is to interface with Yoctopuce products. You must retain
19  * this notice in the distributed source file.
20  *
21  * You should refer to Yoctopuce General Terms and Conditions
22  * for additional information regarding your rights and
23  * obligations.
24  *
25  * THE SOFTWARE AND DOCUMENTATION ARE PROVIDED 'AS IS' WITHOUT
26  * WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING
27  * WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY, FITNESS
28  * FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO
29  * EVENT SHALL LICENSOR BE LIABLE FOR ANY INCIDENTAL, SPECIAL,
30  * INDIRECT OR CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA,
31  * COST OF PROCUREMENT OF SUBSTITUTE GOODS, TECHNOLOGY OR
32  * SERVICES, ANY CLAIMS BY THIRD PARTIES (INCLUDING BUT NOT
33  * LIMITED TO ANY DEFENSE THEREOF), ANY CLAIMS FOR INDEMNITY OR
34  * CONTRIBUTION, OR OTHER SIMILAR COSTS, WHETHER ASSERTED ON THE
35  * BASIS OF CONTRACT, TORT (INCLUDING NEGLIGENCE), BREACH OF
36  * WARRANTY, OR OTHERWISE.
37  *
38  *********************************************************************/
39 
40 
41 #ifndef YOCTO_LONGITUDE_H
42 #define YOCTO_LONGITUDE_H
43 
44 #include "yocto_api.h"
45 #include <cfloat>
46 #include <cmath>
47 #include <map>
48 
49 //--- (YLongitude return codes)
50 //--- (end of YLongitude return codes)
51 //--- (YLongitude definitions)
52 class YLongitude; // forward declaration
53 
54 typedef void (*YLongitudeValueCallback)(YLongitude *func, const string& functionValue);
55 class YMeasure; // forward declaration
56 typedef void (*YLongitudeTimedReportCallback)(YLongitude *func, YMeasure measure);
57 //--- (end of YLongitude definitions)
58 
59 //--- (YLongitude declaration)
69 #ifdef __BORLANDC__
70 #pragma option push -w-8022
71 #endif
72 //--- (end of YLongitude declaration)
73 protected:
74  //--- (YLongitude attributes)
75  // Attributes (function value cache)
78 
79  friend YLongitude *yFindLongitude(const string& func);
80  friend YLongitude *yFirstLongitude(void);
81 
82  // Constructor is protected, use yFindLongitude factory function to instantiate
83  YLongitude(const string& func);
84  //--- (end of YLongitude attributes)
85 
86 public:
87  ~YLongitude();
88  //--- (YLongitude accessors declaration)
89 
90 
118  static YLongitude* FindLongitude(string func);
119 
131  virtual int registerValueCallback(YLongitudeValueCallback callback);
133 
134  virtual int _invokeValueCallback(string value);
135 
149 
150  virtual int _invokeTimedReportCallback(YMeasure value);
151 
152 
153  inline static YLongitude* Find(string func)
154  { return YLongitude::FindLongitude(func); }
155 
163  YLongitude *nextLongitude(void);
164  inline YLongitude *next(void)
165  { return this->nextLongitude();}
166 
176  static YLongitude* FirstLongitude(void);
177  inline static YLongitude* First(void)
178  { return YLongitude::FirstLongitude();}
179 #ifdef __BORLANDC__
180 #pragma option pop
181 #endif
182  //--- (end of YLongitude accessors declaration)
183 };
184 
185 //--- (YLongitude functions declaration)
186 
214 inline YLongitude* yFindLongitude(const string& func)
215 { return YLongitude::FindLongitude(func);}
226 { return YLongitude::FirstLongitude();}
227 
228 //--- (end of YLongitude functions declaration)
229 
230 #endif
YLongitude * yFindLongitude(const string &func)
static YLongitude * First(void)
YLongitude * next(void)
void(* YLongitudeTimedReportCallback)(YLongitude *func, YMeasure measure)
static YLongitude * Find(string func)
virtual int registerTimedReportCallback(YSensorTimedReportCallback callback)
Definition: yocto_api.cpp:7923
YLongitudeTimedReportCallback _timedReportCallbackLongitude
virtual int _invokeTimedReportCallback(YMeasure value)
Definition: yocto_api.cpp:7936
virtual int _invokeValueCallback(string value)
Definition: yocto_api.cpp:7645
YLongitudeValueCallback _valueCallbackLongitude
virtual int registerValueCallback(YSensorValueCallback callback)
Definition: yocto_api.cpp:7626
#define YOCTO_CLASS_EXPORT
Definition: yocto_api.h:61
static YLongitude * FirstLongitude(void)
YLongitude * yFirstLongitude(void)
void(* YLongitudeValueCallback)(YLongitude *func, const string &functionValue)
static YLongitude * FindLongitude(string func)


yoctopuce_altimeter
Author(s): Anja Sheppard
autogenerated on Mon Jun 10 2019 15:49:11