/** \file
 *
 *  Contains the EstimationModule class implementation.
 *
 *  Copyright (c) 2013 MBARI
 *  MBARI Proprietary Information.  All Rights Reserved
 */

#include "EstimationModule.h"

#include "TrackAcousticContact.h"
#include "TrackAcousticContactIF.h"
#include "Tracking.h"
#include "TrackingIF.h"
#include "StratificationFrontDetector.h"
#include "StratificationFrontDetectorIF.h"
#include "DepAvgTempFrontDetector.h"
#include "DepAvgTempFrontDetectorIF.h"
// Ballast and trim component
#include "BallastAndTrim.h"
#include "BallastAndTrimIF.h"
#include "CurrentEstimator.h"
#include "CurrentEstimatorIF.h"

EstimationModule::EstimationModule()
    : Module( "Estimation",
              "Contains the base estimation components" )
{}

void EstimationModule::loadComponents( Logger& logger )
{
    //// TrackAcousticContact components ////
    registerBehaviorCreator( TrackAcousticContactIF::NAME, &TrackAcousticContact::CreateBehavior );

    //// Tracking components ////
    registerBehaviorCreator( TrackingIF::NAME, &Tracking::CreateBehavior );

    //// BallastAndTrim components ////
    registerBehaviorCreator( BallastAndTrimIF::NAME, &BallastAndTrim::CreateBehavior );

    // Current Estimator
    registerBehaviorCreator( CurrentEstimatorIF::NAME, &CurrentEstimator::CreateBehavior );

    if( loadAtStartup( StratificationFrontDetectorIF::LOAD_AT_STARTUP, logger ) )
    {
        registerComponent( new StratificationFrontDetector( this ) );
    }
    if( loadAtStartup( DepAvgTempFrontDetectorIF::LOAD_AT_STARTUP, logger ) )
    {
        registerComponent( new DepAvgTempFrontDetector( this ) );
    }

    //// Other estimation components ////

}

EstimationModule::~EstimationModule()
{}
