## Public API Reference

- Main Page
- Classes
- Files

- Alphabetical List
- Class List
- Class Hierarchy
- Class Members

# celInitializer Class Reference

This class contains static member functions which can help set up an application to use the Crystal Entity Layer. More...

`#include <celtool/initapp.h>`

List of all members.

## Static Public Member Functions

static bool | RequestPlugins (iObjectRegistry *, csArray< csPluginRequest > const &)
| A convenience wrapper for csInitializer::RequestPlugins() which first invokes celInitializer::SetupCelPluginDirs().
static bool | RequestPlugins (iObjectRegistry *,...)
| A convenience wrapper for csInitializer::RequestPlugins() which first invokes celInitializer::SetupCelPluginDirs().
static bool | RequestPluginsV (iObjectRegistry *, va_list)
| This is just like RequestPlugins(.
static void | SetupCelPluginDirs (iObjectRegistry *r)
| Instructs SCF to also scan the CEL plugin directory or directories.

## Detailed Description

This class contains static member functions which can help set up an application to use the Crystal Entity Layer.

It is possible to do all the setup on your own but using these utility methods will considerably simplify the task.

Definition at line 39 of file initapp.h.

## Member Function Documentation

static bool celInitializer::RequestPlugins | ( | iObjectRegistry * | ,
|  | csArray< csPluginRequest > const & |  |
| ) |  |  | `[static]`

A convenience wrapper for csInitializer::RequestPlugins() which first invokes celInitializer::SetupCelPluginDirs().

Unlike the variable-argument RequestPlugins(...) method which expects you to know the list of requested plugins at compile-time, this overload allows you to construct an array of plugins at run-time. You do this by constructing a csArray<> of csPluginRequest records (see <cstool/initapp.h>). For example:

     csArray<csPluginRequest> a;
     a.Push(csPluginRequest(CS_REQUEST_VFS));
     a.Push(csPluginRequest(CS_REQUEST_ENGINE));
     a.Push(csPluginRequest(CS_REQUEST_PLUGIN("myproj.foobar",iFoobar)));
     celInitializer::RequestPlugins(registry,a);

WARNING csArray<> already knows its own size, so do not terminate the list with CS_REQUEST_END.

static bool celInitializer::RequestPlugins | ( | iObjectRegistry * | ,
|  |  | ... |
| ) |  |  | `[static]`

A convenience wrapper for csInitializer::RequestPlugins() which first invokes celInitializer::SetupCelPluginDirs().

The variable arguments should contain four entries for every plugin you wish to load: SCF class name, SCF interface name, inteface ID, and interface version. To make this easier it is recommended that you use one of the CS_REQUEST_xxx macros (see <cstool/initapp.h>). WARNING Be sure to terminate the list with CS_REQUEST_END!

static bool celInitializer::RequestPluginsV | ( | iObjectRegistry * | ,
|  | va_list |  |
| ) |  |  | `[static]`

This is just like RequestPlugins(.

..), which accepts a variable list of arguments at compile-time, except that arguments are passed as a `va_list'.

static void celInitializer::SetupCelPluginDirs | ( | iObjectRegistry * | r | ) | `[inline, static]`

Instructs SCF to also scan the CEL plugin directory or directories.

This method is invoked automatically by celInitializer::RequestPlugins(), so you do not normally need to call it. You may, however, want to call it if you do not utilize celInitializer::RequestPlugins(). If you do call it manually, it usually is wise to do so before invoking the underlying csInitializer::RequestPlugins() or CS_REQUEST_PLUGIN().

The following are queried in an attempt to locate the CEL plugin directory:

- The CEL environment variable (as well as several likely subdirectories of the mentioned path).
- The CEL_PLUGIN_DIR compile-time constant, if available. The typical way to define this property is to have the configure.ac script invoke AC_PATH_CEL or CS_PATH_CEL (defined in cel.m4) and to then "substitute" the discovered value of the plugin directory into the generated config.h file as follows:

             CS_PATH_CEL([someversion], [], [AC_MSG_ERROR([Failed to find CEL])])
             AC_DEFINE_UNQUOTED([CEL_PLUGIN_DIR], ["$CEL_PLUGIN_DIR"],
               [Define with path to CEL plugins.])

Definition at line 74 of file initapp.h.

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

- celtool/initapp.h