sensorfw: datatypes/datarange.h File Reference

sensorfw

Classes | Typedefs | Functions
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< IntegerRange > | IntegerRangeList
typedef QList< DataRange > | DataRangeList

## 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-t.nosp@m.imo..nosp@m.2.ron.nosp@m.gas@.nosp@m.nokia.nosp@m..com
  Antti Virtanen antti.nosp@m..i.v.nosp@m.irtan.nosp@m.en@n.nosp@m.okia..nosp@m.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

## ◆ DataRangeList

typedef QList<DataRange> DataRangeList

Definition at line 105 of file datarange.h.

## ◆ IntegerRange

typedef QPair<unsigned int, unsigned int> IntegerRange

Definition at line 35 of file datarange.h.

## ◆ IntegerRangeList

typedef QList<IntegerRange> IntegerRangeList

Definition at line 38 of file datarange.h.

## Function Documentation

## ◆ isInRange()

template<typename T , typename U >

bool isInRange | ( | T | ref,
|  | const U & | container )
| inline

Checks is given value inside range list.

Parameters

  ref | value to check.
  container | range list.

Returns
  is value in range or not.

Definition at line 324 of file datarange.h.

## ◆ operator<<() [1/4]

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

Marshall the DataRange into a D-Bus argument.

Parameters

  argument | dbus argument.
  data | data to marshall.

Returns
  dbus argument.

Definition at line 117 of file datarange.h.

## ◆ operator<<() [2/4]

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

Marshall the DataRangeList into a D-Bus argument.

Parameters

  argument | dbus argument.
  data | data to marshall.

Returns
  dbus argument.

Definition at line 147 of file datarange.h.

## ◆ operator<<() [3/4]

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

Marshall the IntegerRange into a D-Bus argument.

Parameters

  argument | dbus argument.
  data | data to marshall.

Returns
  dbus argument.

Definition at line 185 of file datarange.h.

## ◆ operator<<() [4/4]

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

Marshall the IntegerRangeList into a D-Bus argument.

Parameters

  argument | dbus argument.
  data | data to marshall.

Returns
  dbus argument.

Definition at line 215 of file datarange.h.

## ◆ operator>>() [1/4]

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

Unmarshall DataRange from the D-Bus argument.

Parameters

  argument | dbus argument.
  data | unmarshalled data.

Returns
  dbus argument.

Definition at line 132 of file datarange.h.

## ◆ operator>>() [2/4]

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

Unmarshall DataRangeList from the D-Bus argument.

Parameters

  argument | dbus argument.
  data | unmarshalled data.

Returns
  dbus argument.

Definition at line 165 of file datarange.h.

## ◆ operator>>() [3/4]

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

Unmarshall IntegerRange from the D-Bus argument.

Parameters

  argument | dbus argument.
  data | unmarshalled data.

Returns
  dbus argument.

Definition at line 200 of file datarange.h.

## ◆ operator>>() [4/4]

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

Unmarshall IntegerRangeList from the D-Bus argument.

Parameters

  argument | dbus argument.
  data | unmarshalled data.

Returns
  dbus argument.

Definition at line 233 of file datarange.h.