SourceInteger Class Reference

Interface to a data source. Sources can be asked to fill Point objects with any available data. Specifically handles data files in integer format, usually ending with ".bil" extension. More...

#include <source.h>

Inheritance diagram for SourceInteger:

Source

List of all members.

Public Member Functions

 SourceInteger (Convert *convert, int type, string filename, bool cache)
 ~SourceInteger ()
void resolve (Point *p)

Protected Member Functions

int value (int offset)

Protected Attributes

int * cache
 Internal cache of entire data file, if requested.


Detailed Description

Interface to a data source. Sources can be asked to fill Point objects with any available data. Specifically handles data files in integer format, usually ending with ".bil" extension.

Constructor & Destructor Documentation

SourceInteger::SourceInteger ( Convert convert,
int  type,
string  filename,
bool  cache 
)

Create a new integer data source.

Parameters:
convert The conversion to apply to all incoming points
type Enumeration value describing the type of data we provide
filename Filename pointing to ".hdr" file for this data source
cache Cache entire data file in memory if true, otherwise read directly from file when requested

SourceInteger::~SourceInteger (  ) 


Member Function Documentation

int SourceInteger::value ( int  offset  )  [protected]

Retrieve a specific value, either from raw source file, or from cache if it exists.

Parameters:
offset Offset into the data file to read
Returns:
Value at offset location

void SourceInteger::resolve ( Point p  )  [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

Implements Source.


Member Data Documentation

int* SourceInteger::cache [protected]

Internal cache of entire data file, if requested.


The documentation for this class was generated from the following file:
Generated on Sat Feb 23 21:49:23 2008 for libprop by  doxygen 1.5.4