// file: $isip/class/asr/Anchor/ancr_0.cc
// version: $Id: ancr_00.cc 8566 2002-08-13 19:25:33Z alphonso $
//

// isip include files
//
#include "Anchor.h"

// method: destructor
//
// arguments: none
//
// return: none
//
// this is the default destructor for the Anchor class.
//
Anchor::~Anchor() {}

// method: default constructor
//
// arguments: none
//
// return: none
//
// this is the default constructor for the Anchor class.
//
Anchor::Anchor() {

  // initialize member data
  //
  offset_d = 0.0;  
  anchored_d = false;
}

// method: default constructor
//
// arguments: none
//
// return: none
//
// this is the default constructor for the Anchor class.
//
Anchor::Anchor(String& id_a, String& unit_a) {

  // initialize member data
  //
  offset_d = 0.0;  
  anchored_d = false;
  
  // assign member data
  //
  id_d.assign(id_a);
  unit_d.assign(unit_a);
}

// method: default constructor
//
// arguments: none
//
// return: none
//
// this is the default constructor for the Anchor class.
//
Anchor::Anchor(String& id_a, float offset_a, String& unit_a) {

  // assign member data
  //
  id_d.assign(id_a);
  unit_d.assign(unit_a);
  offset_d = offset_a;  
  anchored_d = true;
}

// method: default constructor
//
// arguments: none
//
// return: none
//
// this is the constructor for the Anchor class.
//
Anchor::Anchor(String& id_a, const Anchor* arg_a) {

  // assign member data
  //
  id_d.assign(id_a);
  unit_d.assign(arg_a->unit_d);  
  offset_d = arg_a->offset_d;
  anchored_d = arg_a->anchored_d;
}

//-----------------------------------------------------------------------------
//
// we define non-integral constants in the default constructor
//
//-----------------------------------------------------------------------------

// constants: required constants such as the class name
//
const String Anchor::CLASS_NAME(L"Anchor");

// constants: i/o related constants
//
const String Anchor::DEF_PARAM(L"");
const String Anchor::PARAM_ID(L"id");
const String Anchor::PARAM_OFFSET(L"offset");
const String Anchor::PARAM_UNIT(L"unit");
const String Anchor::PARAM_ANCHORED(L"anchored");

// static instantiations: debug level
//
Integral::DEBUG Anchor::debug_level_d = Integral::NONE;

// static instantiations: the memory manager
//
MemoryManager Anchor::mgr_d(sizeof(Anchor));
