mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Fixed a bug in the C++ domain and documented more
This commit is contained in:
parent
8c388b8b14
commit
a534f39187
@ -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.
|
||||
|
@ -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):
|
||||
|
Loading…
Reference in New Issue
Block a user