Exemple #1
0
 def create(domain, args):
     if domain == 'c':
         return c.CObject(*args)
     if domain == 'py':
         cls, name = DomainDirectiveFactory.python_classes.get(
             args[0], (python.PyClasslike, 'class'))
         args[1] = [
             DomainDirectiveFactory.fix_python_signature(n) for n in args[1]
         ]
     elif php is not None and domain == 'php':
         separators = php.separators
         arg_0 = args[0]
         if any([separators['method'] in n for n in args[1]]):
             if any([separators['attr'] in n for n in args[1]]):
                 arg_0 = 'attr'
             else:
                 arg_0 = 'method'
         else:
             if arg_0 in ['variable']:
                 arg_0 = 'global'
         cls, name = DomainDirectiveFactory.php_classes.get(
             arg_0, (php.PhpClasslike, 'class'))
     else:
         cls, name = DomainDirectiveFactory.cpp_classes.get(
             args[0], (cpp.CPPMemberObject, 'member'))
     # Replace the directive name because domain directives don't know how to handle
     # Breathe's "doxygen" directives.
     args = [name] + args[1:]
     return cls(*args)
Exemple #2
0
 def create(domain, args):
     if domain == 'c':
         return c.CObject(*args)
     cls, name = DomainDirectiveFactory.cpp_classes.get(
         args[0], (cpp.CPPMemberObject, 'member'))
     # Replace the directive name because domain directives don't know how to handle
     # Breathe's "doxygen" directives.
     args = [name] + args[1:]
     return cls(*args)
Exemple #3
0
 def create(domain, args):
     if domain == 'c':
         return c.CObject(*args)
     if domain == 'py':
         cls, name = DomainDirectiveFactory.python_classes.get(
             args[0], (python.PyClasslike, 'class'))
         args[1] = [DomainDirectiveFactory.fix_python_signature(n) for n in args[1]]
     else:
         cls, name = DomainDirectiveFactory.cpp_classes.get(
             args[0], (cpp.CPPMemberObject, 'member'))
     # Replace the directive name because domain directives don't know how to handle
     # Breathe's "doxygen" directives.
     args = [name] + args[1:]
     return cls(*args)