ALMA Computing Group

acsexmplInitErrorHelloWorld.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: acsexmplInitErrorHelloWorld.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 <acsexmplInitErrorHelloWorld.h>
00032 #include <ACSErrTypeCommon.h>
00033 #include <acsexmplErrTest.h>
00034 #include <iostream>
00035 
00036 ACE_RCSID(acsexmpl, acsexmplInitErrorCompImpl, "$Id: acsexmplInitErrorHelloWorld.cpp,v 1.2 2011/04/06 17:26:51 msekoran Exp $")
00037 
00038 /* ----------------------------------------------------------------*/
00039 InitErrorHelloWorld::InitErrorHelloWorld( 
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("::InitErrorHelloWorld::InitErrorHelloWorld");
00046 }
00047 /* ----------------------------------------------------------------*/
00048 InitErrorHelloWorld::~InitErrorHelloWorld()
00049 {
00050     // ACS_TRACE is used for debugging purposes
00051     ACS_TRACE("::InitErrorHelloWorld::~InitErrorHelloWorld");
00052     ACS_DEBUG_PARAM("::InitErrorHelloWorld::~InitErrorHelloWorld", "Destroying %s...", name());
00053 }
00054 /* --------------------- [ CORBA interface ] ----------------------*/
00055 void
00056 InitErrorHelloWorld::displayMessage ()
00057 {
00058     std::cout << "Hello World" << std::endl; 
00059 }
00060 /* ----------------------------------------------------------------*/
00061 void 
00062 InitErrorHelloWorld::badMethod() 
00063 {
00064     throw (ACSErrTypeCommon::UnknownExImpl(__FILE__, __LINE__, "InitErrorHelloWorld::badMethod").getUnknownEx());
00065 }
00066 
00067 /* --------------------- [ Life cycle methods ] -------------------- */
00068 
00069  void InitErrorHelloWorld::initialize()
00070 {
00071     ACS_TRACE("::InitErrorHelloWorld::initialize");
00072     // we do not throw CORBA exception here
00073     throw (acsexmplErrTest::InitializationFailureExImpl(__FILE__, __LINE__, "InitErrorHelloWorld::initialize"));
00074 }
00075 
00076 
00077 /* --------------- [ MACI DLL support functions ] -----------------*/
00078 #include <maciACSComponentDefines.h>
00079 MACI_DLL_SUPPORT_FUNCTIONS(InitErrorHelloWorld)
00080 /* ----------------------------------------------------------------*/
00081 
00082 
00083 /*___oOo___*/
00084 
00085 
00086