/****************************************************************************/
/* Copyright (c) 2000 MBARI                                                 */
/* MBARI Proprietary Information. All rights reserved.                      */
/****************************************************************************/
/* Summary  :                                                               */
/* Filename : SystemInterfaces.h                                            */
/* Author   :                                                               */
/* Project  :                                                               */
/* Version  : 1.0                                                           */
/* Created  : 02/07/2000                                                    */
/* Modified :                                                               */
/* Archived :                                                               */
/****************************************************************************/
/* Modification History:                                                    */
/****************************************************************************/
#ifndef _SYSTEMINTERFACES_H
#define _SYSTEMINTERFACES_H

#include "DynamicArray.h"

class TaskInterface;
class LayeredControlIF;
class DynamicControlIF;
class NavigationIF;


/*
CLASS 
SystemInterfaces

DESCRIPTION
Container for all TaskInterfaces specified by current vehicle
configuration file.

AUTHOR
Tom O'Reilly
*/
class SystemInterfaces {

public:

  SystemInterfaces();

  ~SystemInterfaces();

  ///////////////////////////////////////////////////////////////////
  // Add a Task to system list. Throws an exception
  // if Task name is not unique.
  void addTask(TaskInterface *task);

  ///////////////////////////////////////////////////////////////////
  // Find TaskInterface with specified name. Throws an exception
  // if TaskInterface not found.
  TaskInterface *getTask(const char *name);


  ///////////////////////////////////////////////////////////////////
  // Return pointer to LayeredControl
  const LayeredControlIF *layeredControl() { 
    return _layeredControl;
  }

  ///////////////////////////////////////////////////////////////////
  // Return pointer to DynamicControl
  const DynamicControlIF *dynamicControl() {
    return _dynamicControl;
  }

  ///////////////////////////////////////////////////////////////////
  // Return pointer to Navigation
  const NavigationIF *navigation() {
    return _navigation;
  }

  // And so on for all core Tasks...


  ///////////////////////////////////////////////////////////////////
  // List of all system TaskInterface objects
  DynamicArray<TaskInterface *> tasks;


protected:


  ///////////////////////////////////////////////////////////////////
  // Create auxillary Tasks (instruments, etc), based
  // on system configuration file
  void createAuxTasks();

private:


  // Pointers to core Tasks
  LayeredControlIF *_layeredControl;
  DynamicControlIF *_dynamicControl;
  NavigationIF *_navigation;

  // And so on for all core Tasks...

};

#endif

