Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

Utility and Overrideable Functions

Use the basic components and then derive custom classes to perform whatever data transformation, condensation or generation needed.

Utility functions

The framework provides a number of functions that are intended to be called by code in user derived classes. You should normally not override these implementions, but just call them when appropriate. See the section on Overrides below. The most important are:

Overrideable functions

Most utility functions above have a corresponding overrideable virtual implementation. The utility function calls really just wrap the actual implementations and handle propagation downstream or upstream in the case of errors.

Most overrides have the same name as the utility function, but prefixed with Out, such as:

In most cases you should call the base class implementation as part of the derived implementation.

Non-default Constructors

Due to the way the framework is to be used, you should not provide anything but elaborations on the default constructor in your derived classes. When you neeed further initialization, please use and call a separate member function like the following:

    public:
        CPipeMyDerivation *Init(...) {
            ...
            return this;
        }

Threading

To enable threading any CSink or CSource-derived class, use the template CThread as a wrapper, for example:

    pipe->Append(new CThread<CPipeReplace>);    // Run in a separate thread

Note that the threaded class and all that follow it down the pipe are run in the same thread, unless a new threaded class is appended to the chain.

Naming Conventions

A convention is to name derived classes with the prefix CPipe, CSplit, CJoin, CSink or CSource before the rest of the name. CPipe is used for all kinds of intermediate transformations. If it's a threading version, and you define the class explicitly, name it CTPipe, CTSplit etc.

AxPipe::CSeg pointers are usually named pSeg or variants thereof.

See also:
Introduction, Installation, A First Example, A Second Examle, Definitions of Terms, Stock Transformations, Utilities and Overrides

Generated on Mon Feb 2 13:19:21 2004 for AxPipe by doxygen 1.3.5