Difference between revisions of "BRL-CAD's core C++ interface"

From BRL-CAD
Line 16: Line 16:
 
As a consequence the interface will hide implementation details.
 
As a consequence the interface will hide implementation details.
 
Therefore the implementation can be changed without affecting an application using this interface.
 
Therefore the implementation can be changed without affecting an application using this interface.
 +
 +
 +
= Main Classes =
 +
 +
== ConstDatabase ==
 +
The '''ConstDatabase''' class provides a handle to read-only database content.
 +
 +
If it is associated with a file the file will be opened read-only.
 +
I.e. multiple instances of this class can refer to the same file.
 +
 +
== Database ==
 +
The '''Database''' class provides a handle to a writable database.
 +
It is derived from '''ConstDatabase''' and expanded by methods to modify the database's content.

Revision as of 04:24, 6 August 2008

Design icon.png This page contains the design document for an enhancement or feature. The design should be considered a work in progress and may not represent the final design. As this is a collaborative design, contributions and participation from other developers and users is encouraged. Use the discussion page for providing comments and suggestions.


Application Domain

The C++ interface is a object oriented API to BRL-CAD's core libraries around librt. The target group are developers of applications which use BRL-CAD as module.

Furthermore, this interface should be a good reference to the use of BRL-CAD's standard C interface.


Requirements

The interface should be self-contained

I.e. source code using this interface should not need to include any other BRL-CAD header file (nor TCL, openNURBS, ...).

As a consequence the interface will hide implementation details. Therefore the implementation can be changed without affecting an application using this interface.


Main Classes

ConstDatabase

The ConstDatabase class provides a handle to read-only database content.

If it is associated with a file the file will be opened read-only. I.e. multiple instances of this class can refer to the same file.

Database

The Database class provides a handle to a writable database. It is derived from ConstDatabase and expanded by methods to modify the database's content.