Classes | |
class | InstantiatedClass |
class | InstantiatedGlobalFunction |
class | InstantiatedMethod |
Functions | |
def | instantiate_args_list (args_list, template_typenames, instantiations, cpp_typename) |
def | instantiate_name (original_name, instantiations) |
def | instantiate_namespace_inplace (namespace) |
def | instantiate_return_type (return_type, template_typenames, instantiations, cpp_typename, instantiated_class=None) |
def | instantiate_type |
Code to help instantiate templated classes, methods and functions.
def gtwrap.template_instantiator.instantiate_args_list | ( | args_list, | |
template_typenames, | |||
instantiations, | |||
cpp_typename | |||
) |
Instantiate template typenames in an argument list. Type with name `This` will be replaced by @p `cpp_typename`. @param[in] args_list A list of `parser.Argument` to instantiate. @param[in] template_typenames List of template typenames to instantiate, e.g. ['T', 'U', 'V']. @param[in] instantiations List of specific types to instantiate, each associated with each template typename. Each type is a parser.Typename, including its name and full namespaces. @param[in] cpp_typename Full-namespace cpp class name of this instantiation to replace for arguments of type named `This`. @return A new list of parser.Argument which types are replaced with their instantiations.
Definition at line 78 of file template_instantiator.py.
def gtwrap.template_instantiator.instantiate_name | ( | original_name, | |
instantiations | |||
) |
Concatenate instantiated types with an @p original name to form a new instantiated name. TODO(duy): To avoid conflicts, we should include the instantiation's namespaces, but I find that too verbose.
Definition at line 127 of file template_instantiator.py.
def gtwrap.template_instantiator.instantiate_namespace_inplace | ( | namespace | ) |
Instantiate the classes and other elements in the `namespace` content and assign it back to the namespace content attribute. @param[in/out] namespace The namespace whose content will be replaced with the instantiated content.
Definition at line 520 of file template_instantiator.py.
def gtwrap.template_instantiator.instantiate_return_type | ( | return_type, | |
template_typenames, | |||
instantiations, | |||
cpp_typename, | |||
instantiated_class = None |
|||
) |
Instantiate the return type.
Definition at line 109 of file template_instantiator.py.
def gtwrap.template_instantiator.instantiate_type | ( | ctype | ) |
Definition at line 12 of file template_instantiator.py.