Fixed a bug in the C++ domain and documented more

This commit is contained in:
Armin Ronacher 2010-05-27 14:12:24 +02:00
parent 8c388b8b14
commit a534f39187
2 changed files with 42 additions and 2 deletions

View File

@ -453,12 +453,50 @@ The following directives are available:
.. cpp:type:: signatures
Describe a C++ object. Full signature specification is supported -- give the
signature as you would in the declaration. Example::
signature as you would in the declaration. Here some examples::
.. cpp:function:: const T &Array<T>::operator[]() const
.. cpp:function:: bool namespaced::theclass::method(int arg1, std::string arg2)
Describes a method with parameters and types.
.. cpp:function:: bool namespaced::theclass::method(arg1, arg2)
Describes a method without types.
.. cpp:function:: const T &array<T>::operator[]() const
Describes the constant indexing operator of a templated array.
.. cpp:function:: operator bool() const
Describe a casting operator here.
.. cpp:member:: std::string theclass::name
.. cpp:type:: theclass::const_iterator
Will be rendered like this:
.. cpp:function:: bool namespaced::theclass::method(int arg1, std::string arg2)
Describes a method with parameters and types.
.. cpp:function:: bool namespaced::theclass::method(arg1, arg2)
Describes a method without types.
.. cpp:function:: const T &array<T>::operator[]() const
Describes the constant indexing operator of a templated array.
.. cpp:function:: operator bool() const
Describe a casting operator here.
.. cpp:member:: std::string theclass::name
.. cpp:type:: theclass::const_iterator
.. rst:directive:: .. cpp:namespace:: namespace
Select the current C++ namespace for the following objects.

View File

@ -318,6 +318,8 @@ class ArgumentDefExpr(DefExpr):
return self.name.get_name()
def get_id(self):
if self.type is None:
return 'X'
return self.type.get_id()
def __unicode__(self):