yocto_latitude.h
Go to the documentation of this file.
1 /*********************************************************************
2  *
3  * $Id: yocto_latitude.h 28748 2017-10-03 08:23:39Z seb $
4  *
5  * Declares yFindLatitude(), the high-level API for Latitude 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_LATITUDE_H
42 #define YOCTO_LATITUDE_H
43 
44 #include "yocto_api.h"
45 #include <cfloat>
46 #include <cmath>
47 #include <map>
48 
49 //--- (YLatitude return codes)
50 //--- (end of YLatitude return codes)
51 //--- (YLatitude definitions)
52 class YLatitude; // forward declaration
53 
54 typedef void (*YLatitudeValueCallback)(YLatitude *func, const string& functionValue);
55 class YMeasure; // forward declaration
56 typedef void (*YLatitudeTimedReportCallback)(YLatitude *func, YMeasure measure);
57 //--- (end of YLatitude definitions)
58 
59 //--- (YLatitude declaration)
69 #ifdef __BORLANDC__
70 #pragma option push -w-8022
71 #endif
72 //--- (end of YLatitude declaration)
73 protected:
74  //--- (YLatitude attributes)
75  // Attributes (function value cache)
78 
79  friend YLatitude *yFindLatitude(const string& func);
80  friend YLatitude *yFirstLatitude(void);
81 
82  // Constructor is protected, use yFindLatitude factory function to instantiate
83  YLatitude(const string& func);
84  //--- (end of YLatitude attributes)
85 
86 public:
87  ~YLatitude();
88  //--- (YLatitude accessors declaration)
89 
90 
118  static YLatitude* FindLatitude(string func);
119 
131  virtual int registerValueCallback(YLatitudeValueCallback callback);
133 
134  virtual int _invokeValueCallback(string value);
135 
149 
150  virtual int _invokeTimedReportCallback(YMeasure value);
151 
152 
153  inline static YLatitude* Find(string func)
154  { return YLatitude::FindLatitude(func); }
155 
163  YLatitude *nextLatitude(void);
164  inline YLatitude *next(void)
165  { return this->nextLatitude();}
166 
176  static YLatitude* FirstLatitude(void);
177  inline static YLatitude* First(void)
178  { return YLatitude::FirstLatitude();}
179 #ifdef __BORLANDC__
180 #pragma option pop
181 #endif
182  //--- (end of YLatitude accessors declaration)
183 };
184 
185 //--- (YLatitude functions declaration)
186 
214 inline YLatitude* yFindLatitude(const string& func)
215 { return YLatitude::FindLatitude(func);}
226 { return YLatitude::FirstLatitude();}
227 
228 //--- (end of YLatitude functions declaration)
229 
230 #endif
YLatitudeValueCallback _valueCallbackLatitude
YLatitude * next(void)
static YLatitude * FindLatitude(string func)
virtual int registerTimedReportCallback(YSensorTimedReportCallback callback)
Definition: yocto_api.cpp:7923
static YLatitude * Find(string func)
virtual int _invokeTimedReportCallback(YMeasure value)
Definition: yocto_api.cpp:7936
void(* YLatitudeTimedReportCallback)(YLatitude *func, YMeasure measure)
virtual int _invokeValueCallback(string value)
Definition: yocto_api.cpp:7645
YLatitude * yFirstLatitude(void)
static YLatitude * First(void)
void(* YLatitudeValueCallback)(YLatitude *func, const string &functionValue)
virtual int registerValueCallback(YSensorValueCallback callback)
Definition: yocto_api.cpp:7626
static YLatitude * FirstLatitude(void)
#define YOCTO_CLASS_EXPORT
Definition: yocto_api.h:61
YLatitude * yFindLatitude(const string &func)
YLatitudeTimedReportCallback _timedReportCallbackLatitude


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