Bash++
Bash++ compiler internal documentation
Public Member Functions | Private Attributes | List of all members
bpp::bpp_object_reference Class Reference

An object reference in Bash++. More...

#include <bpp.h>

Inheritance diagram for bpp::bpp_object_reference:
Inheritance graph
[legend]
Collaboration diagram for bpp::bpp_object_reference:
Collaboration graph
[legend]

Public Member Functions

 bpp_object_reference ()
 
void set_reference_type (bpp::reference_type reference_type)
 
void set_array_index (const std::string &array_index)
 
bpp::reference_type get_reference_type () const
 
std::string get_array_index () const
 
- Public Member Functions inherited from bpp::bpp_string
 bpp_string ()
 
void add_code (const std::string &code, bool add_newline=true) override
 Add code to the primary buffer. More...
 
void add_code_to_previous_line (const std::string &code) override
 Add code to the pre-code buffer. More...
 
void add_code_to_next_line (const std::string &code) override
 Add code to the post-code buffer. More...
 
std::string get_code () const override
 Return the contents of the main code buffer as a string. More...
 
std::string get_pre_code () const override
 Return the contents of the pre-code buffer as a string. More...
 
std::string get_post_code () const override
 Return the contents of the post-code buffer as a string. More...
 
- Public Member Functions inherited from bpp::bpp_code_entity
 bpp_code_entity ()
 
virtual ~bpp_code_entity ()=default
 
bool add_object (std::shared_ptr< bpp_object > object) override
 Add an object to the code entity. More...
 
virtual void flush_nextline_buffer ()
 
virtual void flush_postline_buffer ()
 
virtual void flush_code_buffers ()
 
virtual void clear_all_buffers ()
 
- Public Member Functions inherited from bpp::bpp_entity
virtual ~bpp_entity ()=default
 
virtual bool add_class (std::shared_ptr< bpp_class > class_)
 Add a class to this entity's list of classes. More...
 
virtual std::shared_ptr< bpp_classget_class () const
 
virtual std::string get_address () const
 
virtual std::string get_name () const
 
virtual std::weak_ptr< bpp::bpp_classget_containing_class () const
 Get the class which contains this entity. More...
 
virtual bool set_containing_class (std::weak_ptr< bpp::bpp_class > containing_class)
 
virtual void inherit (std::shared_ptr< bpp_entity > parent)
 Inherit from a parent entity. More...
 
virtual void inherit (std::shared_ptr< bpp_class > parent)
 
virtual std::unordered_map< std::string, std::shared_ptr< bpp_class > > get_classes () const
 
virtual std::unordered_map< std::string, std::shared_ptr< bpp_object > > get_objects () const
 
virtual std::shared_ptr< bpp_classget_class (const std::string &name)
 
virtual std::shared_ptr< bpp_objectget_object (const std::string &name)
 

Private Attributes

bpp::reference_type reference_type
 
std::string array_index = ""
 

Additional Inherited Members

- Protected Attributes inherited from bpp::bpp_code_entity
std::shared_ptr< std::ostream > code = std::make_shared<std::ostringstream>()
 
std::string nextline_buffer = ""
 
std::string postline_buffer = ""
 
bool buffers_flushed = false
 
- Protected Attributes inherited from bpp::bpp_entity
std::unordered_map< std::string, std::shared_ptr< bpp_class > > classes
 A map of class names to class objects within this entity. More...
 
std::unordered_map< std::string, std::shared_ptr< bpp_object > > objects
 A map of object names to bpp_objects within this entity. More...
 
std::unordered_map< std::string, std::shared_ptr< bpp_object > > local_objects
 Like objects, but only for objects whose scope is local to this entity. More...
 
std::shared_ptr< bpp_classtype = nullptr
 
std::weak_ptr< bpp_classcontaining_class
 
std::vector< std::shared_ptr< bpp_class > > parents
 

Detailed Description

An object reference in Bash++.

The 'bpp_' prefix signifies that this is used to parse a statement type which is unique to Bash++

Constructor & Destructor Documentation

◆ bpp_object_reference()

bpp::bpp_object_reference::bpp_object_reference ( )

Member Function Documentation

◆ get_array_index()

std::string bpp::bpp_object_reference::get_array_index ( ) const

◆ get_reference_type()

bpp::reference_type bpp::bpp_object_reference::get_reference_type ( ) const

◆ set_array_index()

void bpp::bpp_object_reference::set_array_index ( const std::string &  array_index)

◆ set_reference_type()

void bpp::bpp_object_reference::set_reference_type ( bpp::reference_type  reference_type)

Member Data Documentation

◆ array_index

std::string bpp::bpp_object_reference::array_index = ""
private

◆ reference_type

bpp::reference_type bpp::bpp_object_reference::reference_type
private

The documentation for this class was generated from the following files: