|
| virtual bool | add_parameter (std::shared_ptr< bpp_method_parameter > parameter) |
| | Add a parameter to the method.
|
| |
| void | set_scope (bpp_scope scope) |
| |
| void | set_virtual (bool is_virtual) |
| |
| void | set_overridable (bool is_overridable) |
| |
| void | set_inherited (bool is_inherited) |
| |
| void | set_last_override (const std::string &class_name) |
| |
| void | set_overridden_method (std::weak_ptr< bpp_method > method) |
| |
| bool | add_object (std::shared_ptr< bpp_object > object, bool make_local) override |
| | Add an object to the code entity.
|
| |
| std::vector< std::shared_ptr< bpp_method_parameter > > | get_parameters () const |
| |
| bpp_scope | get_scope () const |
| |
| bool | is_virtual () const |
| |
| bool | is_overridable () const |
| |
| bool | is_inherited () const |
| |
| std::string | get_last_override () const |
| |
| virtual void | add_code (const std::string &code, bool add_newline=true) |
| | Add code to the code entity.
|
| |
| virtual void | add_code_to_previous_line (const std::string &code) |
| | Add code to the code entity's pre-code buffer.
|
| |
| virtual void | add_code_to_next_line (const std::string &code) |
| | Add code to the code entity's post-code buffer.
|
| |
| virtual void | flush_nextline_buffer () |
| |
| virtual void | flush_postline_buffer () |
| |
| virtual void | flush_code_buffers () |
| |
| virtual void | clear_all_buffers () |
| |
| void | destruct_local_objects (std::shared_ptr< bpp_program > program) |
| | Destruct all local objects in the code entity.
|
| |
| virtual std::string | get_code () const |
| | Return the contents of the main code buffer as a string.
|
| |
| virtual std::string | get_pre_code () const |
| | Return the contents of the pre-code buffer as a string.
|
| |
| virtual std::string | get_post_code () const |
| | Return the contents of the post-code buffer as a string.
|
| |
| void | set_requires_perfect_forwarding (bool require) |
| |
| bool | get_requires_perfect_forwarding () const |
| |
| void | adopt (std::shared_ptr< bpp_entity > entity) |
| | Take ownership of all local objects in another entity, by moving them into this entity's local object map.
|
| |
| | bpp_entity ()=default |
| |
| virtual | ~bpp_entity ()=default |
| |
| | bpp_entity (const bpp_entity &other)=default |
| |
| bpp_entity & | operator= (const bpp_entity &other)=default |
| |
| | bpp_entity (bpp_entity &&other) noexcept=default |
| |
| bpp_entity & | operator= (bpp_entity &&other) noexcept=default |
| |
| virtual bool | add_class (std::shared_ptr< bpp_class > class_) |
| | Add a class to this entity's list of classes.
|
| |
| virtual std::shared_ptr< bpp_class > | get_class () |
| |
| virtual std::string | get_address () const |
| |
| virtual void | set_name (const std::string &name) |
| |
| virtual std::string | get_name () const |
| |
| virtual std::weak_ptr< bpp::bpp_class > | get_containing_class () |
| | Get the class which contains this entity.
|
| |
| virtual std::weak_ptr< bpp_program > | get_containing_program () |
| |
| virtual bool | set_containing_class (std::weak_ptr< bpp::bpp_class > containing_class) |
| |
| void | inherit (std::shared_ptr< bpp_entity > parent) |
| | Inherit from a parent entity.
|
| |
| void | inherit (std::shared_ptr< bpp_program > program) |
| |
| virtual void | inherit (std::shared_ptr< bpp_class > parent) |
| |
| void | set_definition_position (const std::string &file, uint64_t line, uint64_t column) |
| |
| void | add_reference (const std::string &file, uint64_t line, uint64_t column) |
| |
| bpp::SymbolPosition | get_initial_definition () const |
| |
| std::list< bpp::SymbolPosition > | get_references () const |
| |
| std::unordered_map< std::string, std::shared_ptr< bpp_class > > | get_classes () const |
| |
| std::unordered_map< std::string, std::shared_ptr< bpp_object > > | get_objects () const |
| |
| const std::unordered_map< std::string, std::shared_ptr< bpp_object > > & | get_local_objects () const |
| |
| std::shared_ptr< bpp_class > | get_class (const std::string &name) |
| |
| std::shared_ptr< bpp_object > | get_object (const std::string &name) |
| |
| std::shared_ptr< bpp_class > | get_parent () const |
| |
| bool bpp::bpp_method::add_object |
( |
std::shared_ptr< bpp_object > |
object, |
|
|
bool |
make_local |
|
) |
| |
|
overridevirtual |
Add an object to the code entity.
Adding an object to a code entity involves adding the necessary code to create the object. Unlike in the case where we add an object to a non-code entity, where we only need to update the object map.
This function generates the code necessary to create the object, including calling its constructor if it exists.
- Parameters
-
Reimplemented from bpp::bpp_code_entity.