ALMA Computing Group

acsexmplConstrErrorHelloWorld.cpp

Go to the documentation of this file.
00001 /*******************************************************************************
00002 *    ALMA - Atacama Large Millimiter Array
00003 *    (c) Associated Universities Inc., 2002 *
00004 *    (c) European Southern Observatory, 2002
00005 *    Copyright by ESO (in the framework of the ALMA collaboration)
00006 *    and Cosylab 2002, All rights reserved
00007 *
00008 *    This library is free software; you can redistribute it and/or
00009 *    modify it under the terms of the GNU Lesser General Public
00010 *    License as published by the Free Software Foundation; either
00011 *    version 2.1 of the License, or (at your option) any later version.
00012 *
00013 *    This library is distributed in the hope that it will be useful,
00014 *    but WITHOUT ANY WARRANTY; without even the implied warranty of
00015 *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00016 *    Lesser General Public License for more details.
00017 *
00018 *    You should have received a copy of the GNU Lesser General Public
00019 *    License along with this library; if not, write to the Free Software
00020 *    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
00021 *
00022 *
00023 *
00024 * "@(#) $Id: acsexmplConstrErrorHelloWorld.cpp,v 1.2 2011/04/06 17:26:51 msekoran Exp $"
00025 *
00026 * who       when      what
00027 * --------  --------  ----------------------------------------------
00028 * rbourtem 2010-10-22 created 
00029 */
00030  
00031 #include <acsexmplConstrErrorHelloWorld.h>
00032 #include <ACSErrTypeCommon.h>
00033 #include <acsexmplErrTest.h>
00034 #include <iostream>
00035 
00036 ACE_RCSID(acsexmpl, acsexmplConstrErrorCompImpl, "$Id: acsexmplConstrErrorHelloWorld.cpp,v 1.2 2011/04/06 17:26:51 msekoran Exp $")
00037 
00038 /* ----------------------------------------------------------------*/
00039 ConstrErrorHelloWorld::ConstrErrorHelloWorld( 
00040                        const ACE_CString &name,
00041                        maci::ContainerServices * containerServices) :
00042     ACSComponentImpl(name, containerServices)
00043 {
00044     // ACS_TRACE is used for debugging purposes
00045     ACS_TRACE("::ConstrErrorHelloWorld::ConstrErrorHelloWorld");
00046     // we do not throw CORBA exception here
00047     throw (acsexmplErrTest::ConstructionFailureExImpl(__FILE__, __LINE__, "ConstrErrorHelloWorld::ConstrErrorHelloWorld"));
00048 }
00049 /* ----------------------------------------------------------------*/
00050 ConstrErrorHelloWorld::~ConstrErrorHelloWorld()
00051 {
00052     // ACS_TRACE is used for debugging purposes
00053     ACS_TRACE("::ConstrErrorHelloWorld::~ConstrErrorHelloWorld");
00054     ACS_DEBUG_PARAM("::ConstrErrorHelloWorld::~ConstrErrorHelloWorld", "Destroying %s...", name());
00055 }
00056 /* --------------------- [ CORBA interface ] ----------------------*/
00057 void
00058 ConstrErrorHelloWorld::displayMessage ()
00059 {
00060     std::cout << "Hello World" << std::endl; 
00061 }
00062 /* ----------------------------------------------------------------*/
00063 void 
00064 ConstrErrorHelloWorld::badMethod() 
00065 {
00066     throw (ACSErrTypeCommon::UnknownExImpl(__FILE__, __LINE__, "ConstrErrorHelloWorld::badMethod").getUnknownEx());
00067 }
00068 
00069 /* --------------- [ MACI DLL support functions ] -----------------*/
00070 #include <maciACSComponentDefines.h>
00071 MACI_DLL_SUPPORT_FUNCTIONS(ConstrErrorHelloWorld)
00072 /* ----------------------------------------------------------------*/
00073 
00074 
00075 /*___oOo___*/
00076 
00077 
00078