TypeCode_Base_Attributes.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 //=============================================================================
00004 /**
00005  *  @file    TypeCode_Base_Attributes.h
00006  *
00007  *  $Id: TypeCode_Base_Attributes.h 69182 2005-11-03 17:38:46Z ossama $
00008  *
00009  *  @author Ossama Othman <ossama@dre.vanderbilt.edu>
00010  */
00011 //=============================================================================
00012 
00013 #ifndef TAO_TYPECODE_BASE_ATTRIBUTES_H
00014 #define TAO_TYPECODE_BASE_ATTRIBUTES_H
00015 
00016 #include /**/ "ace/pre.h"
00017 
00018 #include "ace/config-all.h"
00019 
00020 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00021 # pragma once
00022 #endif /* ACE_LACKS_PRAGMA_ONCE */
00023 
00024 #include "tao/Versioned_Namespace.h"
00025 
00026 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00027 
00028 namespace TAO
00029 {
00030   namespace TypeCode
00031   {
00032 
00033     /**
00034      * @class Base_Attributes
00035      *
00036      * @brief Attributes contained by most @c TypeCodes with complex
00037      *        parameter lists.
00038      *
00039      * Most @c TypeCodes with complex parameter lists (see Section
00040      * 15.3.5.1 "TypeCode" in the CORBA specification) contain these
00041      * attributes, namely a repository ID and a name.
00042      */
00043     template <typename STRING_TYPE>
00044     class Base_Attributes
00045     {
00046     public:
00047 
00048       /// Constructor.
00049       Base_Attributes (char const * id,
00050                        char const * name);
00051 
00052       /// Constructor used by recursive @c TypeCodes.
00053       Base_Attributes (char const * id);
00054 
00055       /// Get the @c RepositoryId globally identifying the type.
00056       char const * id (void) const;
00057 
00058       /// Get the simple name identifying the type within its
00059       /// enclosing scope.
00060       char const * name (void) const;
00061 
00062       /// Set the simple name identifying the type within its
00063       /// enclosing scope.
00064       /**
00065        * @note This method only used when creating a recursive
00066        *       TypeCode.
00067        */
00068       void name (char const * the_name);
00069 
00070     private:
00071 
00072       /// The @c RepositoryId globally identifying the type.
00073       STRING_TYPE const id_;
00074 
00075       /// The simple name identifying the type within its enclosing
00076       /// scope.
00077       STRING_TYPE name_;
00078 
00079     };
00080 
00081   }  // End namespace TypeCode
00082 }  // End namespace TAO
00083 
00084 TAO_END_VERSIONED_NAMESPACE_DECL
00085 
00086 #ifdef __ACE_INLINE__
00087 # include "tao/AnyTypeCode/TypeCode_Base_Attributes.inl"
00088 #endif /* __ACE_INLINE__ */
00089 
00090 #ifdef ACE_TEMPLATES_REQUIRE_SOURCE
00091 # include "tao/AnyTypeCode/TypeCode_Base_Attributes.cpp"
00092 #endif /* ACE_TEMPLATES_REQUIRE_SOURCE */
00093 
00094 #ifdef ACE_TEMPLATES_REQUIRE_PRAGMA
00095 # pragma implementation ("TypeCode_Base_Attributes.cpp")
00096 #endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */
00097 
00098 
00099 #include /**/ "ace/post.h"
00100 
00101 #endif /* TAO_TYPECODE_BASE_ATTRIBUTES_H */

Generated on Sun Jan 27 13:21:07 2008 for TAO_AnyTypeCode by doxygen 1.3.6