Student with set
Student Class Reference

#include <student.h>

Public Member Functions

 Student ()
 
 Student (const std::string &name, const std::string &matrikel, const int studium)
 
 Student (const std::string &name, const std::string &matnr, const std::vector< int > &skz)
 
 Student (const Student &orig)=default
 
 Student (Student &&orig)=default
 
Studentoperator= (const Student &rhs)=delete
 
Studentoperator= (Student &&rhs)=delete
 
 ~Student ()
 
std::string Getname () const
 
void Setname (const std::string &val)
 
std::string Getmatr_nr () const
 
void Add_SKZ (const int skz)
 
void Del_SKZ (const int skz)
 
int num_Studies () const
 
std::vector< int > Get_SKZ () const
 

Friends

std::ostream & operator<< (std::ostream &s, const Student &rhs)
 
std::istream & operator>> (std::istream &s, Student &rhs)
 

Detailed Description

Klasse Student, welche nun mehrere SKZ speichert.

Definition at line 10 of file student.h.

Constructor & Destructor Documentation

◆ Student() [1/5]

Student::Student ( )

Default constructor

Definition at line 8 of file student.cpp.

◆ Student() [2/5]

Student::Student ( const std::string &  name,
const std::string &  matrikel,
const int  studium 
)

Constructor for a student with a single study ID

Parameters
[in]namename of student
[in]matrikelstudent ID
[in]studiumstudy ID

◆ Student() [3/5]

Student::Student ( const std::string &  name,
const std::string &  matnr,
const std::vector< int > &  skz 
)

Constructor for a student with a single study ID

Parameters
[in]namename of student
[in]matnrstudent ID
[in]skzvector of study IDs

◆ Student() [4/5]

Student::Student ( const Student orig)
default

◆ Student() [5/5]

Student::Student ( Student &&  orig)
default

◆ ~Student()

Student::~Student ( )
inline

destructor

Definition at line 43 of file student.h.

Member Function Documentation

◆ Add_SKZ()

void Student::Add_SKZ ( const int  skz)

Fuegt eine Studienkennzahl (SKZ) hinzu.

Parameters
[in]skzzusaetzliche SKZ
Warning
Es wird nicht ueberprueft, ob diese SKZ bereits gespeichert ist. Dies wuerde ein find oder ein unique erfordern.

Definition at line 32 of file student.cpp.

Here is the caller graph for this function:

◆ Del_SKZ()

void Student::Del_SKZ ( const int  skz)

Enfernt eine Studienkennzahl (SKZ).

Parameters
[in]skzzu entfernende SKZ
Warning
Es wird nicht ueberprueft, ob diese SKZ mehrfach gespeichert ist.

Definition at line 37 of file student.cpp.

Here is the caller graph for this function:

◆ Get_SKZ()

vector< int > Student::Get_SKZ ( ) const

Gets the vector of all study IDs

Returns
vector of all study IDs

Definition at line 42 of file student.cpp.

Here is the call graph for this function:

◆ Getmatr_nr()

std::string Student::Getmatr_nr ( ) const
inline

Access student ID

Returns
The current value of matr_nr

Definition at line 62 of file student.h.

Here is the caller graph for this function:

◆ Getname()

std::string Student::Getname ( ) const
inline

Access name

Returns
The current value of name

Definition at line 48 of file student.h.

Here is the caller graph for this function:

◆ num_Studies()

int Student::num_Studies ( ) const
inline

Asks for the number of enrolled studies

Returns
number of enrolled studies

Definition at line 84 of file student.h.

Here is the caller graph for this function:

◆ operator=() [1/2]

Student& Student::operator= ( const Student rhs)
delete

◆ operator=() [2/2]

Student& Student::operator= ( Student &&  rhs)
delete

◆ Setname()

void Student::Setname ( const std::string &  val)
inline

Set name

Parameters
valNew value to set

Definition at line 56 of file student.h.

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  s,
const Student rhs 
)
friend

Ausgabeoperator fuer die Klasse.

Parameters
[in]sein beliebiger Ausgabestrom
[in]rhsdie auszugebende Instanz

◆ operator>>

std::istream& operator>> ( std::istream &  s,
Student rhs 
)
friend

Eingabeoperator fuer die Klasse.

Parameters
[in]sein beliebiger Eingabestrom
[in]rhsdie einzugebende Instanz
Warning
Hier wird nur eine SKZ eingegeben.

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