/* -*- mode: c++; c-basic-offset: 4; -*-
 *
 * Copyright (C) 1999 Andreas Schultz
 *
 * $Id: mtdebug.cc,v 1.6 1999/12/20 16:51:49 akerst Exp $
 *
 */

#define MICO_DEBUG_MODULE MICODebug::Thread

#define MICO_CONF_IMR
#include <CORBA-SMALL.h>
#include <mico/impl.h>

#ifdef DEBUG_NAMES
_namedObject::_namedObject () {
    
    _name = new char [strlen ("<UnNamed Object>") + 1];
    strcpy (_name, "<UnNamed Object>");
}

_namedObject::~_namedObject () {

    if (_name)
        delete [] _name;
}

//
// get/set this objects's Name (if assigned)
//
const char *
_namedObject::name (const char *new_name) {
 
    if (new_name)
    {
        if (_name)
            delete [] _name;

        _name = new char [ strlen (new_name) + 1 ];
        strcpy (_name, new_name);
    }
 
    return _name;
}

#endif // DEBUG_NAMES
