/** \file
 *
 *  Contains the ScriptAPI class definition.
 *
 *  Copyright (c) 2007,2008,2009 MBARI
 *  MBARI Proprietary Information.  All Rights Reserved
 *
 */

#ifndef SCRIPTAPI_H_
#define SCRIPTAPI_H_

#include "missionScript/ScriptAPIRegistry.h"
#include "logger/Logger.h"
#include "utils/FlexArray.h"

class InputInfo;
class ScriptNode;
class SettingInfo;
class SettingReader;

/**
 *  Abstract base class for scripted programming language interfaces.
 *  Allows scripted modules and components to share much of the same
 *  API as c++ modules and components.
 *
 *  \ingroup missionScript
 */
class ScriptAPI
{
public:

    /// Destructor
    virtual ~ScriptAPI() {};

    virtual ScriptNode* makeScriptFunction( const char* moduleName,
                                            const char* componentName, const char* methodName,
                                            FlexArray<InputInfo*>& inputs, FlexArray<SettingInfo*>& settings,
                                            const char* code, Logger& logger ) = 0;

protected:

    /// Protected constructor for ABC
    ScriptAPI( const char* name, const char* extension )
    {
        ScriptAPIRegistry::Register( name, extension, this );
    };

    /// Note that the default constructor below is private and not given a body.
    /// Any attempt to call it will return a compiler error.
    ScriptAPI(); // disallow default constructor

    /// Note that the copy constructor below is private and not given a body.
    /// Any attempt to call it will return a compiler error.
    ScriptAPI( const ScriptAPI& old ); // disallow copy constructor


};

#endif /* SCRIPTAPI_H_ */
