Algorithms_in_C++ 1.0.0
Set of algorithms implemented in C++.
Loading...
Searching...
No Matches
data_structures::linked_list::link Class Reference
Collaboration diagram for data_structures::linked_list::link:
[legend]

Public Member Functions

int val ()
 
std::shared_ptr< link > & succ ()
 
 link (int value=0)
 

Private Attributes

int pvalue
 value of the current link
 
std::shared_ptr< linkpsucc
 pointer to the next value on the list
 

Detailed Description

A link class containing a value and pointer to another link

Constructor & Destructor Documentation

◆ link()

data_structures::linked_list::link::link ( int value = 0)
inlineexplicit

Creates link with provided value and pointer to next link

Parameters
valueis the integer stored in the link
75: pvalue(value), psucc(nullptr) {}

Member Function Documentation

◆ succ()

std::shared_ptr< link > & data_structures::linked_list::link::succ ( )
inline

function returns the pointer to next link

Returns
the pointer to the next link
69{ return psucc; }

◆ val()

int data_structures::linked_list::link::val ( )
inline

function returns the integer value stored in the link.

Returns
the integer value stored in the link.
63{ return pvalue; }

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