PandA-2024.02
Public Member Functions | Private Attributes
bus_connection_o Class Reference

This class describes a generic bus connection. More...

#include <structural_objects.hpp>

Inheritance diagram for bus_connection_o:
Inheritance graph
[legend]
Collaboration diagram for bus_connection_o:
Collaboration graph
[legend]

Public Member Functions

 bus_connection_o (int debug_level, const structural_objectRef o)
 Constructor. More...
 
 ~bus_connection_o () override=default
 destructor More...
 
void add_connection (structural_objectRef c)
 Add a connection (e.g. More...
 
const structural_objectRef get_connection (unsigned int n) const
 Return a connection. More...
 
unsigned int get_connections_size () const
 Return the number of connections associated with the bus connection object. More...
 
void copy (structural_objectRef dest) const override
 Perform a copy of the bus_connection_o. More...
 
structural_objectRef find_member (const std::string &id, so_kind type, const structural_objectRef owner) const override
 Return the object named id of a given type which belongs to or it is associated with the object. More...
 
structural_objectRef find_isomorphic (const structural_objectRef key) const override
 Find key in this object. More...
 
void xload (const xml_element *Enode, structural_objectRef owner, structural_managerRef const &CM) override
 Load a structural_object starting from an xml file. More...
 
void xwrite (xml_element *rootnode) override
 Add a structural_object to an xml tree. More...
 
void print (std::ostream &os) const override
 Print the bus_connection_o (for debug purpose) More...
 
- Public Member Functions inherited from structural_object
 structural_object (int debug_level, const structural_objectRef o)
 Constructor for the structural_object. More...
 
virtual ~structural_object ()=default
 virtual destructor More...
 
const structural_objectRef get_owner () const
 Return the owner. More...
 
void set_owner (const structural_objectRef new_owner)
 set the owner of the structural object More...
 
void set_treenode (unsigned int n)
 Set the treenode id associated with the structural_object. More...
 
unsigned int get_treenode () const
 Return the treenode id associated with the structural_object. More...
 
void set_id (const std::string &s)
 Set the identifier associated with the structural_object. More...
 
const std::string & get_id () const
 Return the identifier associated with the structural_object. More...
 
void set_type (const structural_type_descriptorRef &s)
 Set the type of the structural_object. More...
 
const structural_type_descriptorRefget_typeRef () const
 Return the type descriptor of the structural_object. More...
 
void type_resize (unsigned long long new_bit_size)
 Just resize the size of the bits of the object. More...
 
void type_resize (unsigned long long new_bit_size, unsigned long long new_vec_size)
 resizing of vector objects More...
 
void set_black_box (bool bb)
 Set the black box property associated with the structural_object. More...
 
bool get_black_box () const
 Return the black box property. More...
 
void SetParameter (const std::string &name, const std::string &value)
 Set a parameter value. More...
 
bool ExistsParameter (std::string name) const
 Check if a parameter has been specified. More...
 
std::string GetParameter (std::string name) const
 Get the value associated to parameter if it has been associated; if it has not specified returns the default. More...
 
std::string GetDefaultParameter (std::string name) const
 Get the value associated to parameter if it has been associate; It throws an exception if it has not been associated. More...
 
CustomMap< std::string, std::string > GetParameters () const
 return the whole set of parameters More...
 
virtual void AddParameter (const std::string &name, const std::string &default_value)
 Add a parameter. More...
 
const std::string get_path () const
 Return a unique identifier of the structural object. More...
 
virtual std::string get_kind_text () const =0
 Virtual function used to get the string name of a structural_object instance. More...
 
virtual enum so_kind get_kind () const =0
 Virtual function used to find the real type of a structural_object instance. More...
 

Private Attributes

std::vector< Wrefcount< structural_object > > connections
 List of connections associated with the bus. More...
 

Additional Inherited Members

- Protected Member Functions inherited from structural_object
std::string convert_so_short (so_kind in) const
 Convert a so_kind in a short string. More...
 
- Protected Attributes inherited from structural_object
friend structural_manager
 
int debug_level
 debug level for the object More...
 
- Static Protected Attributes inherited from structural_object
static simple_indent PP
 pretty print functor object used by all print members to indent the output of the print function. More...
 

Detailed Description

This class describes a generic bus connection.

A bus_connection_o is a a vector of signals or channels [1..n].

Definition at line 2441 of file structural_objects.hpp.

Constructor & Destructor Documentation

◆ bus_connection_o()

bus_connection_o::bus_connection_o ( int  debug_level,
const structural_objectRef  o 
)

Constructor.

Parameters
ois the owner of the bus_connection_o.

Definition at line 5000 of file structural_objects.cpp.

◆ ~bus_connection_o()

bus_connection_o::~bus_connection_o ( )
overridedefault

destructor

Member Function Documentation

◆ add_connection()

void bus_connection_o::add_connection ( structural_objectRef  c)

Add a connection (e.g.

a signal or a channel) to the bus connection object.

Parameters
cis a signal connection

Definition at line 5004 of file structural_objects.cpp.

References connections, and THROW_ASSERT.

◆ copy()

void bus_connection_o::copy ( structural_objectRef  dest) const
overridevirtual

Perform a copy of the bus_connection_o.

Parameters
destdestination object.

someone has to take care of connections

Reimplemented from structural_object.

Definition at line 5059 of file structural_objects.cpp.

References structural_object::copy().

Here is the call graph for this function:

◆ find_isomorphic()

structural_objectRef bus_connection_o::find_isomorphic ( const structural_objectRef  key) const
overridevirtual

Find key in this object.

Parameters
keyis the object searched.

Implements structural_object.

Definition at line 5021 of file structural_objects.cpp.

References THROW_ERROR.

◆ find_member()

structural_objectRef bus_connection_o::find_member ( const std::string &  id,
so_kind  type,
const structural_objectRef  owner 
) const
overridevirtual

Return the object named id of a given type which belongs to or it is associated with the object.

Parameters
idis the identifier of the object we are looking for.
typeis the type of the object we are looking for.
owneris the owner of the object named id.

Implements structural_object.

Definition at line 5027 of file structural_objects.cpp.

References action_o_K, bus_connection_o_K, channel_o_K, component_o_K, connections, constant_o_K, data_o_K, event_o_K, port_o_K, port_vector_o_K, signal_o_K, signal_vector_o_K, and THROW_ERROR.

◆ get_connection()

const structural_objectRef bus_connection_o::get_connection ( unsigned int  n) const

Return a connection.

Parameters
nis the index of the connection

Definition at line 5010 of file structural_objects.cpp.

References connections, and THROW_ASSERT.

◆ get_connections_size()

unsigned int bus_connection_o::get_connections_size ( ) const

Return the number of connections associated with the bus connection object.

Definition at line 5016 of file structural_objects.cpp.

References connections.

◆ print()

void bus_connection_o::print ( std::ostream &  os) const
overridevirtual

Print the bus_connection_o (for debug purpose)

Parameters
osis an output stream

Reimplemented from structural_object.

Definition at line 5076 of file structural_objects.cpp.

References connections, structural_object::convert_so_short(), structural_object::PP, and structural_object::print().

Here is the call graph for this function:

◆ xload()

void bus_connection_o::xload ( const xml_element Enode,
structural_objectRef  owner,
structural_managerRef const &  CM 
)
overridevirtual

Load a structural_object starting from an xml file.

Parameters
nodeis a node of the xml tree.
owneris the refcount version of this.
CMis the circuit manager.

Reimplemented from structural_object.

Definition at line 5065 of file structural_objects.cpp.

References structural_object::xload().

Here is the call graph for this function:

◆ xwrite()

void bus_connection_o::xwrite ( xml_element rootnode)
overridevirtual

Add a structural_object to an xml tree.

Parameters
rootnodeis the root node at which the xml representation of the structural object is attached.

Reimplemented from structural_object.

Definition at line 5070 of file structural_objects.cpp.

References xml_child::add_child_element(), structural_object::get_kind_text(), and structural_object::xwrite().

Here is the call graph for this function:

Field Documentation

◆ connections

std::vector<Wrefcount<structural_object> > bus_connection_o::connections
private

List of connections associated with the bus.

Definition at line 2444 of file structural_objects.hpp.

Referenced by add_connection(), find_member(), get_connection(), get_connections_size(), and print().


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

Generated on Mon Feb 12 2024 13:03:46 for PandA-2024.02 by doxygen 1.8.13