Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

AllupImpl.hh

Go to the documentation of this file.
00001 /*
00002  * AllupImpl.hh
00003  *
00004  * Copyright (c) 2003, 2004 The University of Utah and the Flux Group.
00005  * All rights reserved.
00006  *
00007  * This file is licensed under the terms of the GNU Public License.  
00008  * See the file "license.terms" for restrictions on redistribution 
00009  * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
00010  */
00011 
00012 /**
00013  * @file AllupImpl.hh
00014  *
00015  * Header file for the AllupImpl class.
00016  */
00017 
00018 #ifndef _allup_impl_hh
00019 #define _allup_impl_hh
00020 
00021 #include <map>
00022 #include <string>
00023 
00024 using namespace std;
00025 
00026 #include "AllupS.h"
00027 
00028 /**
00029  * A straight-forward implementation of the edu::utah::pces::Allup interface.
00030  *
00031  * @sa FactoryLibrary_ltdl
00032  */
00033 class AllupImpl : public virtual POA_edu::utah::pces::Allup
00034 {
00035 
00036 public:
00037 
00038     /**
00039      * Construct an AllupImpl with the default values.
00040      *
00041      * @param my_poa The POA this object was activated under.
00042      */
00043     AllupImpl(PortableServer::POA_ptr my_poa);
00044 
00045     /**
00046      * Deconstruct an AllupImpl.
00047      */
00048     virtual ~AllupImpl(void);
00049 
00050     /** @copydoc edu::utah::pces::Allup::OpenLibrary */
00051     virtual edu::utah::pces::FactoryLibrary_ptr OpenLibrary(const char *name)
00052         throw (edu::utah::pces::NoSuchLibrary,
00053                CORBA::SystemException);
00054 
00055     /** @copydoc edu::utah::pces::Allup::Libraries */
00056     virtual edu::utah::pces::FactoryLibraryList *Libraries(void)
00057         throw (CORBA::SystemException);
00058 
00059     /** @copydoc edu::utah::pces::Allup::Shutdown */
00060     virtual void Shutdown(void)
00061         throw (CORBA::SystemException);
00062 
00063     /**
00064      * @exception CORBA::BAD_INV_ORDER when called.  This object should always
00065      * be activated under a single threaded POA.
00066      */
00067     virtual PortableServer::POA_ptr _default_POA(void)
00068         throw (CORBA::SystemException)
00069     {
00070         throw CORBA::BAD_INV_ORDER();
00071     };
00072 
00073 private:
00074 
00075     /**
00076      * The 'name->library' map object type.
00077      */
00078     typedef map<string, edu::utah::pces::FactoryLibrary_var> library_map_t;
00079 
00080     /**
00081      * Map of currently open library names to their object references.
00082      */
00083     library_map_t ai_Libraries;
00084 
00085     /**
00086      * The POA this object was activated under and any new objects should be
00087      * activated under.
00088      */
00089     PortableServer::POA_var ai_POA;
00090     
00091 };
00092 
00093 #endif

Generated on Fri Oct 22 07:50:24 2004 for CPU Broker by  doxygen 1.3.9.1