/******************************************************************
** Copyright (C) 2001, University of Alabama in Huntsville. 
** All rights reserved.
**
** File   : Control.cpp
**
** Author : Yangsen Yao
**
** Description:
**    This file provides implementation for the CLIPS control
**    class.
**
** History:
**    26-Nov-2001 : Yangsen Yao
**        Created file.
******************************************************************/

extern "C" 
{
  #include "clips/clips.h"
  #include "clips/commline.h"
}
#include "Control.h"

extern "C" void UserFunctions()
{
}

// Initializes the CLIPS system. Must be called prior to any other
// CLIPS function call. NOTE: This function should be called only
// once.
void CCLPControl::Initialize()
{
    InitializeEnvironment();
}

// run for allowing rules to execute
long int CCLPControl::run(int level)    
{
    return Run(level);
}

// load for loading Clips Batch file
void CCLPControl::load(std::string str)
{
    char *filename;
    filename = (char *)str.c_str();
    BatchStar(filename);
}

void CCLPControl::shell()
{
    CommandLoop();
}

// Reset command
void CCLPControl::reset()
{
    Reset();
}

// Clear command
void CCLPControl::clear()
{
    Clear();
}


