libprop: Source Class Reference

- Main Page
- Namespaces
- Classes
- Files

- Class List
- Class Hierarchy
- Class Members

# Source Class Reference

Interface to a data source. Sources can be asked to fill Point objects with any available data. More...

`#include <source.h>`

Inheritance diagram for Source:

List of all members.

## Public Member Functions
virtual void | resolve (Point *p)=0
void | resolveList (vector< Point * > list)
virtual bool | contains (Point *p)
## Protected Member Functions
| Source ()
| Source (Convert *_convert, int _type)
## Protected Attributes
Convert * | convert
| Conversion to apply to each incoming Point.
int | type
| Enumeration describing what type of data this object provides.
int | ncols
int | nrows
double | top
double | left
double | bottom
double | right
double | cellsize
| Optional internal value describing the size of each data cell.
string | rawfilename
| Filename pointing at actual source datafile.
ifstream | raw
| Open stream to source datafile, if already opened.

## Detailed Description

Interface to a data source. Sources can be asked to fill Point objects with any available data.

## Constructor & Destructor Documentation

Source::Source | ( |  | ) | `[protected]`

Source::Source | ( | Convert * | _convert,
|  | int | _type |
| ) |  |  | `[protected]`

Create a new data source.

Parameters:

  | _convert | The conversion to apply to all incoming points
  | _type | Enumeration value describing the type of data we provide

## Member Function Documentation

virtual void Source::resolve | ( | Point * | p | ) | `[pure virtual]`

Resolve a given Point by filling it with any new data this source can provide. Will ignore given point if this source can't provide data.

Parameters:

  | p | The point to try filling with data

Implemented in SourceInteger, SourceGridFloat, and SourceGroup.

void Source::resolveList | ( | vector< Point * > | list | ) |

Resolve the entire list of Point objects by calling resolve() on each of them.

Parameters:

  | list | List of Point objects to try resolving

virtual bool Source::contains | ( | Point * | p | ) | `[virtual]`

Check if this source provides data about the given point.

Parameters:

  | p | Point to check against

Returns:
  True if this source provides data about given point, otherwise false.

Reimplemented in SourceGroup.

## Member Data Documentation

Convert* Source::convert`[protected]`

Conversion to apply to each incoming Point.

int Source::type`[protected]`

Enumeration describing what type of data this object provides.

int Source::ncols`[protected]`

int Source::nrows`[protected]`

double Source::top`[protected]`

double Source::left`[protected]`

double Source::bottom`[protected]`

double Source::right`[protected]`

double Source::cellsize`[protected]`

Optional internal value describing the size of each data cell.

string Source::rawfilename`[protected]`

Filename pointing at actual source datafile.

ifstream Source::raw`[protected]`

Open stream to source datafile, if already opened.

The documentation for this class was generated from the following file:

- source.h