data_holder Class Reference

data_holder enforces the ref-counting semantics of data_block More...

#include <mtx/datablock.h>

Inheritance diagram for data_holder:

Inheritance graph
Collaboration diagram for data_holder:

Collaboration graph

List of all members.

Public Types

enum  init_policy { ZEROS, NO_INIT }
enum  storage_policy { COPY, BORROW, REFER }

Public Member Functions

 data_holder (double *data, int mrows, int ncols, storage_policy s)
 Construct with a data array, dimensions, and storage policy.
 data_holder (int mrows, int ncols, init_policy p)
 Construct empty with dimensions and an init policy.
 data_holder (data_block *d)
 Generic construction from a data_block.
 data_holder (const data_holder &other)
 Copy constructor.
 ~data_holder ()
void swap (data_holder &other)
 Swap contents with another data_holder.
void make_unique ()
 Make a unique copy of our data block if needed.
const double * storage () const
 Get a pointer to const underlying data.
double * storage_nc ()
 Get a pointer to non-const underlying data.
int storage_length () const
 Get the allocated length of underlying data array.

Detailed Description

data_holder enforces the ref-counting semantics of data_block

Definition at line 141 of file datablock.h.

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

The software described here is Copyright (c) 1998-2005, Rob Peters.
This page was generated Wed Dec 3 06:54:01 2008 by Doxygen version 1.5.5.