Skip to content

scram::core::Vertex

Representation of a vertex in BDD graphs. More...

#include <bdd.h>

Inherits from boost::noncopyable

Inherited by scram::core::NonTerminal< Ite >, scram::core::NonTerminal< SetNode >, scram::core::NonTerminal< T >, scram::core::Terminal< T >

Public Functions

Name
Vertex(int id)
intid() const
boolterminal() const
intuse_count() const
boolunique() const

Protected Functions

Name
~Vertex()<br>Communicates the destruction via the pointer to the unique table entry if there's any.

Friends

Name
classWeakIntrusivePtr< T >
voidintrusive_ptr_add_ref(Vertex< T > * ptr) <br>Increases the reference count for new intrusive pointers.
voidintrusive_ptr_release(Vertex< T > * ptr) <br>Decrements the reference count for removed intrusive pointers.

Detailed Description

cpp
template <class T >
class scram::core::Vertex;

Representation of a vertex in BDD graphs.

Template Parameters:

  • T The type of the main functional BDD vertex.

Precondition:

  • Vertices are managed by reference counted pointers provided by this class' interface.
  • Vertices are not shared among separate BDD instances.

This is a base class for all BDD vertices; however, it is NOT polymorphic for performance reasons.

Public Functions Documentation

function Vertex

cpp
inline explicit Vertex(
    int id
)

Parameters:

  • id Identifier of the BDD graph.

function id

cpp
inline int id() const

Return: Identifier of the BDD graph rooted by this vertex.

function terminal

cpp
inline bool terminal() const

Return: true if this vertex is terminal.

function use_count

cpp
inline int use_count() const

Return: The number of registered intrusive pointers.

function unique

cpp
inline bool unique() const

Return: true if there is only one registered shared pointer.

Protected Functions Documentation

function ~Vertex

cpp
inline ~Vertex()

Communicates the destruction via the pointer to the unique table entry if there's any.

Friends

friend WeakIntrusivePtr< T >

cpp
friend class WeakIntrusivePtr< T >(
    WeakIntrusivePtr< T > 
);

friend intrusive_ptr_add_ref

cpp
friend void intrusive_ptr_add_ref(
    Vertex< T > * ptr
);

Increases the reference count for new intrusive pointers.

Parameters:

  • ptr Vertex pointer managed by intrusive pointers.

friend intrusive_ptr_release

cpp
friend void intrusive_ptr_release(
    Vertex< T > * ptr
);

Decrements the reference count for removed intrusive pointers.

Parameters:

  • ptr Vertex pointer managed by intrusive pointers.

If no more intrusive pointers left, the object is deleted.


Updated on 2025-11-11 at 16:51:08 +0000