sensorfw
datatypes/datarange.h File Reference

Datatype containing sensor data range and resolution. More...

#include <QObject>
#include <QDBusArgument>
#include <QPair>

Go to the source code of this file.

Classes

class  DataRange
 Datatype for storing sensor data range information. More...
class  DataRangeRequest
 DataRange request class. More...
class  IntervalRequest
 Interval Request class. More...

Typedefs

typedef QPair< unsigned int,
unsigned int > 
IntegerRange
typedef QList< IntegerRangeIntegerRangeList
typedef QList< DataRangeDataRangeList

Functions

QDBusArgument & operator<< (QDBusArgument &argument, const DataRange &data)
 Marshall the DataRange into a D-Bus argument.
const QDBusArgument & operator>> (const QDBusArgument &argument, DataRange &data)
 Unmarshall DataRange from the D-Bus argument.
QDBusArgument & operator<< (QDBusArgument &argument, const DataRangeList &data)
 Marshall the DataRangeList into a D-Bus argument.
const QDBusArgument & operator>> (const QDBusArgument &argument, DataRangeList &data)
 Unmarshall DataRangeList from the D-Bus argument.
QDBusArgument & operator<< (QDBusArgument &argument, const IntegerRange &data)
 Marshall the IntegerRange into a D-Bus argument.
const QDBusArgument & operator>> (const QDBusArgument &argument, IntegerRange &data)
 Unmarshall IntegerRange from the D-Bus argument.
QDBusArgument & operator<< (QDBusArgument &argument, const IntegerRangeList &data)
 Marshall the IntegerRangeList into a D-Bus argument.
const QDBusArgument & operator>> (const QDBusArgument &argument, IntegerRangeList &data)
 Unmarshall IntegerRangeList from the D-Bus argument.
template<typename T , typename U >
bool isInRange (T ref, const U &container)
 Checks is given value inside range list.

Detailed Description

Datatype containing sensor data range and resolution.

Copyright (C) 2009-2010 Nokia Corporation

Author:
Timo Rongas <ext-timo.2.rongas@nokia.com>
Antti Virtanen <antti.i.virtanen@nokia.com>

This file is part of Sensord.

Sensord is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License version 2.1 as published by the Free Software Foundation.

Sensord is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with Sensord. If not, see <http://www.gnu.org/licenses/>.

Definition in file datarange.h.


Typedef Documentation

typedef QList<DataRange> DataRangeList

Definition at line 105 of file datarange.h.

typedef QPair<unsigned int, unsigned int> IntegerRange

Definition at line 35 of file datarange.h.

Definition at line 38 of file datarange.h.


Function Documentation

template<typename T , typename U >
bool isInRange ( ref,
const U &  container 
) [inline]

Checks is given value inside range list.

Parameters:
refvalue to check.
containerrange list.
Returns:
is value in range or not.

Definition at line 324 of file datarange.h.

QDBusArgument& operator<< ( QDBusArgument &  argument,
const DataRange data 
) [inline]

Marshall the DataRange into a D-Bus argument.

Parameters:
argumentdbus argument.
datadata to marshall.
Returns:
dbus argument.

Definition at line 117 of file datarange.h.

QDBusArgument& operator<< ( QDBusArgument &  argument,
const DataRangeList data 
) [inline]

Marshall the DataRangeList into a D-Bus argument.

Parameters:
argumentdbus argument.
datadata to marshall.
Returns:
dbus argument.

Definition at line 147 of file datarange.h.

QDBusArgument& operator<< ( QDBusArgument &  argument,
const IntegerRange data 
) [inline]

Marshall the IntegerRange into a D-Bus argument.

Parameters:
argumentdbus argument.
datadata to marshall.
Returns:
dbus argument.

Definition at line 185 of file datarange.h.

QDBusArgument& operator<< ( QDBusArgument &  argument,
const IntegerRangeList data 
) [inline]

Marshall the IntegerRangeList into a D-Bus argument.

Parameters:
argumentdbus argument.
datadata to marshall.
Returns:
dbus argument.

Definition at line 215 of file datarange.h.

const QDBusArgument& operator>> ( const QDBusArgument &  argument,
DataRange data 
) [inline]

Unmarshall DataRange from the D-Bus argument.

Parameters:
argumentdbus argument.
dataunmarshalled data.
Returns:
dbus argument.

Definition at line 132 of file datarange.h.

const QDBusArgument& operator>> ( const QDBusArgument &  argument,
DataRangeList data 
) [inline]

Unmarshall DataRangeList from the D-Bus argument.

Parameters:
argumentdbus argument.
dataunmarshalled data.
Returns:
dbus argument.

Definition at line 165 of file datarange.h.

const QDBusArgument& operator>> ( const QDBusArgument &  argument,
IntegerRange data 
) [inline]

Unmarshall IntegerRange from the D-Bus argument.

Parameters:
argumentdbus argument.
dataunmarshalled data.
Returns:
dbus argument.

Definition at line 200 of file datarange.h.

const QDBusArgument& operator>> ( const QDBusArgument &  argument,
IntegerRangeList data 
) [inline]

Unmarshall IntegerRangeList from the D-Bus argument.

Parameters:
argumentdbus argument.
dataunmarshalled data.
Returns:
dbus argument.

Definition at line 233 of file datarange.h.