Main Page Alphabetical List Compound List File List Compound Members File Members
GATLoader.c File ReferenceMain file for the GATLoader class.
More...
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include "GATUtil.h"
#include "GATLoader.h"
#include "GATErrors.h"
#include "GATTestUtils.h"
#include "ltdl/ltdl.h"
#include "uuid.h"
Include dependency graph for GATLoader.c:
Go to the source code of this file.
|
Compounds |
| struct | AdaptorInstance |
| struct | GATLoader_S |
Defines |
| #define | REGISTRATION_SUFFIX "_register" |
Functions |
| AdaptorInstance * | AdaptorInstance_Create (const char *path, const char *name, const char *nickname) |
| | AdaptorInstance_Create Creates an adaptor structure.
|
| char * | CanonicaliseName (const char *original) |
| | CanonicaliseName Extract the canonical name of an adaptor from its full path name.
|
| void | AdaptorInstance_Destroy (struct AdaptorInstance *this) |
| | AdaptorInstance_Destroy Destroys an adaptor structure.
|
| GATResult | LoadAdaptor (GATContext error_context, struct AdaptorInstance *instance, GATRegistry registry, GATTable_const system_config, GATTable_const instance_config) |
| | LoadAdaptor Loads a given adaptor.
|
| GATLoader | GATLoader_Create (void) |
| | GATLoader_Create The GATLoader constructor.
|
| void | GATLoader_Destroy (GATLoader *this) |
| | GATLoader_Destroy The GATLoader destructor.
|
| GATResult | GATLoader_LoadAdaptor (GATLoader this, GATContext error_context, GATRegistry registry, GATTable_const system_config, GATTable_const instance_config, const char *path, const char *name, const char *nickname) |
| | GATLoader_LoadAdaptor Loads a given adaptor.
|
Variables |
| const char * | rcsid = "$Header: /export/cvs-gridlab/wp-1/Codes/GATEngine/C-reference/src/GATLoader.c,v 1.23 2004/04/22 10:25:05 hartmutkaiser Exp $" |
Detailed Description
Main file for the GATLoader class.
A GATLoader is responsible for loading and maintaining a list of adaptors.
- Date:
-
Thu Sep 18 2003
- Version:
-
- Header:
-
/export/cvs-gridlab/wp-1/Codes/GATEngine/C-reference/src/GATLoader.c,v 1.23 2004/04/22 10:25:05 hartmutkaiser Exp
Copyright (C) Tom Goodale This file is part of the GAT Engine. Contributed by Tom Goodale <goodale@aei.mpg.de>.
Use, modification and distribution is subject to the Gridlab Software License. (See accompanying file GLlicense.txt or copy at http://www.gridlab.org/GLlicense.txt)
Definition in file GATLoader.c.
Define Documentation
| #define REGISTRATION_SUFFIX "_register"
|
|
Function Documentation
| struct AdaptorInstance * AdaptorInstance_Create |
( |
const char * |
path, |
|
|
const char * |
name, |
|
|
const char * |
nickname |
|
) |
[static] |
|
| char * CanonicaliseName |
( |
const char * |
original |
) |
[static] |
|
|
|
CanonicaliseName Extract the canonical name of an adaptor from its full path name.
We need the name of the adaptor in order to invoke its registration function. CanonicaliseName takes the path to an adaptor and extracts the base filename from it. Additionally, if it is a libtool library, it removes the "lib" prefix which libtool insists on having. - Parameters:
-
| input |
The path to an adaptor file. |
- Returns:
-
A canonoical name for the adaptor.
Definition at line 311 of file GATLoader.c. |
|
|
LoadAdaptor Loads a given adaptor.
Given an AdaptorInstance, invokes its registration function and passes that both a system and an instance configuration tables. - Parameters:
-
| instance |
The AdaptorInstance holding data about the adaptor. |
| registry |
The registry the adaptor should register its CPIs with. |
| system_config |
The system configuration table. |
| instance_config |
The configuration table for this instance. |
- Returns:
-
An error code.
Definition at line 380 of file GATLoader.c.
References func, GAT_CREATE_STATUS, GAT_CURRENT_STATUS, GAT_MEMORYFAILURE, GAT_NO_ADAPTOR_REGISTRATION_FUNC, GAT_RETURN_STATUS, GAT_SUCCEEDED, GAT_TEST_START, GAT_TEST_STOP, GAT_TEST_TRACE, GAT_USES_STATUS, GATResult, GATTable_const, AdaptorInstance::handle, AdaptorInstance::name, AdaptorInstance::nickname, and REGISTRATION_SUFFIX.
Referenced by GATLoader_LoadAdaptor(). |
|
|
GATLoader_Create The GATLoader constructor.
This is the constructor for GATLoader objects.
- Returns:
-
A new GATLoader
Definition at line 84 of file GATLoader.c.
References lt_dlinit().
Referenced by GATSelf_Create(). |
|
|
GATLoader_LoadAdaptor Loads a given adaptor.
Given a path, load the adaptor pointed to there, invoking its registration function and passing that both a system and an instance configuration tables. Each adaptor may be given a nickname, which is otherwise extracted from the file part of the path. All nicknames must be unique. - Parameters:
-
| this |
The loader object. |
| registry |
The registry the adaptor should register its CPIs with. |
| system_config |
The system configuration table. |
| instance_config |
The configuration table for this instance. |
| path |
The path to the adaptor file. |
| name |
The name of the adaptor. |
| nickname |
The name the loader should know this adaptor instance as. |
- Returns:
-
An error code.
Definition at line 147 of file GATLoader.c.
References AdaptorInstance_Create(), AdaptorInstance_Destroy(), GAT_CREATE_STATUS, GAT_CREATE_STATUS_MSG, GAT_CURRENT_STATUS, GAT_DUPLICATE_ADAPTOR, GAT_FAILED_TO_LOAD_ADAPTOR, GAT_MEMORYFAILURE, GAT_RETURN_STATUS, GAT_SUCCEEDED, GAT_USES_STATUS, GATTable_const, AdaptorInstance::handle, LoadAdaptor(), AdaptorInstance::next, AdaptorInstance::nickname, and AdaptorInstance::path.
Referenced by Load(). |
Variable Documentation
const char* rcsid = "$Header: /export/cvs-gridlab/wp-1/Codes/GATEngine/C-reference/src/GATLoader.c,v 1.23 2004/04/22 10:25:05 hartmutkaiser Exp $" [static]
|
|
|