- Main Page
- Namespaces
- Classes
- Files
- Related Pages

# /Users/fpy/titan-1-5-MBARI/Mers/Interfaces/DiscreteValue.cpp

    00001
    00002 //
    00003 // Copyright (c) 2004           Model-based Embedded and Robotic Systems Group
    00004 // All Rights Reserved          Massachusetts Institute of Technology
    00005 //
    00006 // This software is provided as is. Model-based Embedded and Robotic Systems
    00007 // (MERS) group does not assume any responsibility.
    00008 //
    00009 // Organization:        Model-based Embedded and Robotic Systems Group
    00010 //                                      Massachusetts Institute of Technology
    00011 //
    00013
    00014 #include "DiscreteValue.h"
    00015
    00016 #include <Mers/Utils/Lang/CharUtils.h>
    00017
    00019
    00020 using namespace Mers::Interfaces;
    00021 using Mers::Utils::Lang::CharUtils;
    00022
    00024
    00025 DiscreteValue::DiscreteValue(DiscreteVariable * variable, const char * name)
    00026         : mVariable(variable)
    00027 {
    00028         mName = CharUtils::strdupnew(name);
    00029 }
    00030
    00032
    00033 DiscreteValue::~DiscreteValue()
    00034 {
    00035
    00036         delete[] mName;
    00037 }
    00038
    00040
    00041 const char * DiscreteValue::getName() const
    00042 {
    00043         return mName;
    00044 }
    00045
    00047
    00048 DiscreteVariable * DiscreteValue::getVariable() const
    00049 {
    00050         return mVariable;
    00051 }
    00052
    00054