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< link > | psucc
| 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

  value | is the integer stored in the link

: pvalue(value), psucc(nullptr) {}
data_structures::linked_list::link::pvalue
int pvalue
value of the current link
Definition: linked_list.cpp:55
data_structures::linked_list::link::psucc
std::shared_ptr< link > psucc
pointer to the next value on the list
Definition: linked_list.cpp:56

## 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

{ 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.

{ return pvalue; }

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

- data_structures/linked_list.cpp