Leosac  0.8.0
Open Source Access Control
Leosac::Auth::Door Class Reference

Represent a door. More...

#include <Door.hpp>

+ Inheritance diagram for Leosac::Auth::Door:
+ Collaboration diagram for Leosac::Auth::Door:

Public Member Functions

 Door ()
 
virtual DoorId id () const override
 
virtual std::string alias () const override
 
virtual std::string description () const override
 
virtual void alias (const std::string &alias) override
 
virtual void description (const std::string &desc) override
 
virtual IAccessPointPtr access_point () const override
 
virtual AccessPointId access_point_id () const override
 
virtual void access_point (IAccessPointPtr ptr) override
 
virtual std::vector< Tools::ScheduleMappingLWPtrlazy_mapping () const override
 Retrieve the lazy pointers to the ScheduleMapping objects that map this door. More...
 
void schedule_mapping_added (const Tools::ScheduleMappingPtr &sched_mapping)
 A ScheduleMapping object has added this door as part of its mapping. More...
 

Protected Attributes

DoorId id_
 
std::string alias_
 
std::string desc_
 
std::shared_ptr< AccessPointaccess_point_
 The access point that controls the door. More...
 
std::vector< Tools::ScheduleMappingLWPtrschedules_mapping_
 ScheduleMapping that maps this door. More...
 
const size_t version_
 

Friends

class odb::access
 
class Leosac::TestAccess
 

Detailed Description

Represent a door.

Definition at line 35 of file Door.hpp.

Constructor & Destructor Documentation

◆ Door()

Door::Door ( )

Definition at line 26 of file Door.cpp.

Member Function Documentation

◆ access_point() [1/2]

IAccessPointPtr Door::access_point ( ) const
overridevirtual

Implements Leosac::Auth::IDoor.

Definition at line 56 of file Door.cpp.

◆ access_point() [2/2]

void Door::access_point ( IAccessPointPtr  ptr)
overridevirtual

Implements Leosac::Auth::IDoor.

Definition at line 61 of file Door.cpp.

◆ access_point_id()

AccessPointId Door::access_point_id ( ) const
overridevirtual

Implements Leosac::Auth::IDoor.

Definition at line 79 of file Door.cpp.

◆ alias() [1/2]

std::string Door::alias ( ) const
overridevirtual

Implements Leosac::Auth::IDoor.

Definition at line 36 of file Door.cpp.

◆ alias() [2/2]

void Door::alias ( const std::string &  alias)
overridevirtual

Implements Leosac::Auth::IDoor.

Definition at line 46 of file Door.cpp.

◆ description() [1/2]

std::string Door::description ( ) const
overridevirtual

Implements Leosac::Auth::IDoor.

Definition at line 41 of file Door.cpp.

◆ description() [2/2]

void Door::description ( const std::string &  desc)
overridevirtual

Implements Leosac::Auth::IDoor.

Definition at line 51 of file Door.cpp.

◆ id()

DoorId Door::id ( ) const
overridevirtual

Implements Leosac::Auth::IDoor.

Definition at line 31 of file Door.cpp.

◆ lazy_mapping()

std::vector< Leosac::Tools::ScheduleMappingLWPtr > Door::lazy_mapping ( ) const
overridevirtual

Retrieve the lazy pointers to the ScheduleMapping objects that map this door.

Implements Leosac::Auth::IDoor.

Definition at line 68 of file Door.cpp.

◆ schedule_mapping_added()

void Door::schedule_mapping_added ( const Tools::ScheduleMappingPtr sched_mapping)

A ScheduleMapping object has added this door as part of its mapping.

This method is called by the ScheduleMapping to give a chance to the door to maintain its inverse vector.

Parameters
sched_mapping

Definition at line 73 of file Door.cpp.

Friends And Related Function Documentation

◆ Leosac::TestAccess

friend class Leosac::TestAccess
friend

Definition at line 91 of file Door.hpp.

◆ odb::access

friend class odb::access
friend

Definition at line 90 of file Door.hpp.

Member Data Documentation

◆ access_point_

std::shared_ptr<AccessPoint> Leosac::Auth::Door::access_point_
protected

The access point that controls the door.

May be null.

Definition at line 78 of file Door.hpp.

◆ alias_

std::string Leosac::Auth::Door::alias_
protected

Definition at line 70 of file Door.hpp.

◆ desc_

std::string Leosac::Auth::Door::desc_
protected

Definition at line 71 of file Door.hpp.

◆ id_

DoorId Leosac::Auth::Door::id_
protected

Definition at line 68 of file Door.hpp.

◆ schedules_mapping_

std::vector<Tools::ScheduleMappingLWPtr> Leosac::Auth::Door::schedules_mapping_
protected

ScheduleMapping that maps this door.

Definition at line 84 of file Door.hpp.

◆ version_

const size_t Leosac::Auth::Door::version_
protected

Definition at line 87 of file Door.hpp.


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