RAII approach to the old TopoFusion Layer data structure.
More...
#include <autolayer.h>
RAII approach to the old TopoFusion Layer data structure.
kjb::TopoFusion::AutoLayer::AutoLayer |
( |
| ) |
|
|
inline |
default ctor makes a Layer ready for writing
kjb::TopoFusion::AutoLayer::AutoLayer |
( |
const std::string & |
filename | ) |
|
|
inline |
ctor loads a layer from a named file
kjb::TopoFusion::AutoLayer::~AutoLayer |
( |
| ) |
|
|
inline |
Dtor makes sure the layer resources are released.
void kjb::TopoFusion::AutoLayer::add_waypoint |
( |
const pt & |
p, |
|
|
const char * |
name, |
|
|
int |
index |
|
) |
| |
A layer can hold a list of waypoints; this adds one to the list.
We CANNOT use the add waypoint method of layer.h because that assumes the waypoint is to be inserted somewhere in the global Layer structure, which we no longer use. This method emulates that one; REALLOC makes it briefer.
layer* kjb::TopoFusion::AutoLayer::get_writable_ptr |
( |
| ) |
|
|
inline |
This is a "dangerous" method that lets you manipulate the Layer.
kjb::TopoFusion::AutoLayer::operator const layer & |
( |
| ) |
const |
|
inline |
this cheat lets us use an AutoLayer like a const Layer object
pt * kjb::TopoFusion::AutoLayer::set_track0points |
( |
unsigned |
num, |
|
|
const pt * |
src = 00 |
|
) |
| |
define the first track in a layer.
- Parameters
-
num | number of points in the track |
src | array of points (pt objects) in the track |
- Returns
- pointer to array of points where the input is stored
A Layer can hold multiple tracks. This method lets you specify the points (an array of struct pt objects) for the first track.
int kjb::TopoFusion::AutoLayer::write |
( |
const std::string & |
filename | ) |
|
|
inline |
Write a layer into a file.
The documentation for this class was generated from the following files: