Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

Init_ACE.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 //=============================================================================
00004 /**
00005  *  @file   Init_ACE.h
00006  *
00007  *  $Id: Init_ACE.h,v 1.1.1.2 2003/02/21 18:36:32 chad Exp $
00008  *
00009  * This class consolidates the operations on the Handles.
00010  *
00011  *  @author Priyanka Gontla <pgontla@ece.uci.edu>
00012  */
00013 //=============================================================================
00014 
00015 
00016 #ifndef ACE_INIT_ACE_H
00017 #define ACE_INIT_ACE_H
00018 
00019 #include "ace/pre.h"
00020 
00021 #include "ace/ACE_export.h"
00022 
00023 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00024 # pragma once
00025 #endif /* ACE_LACKS_PRAGMA_ONCE */
00026 
00027 /**
00028  * @class ACE_Init_ACE
00029  *
00030  * @brief Initialize ACE library services.  Can be called only once
00031  *   per program invocation.
00032  *
00033  */
00034 class ACE_Export ACE_Init_ACE
00035 {
00036 public:
00037   /**
00038    * This class implements the functions for the initialization and
00039    * shutting down ACE.  These functions are called only once per ACE
00040    * invokation.
00041    * @return Returns 0 on success, -1 on failure, and 1 if it had already been
00042    * called.
00043    */
00044   static int init (void);
00045 
00046   /**
00047    * Shut down ACE library services.  Can be called only once per
00048    * program invocation.
00049    * @return Returns 0 on success, -1 on failure, and 1 if it had already been
00050    * called.
00051    */
00052   static int fini (void);
00053 
00054 private:
00055   /**
00056    * Counter to match <init()>/<fini()> calls.  <init()> must increment it;
00057    * <fini()> must decrement it.  <fini()> then does nothing until it
00058    * reaches 0.
00059    */
00060   static unsigned int init_fini_count_;
00061 };
00062 
00063 #if !defined (ACE_LACKS_INLINE_FUNCTIONS)
00064 #include "ace/Init_ACE.i"
00065 #endif /* ACE_LACKS_INLINE_FUNCTIONS */
00066 
00067 #include "ace/post.h"
00068 
00069 #endif  /* ACE_INIT_ACE_H */

Generated on Mon Jun 16 11:19:53 2003 for ACE by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002