~ubuntu-branches/ubuntu/jaunty/aspectc++/jaunty

« back to all changes in this revision

Viewing changes to AspectC++/NamespaceAC.cc

  • Committer: Bazaar Package Importer
  • Author(s): Reinhard Tartler
  • Date: 2008-07-07 14:41:02 UTC
  • mfrom: (1.1.3 upstream) (6.1.1 lenny)
  • Revision ID: james.westby@ubuntu.com-20080707144102-lzml7t07f3sl00r5
Tags: 1.0pre4~svn.20080711-1
* new upstream snapshot.
* include all upstream documentation. Clarifying emails regarding
  licensing has been included into debian/copyright.
* reformat description following recomendations of
  http://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-Description
  (Closes: #480316)

Show diffs side-by-side

added added

removed removed

Lines of Context:
66
66
    "  template <typename TL> struct Arg<TL, 0> {\n"
67
67
    "    typedef typename TL::type Type;\n"
68
68
    "    typedef typename Referred<Type>::type ReferredType;\n"
69
 
    "  };\n";
 
69
    "  };\n"
 
70
    "  template <typename T> int ttest(...);\n"
 
71
    "  template <typename T> char ttest(typename T::__AttrTypes const volatile *);\n"
 
72
    "  template<typename T> struct HasTypeInfo {\n" 
 
73
    "    enum { RET=((sizeof(ttest<T>(0))==1)?1:0) };\n"
 
74
    "  };\n"
 
75
    "  template<typename T, int HAVE = HasTypeInfo<T>::RET> struct TypeInfo {\n"
 
76
    "    enum { AVAILABLE = 0 };\n"
 
77
    "  };\n"
 
78
                "  template<typename T> struct TypeInfo<T, 1> {\n"
 
79
    "    enum { AVAILABLE = 1 };\n"
 
80
                "    enum { ELEMENTS = T::__AttrTypes::ARGS };\n"
 
81
                "    template<int I>\n"
 
82
                "    struct Member : public AC::Arg<typename T::__AttrTypes,I> {};\n"
 
83
                "    template<int I>\n"
 
84
                "    static typename Member<I>::ReferredType* member (T* obj) {\n"
 
85
                "      return (typename Member<I>::ReferredType*)obj->__attr (I);\n"
 
86
                "    }\n"
 
87
                "    static const char *member_name (T &obj, int i) {\n"
 
88
                "      return obj.__attr_name (i);\n"
 
89
                "    }\n"
 
90
                "        };\n";
70
91
 
71
92
  // class(es) needed to implement CFlows
72
93
  acdef += CFlow::ac_namespace_contributions ();