ompi-svn-mirror / orte / mca / db / base / db_base_open.c

/*
 * Copyright (c) 2010      Cisco Systems, Inc.  All rights reserved. 
 * Copyright (c) 2012      Los Alamos National Security, Inc.  All rights reserved. 
 * $COPYRIGHT$
 * 
 * Additional copyrights may follow
 * 
 * $HEADER$
 */


#include "orte_config.h"
#include "orte/constants.h"

#include "opal/mca/mca.h"
#include "opal/util/output.h"
#include "opal/mca/base/base.h"
#include "opal/dss/dss_types.h"

#include "orte/mca/db/base/base.h"


/*
 * The following file was created by configure.  It contains extern
 * dbments and the definition of an array of pointers to each
 * module's public mca_base_module_t struct.
 */

#include "orte/mca/db/base/static-components.h"

orte_db_base_module_t orte_db = {
    NULL,
    NULL,
    orte_db_base_store,
    orte_db_base_store_pointer,
    orte_db_base_fetch,
    orte_db_base_fetch_pointer,
    orte_db_base_fetch_multiple,
    orte_db_base_remove_data,
    orte_db_base_add_log
};
orte_db_base_t orte_db_base;

int orte_db_base_open(void)
{
    orte_db_base.output = opal_output_open(NULL);
    
    OBJ_CONSTRUCT(&orte_db_base.available_components, opal_list_t);
    OBJ_CONSTRUCT(&orte_db_base.active_modules, opal_list_t);

    /* Open up all available components */
    if (ORTE_SUCCESS != 
        mca_base_components_open("db", orte_db_base.output, mca_db_base_static_components, 
                                 &orte_db_base.available_components,
                                 true)) {
        return ORTE_ERROR;
    }

    return ORTE_SUCCESS;
}

OBJ_CLASS_INSTANCE(orte_db_active_module_t,
                   opal_list_item_t,
                   NULL, NULL);
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.