summaryrefslogtreecommitdiff
path: root/TAO/tao/AnyTypeCode/TypeCode_Base_Attributes.h
blob: 4771d75d95bfb59d590cbf5afd968eea72783d93 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
// -*- C++ -*-

//=============================================================================
/**
 *  @file    TypeCode_Base_Attributes.h
 *
 *  $Id$
 *
 *  @author Ossama Othman <ossama@dre.vanderbilt.edu>
 */
//=============================================================================

#ifndef TAO_TYPECODE_BASE_ATTRIBUTES_H
#define TAO_TYPECODE_BASE_ATTRIBUTES_H

#include /**/ "ace/pre.h"

#include "ace/config-all.h"

#if !defined (ACE_LACKS_PRAGMA_ONCE)
# pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */

namespace TAO
{
  namespace TypeCode
  {

    /**
     * @class Base_Attributes
     *
     * @brief Attributes contained by most @c TypeCodes with complex
     *        parameter lists.
     *
     * Most @c TypeCodes with complex parameter lists (see Section
     * 15.3.5.1 "TypeCode" in the CORBA specification) contain these
     * attributes, namely a repository ID and a name.
     */
    template <typename STRING_TYPE>
    class Base_Attributes
    {
    public:

      /// Constructor.
      Base_Attributes (char const * id,
                       char const * name);

      /// Constructor used by recursive @c TypeCodes.
      Base_Attributes (char const * id);

      /// Get the @c RepositoryId globally identifying the type.
      char const * id (void) const;

      /// Get the simple name identifying the type within its
      /// enclosing scope.
      char const * name (void) const;

      /// Set the simple name identifying the type within its
      /// enclosing scope.
      /**
       * @note This method only used when creating a recursive
       *       TypeCode.
       */
      void name (char const * the_name);

    private:

      /// The @c RepositoryId globally identifying the type.
      STRING_TYPE const id_;

      /// The simple name identifying the type within its enclosing
      /// scope.
      STRING_TYPE name_;

    };

  }  // End namespace TypeCode
}  // End namespace TAO


#ifdef __ACE_INLINE__
# include "tao/AnyTypeCode/TypeCode_Base_Attributes.inl"
#endif /* __ACE_INLINE__ */

#ifdef ACE_TEMPLATES_REQUIRE_SOURCE
# include "tao/AnyTypeCode/TypeCode_Base_Attributes.cpp"
#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */

#ifdef ACE_TEMPLATES_REQUIRE_PRAGMA
# pragma implementation ("TypeCode_Base_Attributes.cpp")
#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */


#include /**/ "ace/post.h"

#endif /* TAO_TYPECODE_BASE_ATTRIBUTES_H */