#include <BFeaturesOnDisk.h>

Public Member Functions | |
| virtual void | Add (const BFeatureCollection &features) |
| Appends the BFeature objects in the specified collection to this collection. | |
| virtual void | Add (const BFeaturePtr &feature) |
| Adds a BFeature to this collection. | |
| virtual void | Add (const BFeature &feature) |
| Copies the specified BFeature and adds it to this collection. | |
| BFeaturesOnDisk (const BFeaturesOnDisk &feats) | |
| Copy constructor. | |
| BFeaturesOnDisk (const BString &cacheName, Int32 pageSize) | |
| Constructor. | |
| BFeaturesOnDisk () | |
| Default constructor. | |
| virtual void | Clear (void) |
| Removes all BFeature objects from this collection. | |
| virtual const BFeaturePtr | GetAt (size_t index, bool inclCachedAttrs=true) const |
| Gets the BFeature at the specified index in this collection. | |
| virtual BFeaturePtr | GetAt (size_t index, bool inclCachedAttrs=true) |
| Gets the BFeature at the specified index in this collection. | |
| virtual size_t | GetCount (void) const |
| Gets the number of BFeature objects in this collection. | |
| virtual void | Release (size_t index) |
| Releases the memory associated with a BFeature. | |
| virtual void | Remove (size_t index) |
| Removes a BFeature from this collection. | |
| virtual void | Reserve (size_t size) |
| Reserves space for the requested number of elements in this collection. | |
| virtual void | Transform (const BTransform &cst) |
| Transforms the geometry of each BFeature in this collection to a different coordinate system. | |
| virtual void | TransformReverse (const BTransform &cst) |
| Transforms the geometry of each BFeature in this collection to a different coordinate system using the "reverse" of the BTransform. | |
| virtual | ~BFeaturesOnDisk () |
| Destructor. | |
Protected Member Functions | |
| BRect | ComputeMBR (void) const |
| Computes the minimum bounding rectangle for the BFeature objects in this collection. | |
| BFeaturePtr | ReadFeatureFromCache (Int32 id, bool inclAttrs) const |
| Reads a BFeature from the BDiskCache. | |
| void | RemoveFeatureFromCache (Int32 id) |
| Removes a BFeature from the BDiskCache. | |
| void | ReplaceFeatureInCache (Int32 id, BFeature &feature) |
| Replace a BFeature in the BDiskCache. | |
| Int32 | WriteFeatureToCache (const BFeature &feature) |
| Writes a BFeature to the BDiskCache. | |
Protected Attributes | |
| BString | m_cacheName |
| The base file name for the cache. | |
| Int32Vector | m_featureIDs |
| The feature ID index. | |
| Int32 | m_pageSize |
| The page size for the cache. | |
| BDiskCachePtr | m_pCache |
| The BDiskCache that holds the data for this collection. | |
| BFeaturesOnDisk | ( | ) |
Default constructor.
This constructor will create an empty collection.
| BFeaturesOnDisk | ( | const BString & | cacheName, | |
| Int32 | pageSize | |||
| ) |
Constructor.
This constructor will create an empty collection that uses the specified cache.
| cacheName | The base file name to be used for the cache. If an empty string is specified, a temporary file name will be generated. | |
| pageSize | The page size to be used in the cache. |
| BFeaturesOnDisk | ( | const BFeaturesOnDisk & | feats | ) |
| virtual ~BFeaturesOnDisk | ( | ) | [inline, virtual] |
Destructor.
| virtual void Add | ( | const BFeatureCollection & | features | ) | [virtual] |
Appends the BFeature objects in the specified collection to this collection.
| features | The collection of BFeature objects to be added. |
| BUnknownGeometryException | This exception will be thrown if the geometry associated with the specified feature is not of the correct class. |
Implements BFeatureCollection.
| virtual void Add | ( | const BFeaturePtr & | feature | ) | [virtual] |
Adds a BFeature to this collection.
| feature | Pointer to the feature to be added. |
| BUnknownGeometryException | This exception will be thrown if the geometry associated with the specified feature is not of the correct class. |
Implements BFeatureCollection.
| virtual void Add | ( | const BFeature & | feature | ) | [virtual] |
Copies the specified BFeature and adds it to this collection.
| feature | The BFeature to be copied and added to this collection. |
| BUnknownGeometryException | This exception will be thrown if the geometry associated with the specified feature is not of the correct class. |
Implements BFeatureCollection.
| virtual void Clear | ( | void | ) | [virtual] |
Removes all BFeature objects from this collection.
Derived classes should call Clear method in the base class implementation.
Reimplemented from BFeatureCollection.
| BRect ComputeMBR | ( | void | ) | const [protected, virtual] |
Computes the minimum bounding rectangle for the BFeature objects in this collection.
Implements BFeatureCollection.
| virtual const BFeaturePtr GetAt | ( | size_t | index, | |
| bool | inclCachedAttrs = true | |||
| ) | const [virtual] |
Gets the BFeature at the specified index in this collection.
| index | The zero-based index of the desired BFeature. | |
| inclCachedAttrs | Indicates whether the returned feature will contain attributes. This applies only when the features are stored in a disk cache, and can be used to improve performance in applications where attributes are not needed. If the features are stored in memory, this has no effect. |
| BIndexOutOfBoundsException | This exception will be thrown if the specified index does not correspond to a BFeature in this collection. |
Implements BFeatureCollection.
| virtual BFeaturePtr GetAt | ( | size_t | index, | |
| bool | inclCachedAttrs = true | |||
| ) | [virtual] |
Gets the BFeature at the specified index in this collection.
| index | The zero-based index of the desired BFeature. | |
| inclCachedAttrs | Indicates whether the returned feature will contain attributes. This applies only when the features are stored in a disk cache, and can be used to improve performance in applications where attributes are not needed. If the features are stored in memory, this has no effect. |
| BIndexOutOfBoundsException | This exception will be thrown if the specified index does not correspond to a BFeature in this collection. |
Implements BFeatureCollection.
| virtual size_t GetCount | ( | void | ) | const [inline, virtual] |
Gets the number of BFeature objects in this collection.
Implements BFeatureCollection.
| BFeaturePtr ReadFeatureFromCache | ( | Int32 | id, | |
| bool | inclAttrs | |||
| ) | const [protected] |
Reads a BFeature from the BDiskCache.
| id | The ID for the BFeature to read from the BDiskCache. | |
| inclAttrs | Indicates whether or not to include the attributes when reading a feature from the cache. |
| virtual void Release | ( | size_t | index | ) | [inline, virtual] |
Releases the memory associated with a BFeature.
This method has no effect on features stored in the disk cache.
| index | The zero-based index of the BFeature to be released. |
Implements BFeatureCollection.
| virtual void Remove | ( | size_t | index | ) | [virtual] |
Removes a BFeature from this collection.
| index | The zero-based index of the BFeature to be removed. |
| BIndexOutOfBoundsException | This exception will be thrown if the specified index does not correspond to a BFeature in this collection. |
Implements BFeatureCollection.
| void RemoveFeatureFromCache | ( | Int32 | id | ) | [protected] |
Replace a BFeature in the BDiskCache.
| id | The id of the BFeature to be replaced. | |
| feature | The BFeature object that will be written to the BDiskCache. |
| virtual void Reserve | ( | size_t | size | ) | [inline, virtual] |
Reserves space for the requested number of elements in this collection.
| size | The number of elements for which space shall be reserved. |
Implements BFeatureCollection.
| virtual void Transform | ( | const BTransform & | cst | ) | [virtual] |
Transforms the geometry of each BFeature in this collection to a different coordinate system.
| cst | The BTransform that defines the transformation. |
Implements BFeatureCollection.
| virtual void TransformReverse | ( | const BTransform & | cst | ) | [virtual] |
Transforms the geometry of each BFeature in this collection to a different coordinate system using the "reverse" of the BTransform.
| cst | The BTransform that defines the transformation. |
Implements BFeatureCollection.
Writes a BFeature to the BDiskCache.
| feature | The BFeature to be written to the BDiskCache. |
BString m_cacheName [protected] |
The base file name for the cache.
Int32Vector m_featureIDs [protected] |
The feature ID index.
Int32 m_pageSize [protected] |
The page size for the cache.
BDiskCachePtr m_pCache [protected] |
The BDiskCache that holds the data for this collection.