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

#include <Zone.hpp>

Static Public Member Functions

static void validate (const Zone &z, std::set< ZoneId > &zone_ids)
 Perform validation of the zone. More...
 
static void validate_type (IZone::Type value)
 Validate that the integer value of the type is a correct type for a zone. More...
 

Detailed Description

Definition at line 31 of file Zone.hpp.

Member Function Documentation

◆ validate()

void Leosac::Auth::ZoneValidator::validate ( const Zone z,
std::set< ZoneId > &  zone_ids 
)
static

Perform validation of the zone.

The function will make sure that the zone do not have 2 physical's zone as parent.

Parameters
zone_idsSet of zone ids that were iterated over during the validation. This is to prevent cycle in parent/child relationship.

Definition at line 121 of file Zone.cpp.

◆ validate_type()

void Leosac::Auth::ZoneValidator::validate_type ( IZone::Type  value)
static

Validate that the integer value of the type is a correct type for a zone.

This is mostly useful when unserializing from an untrusted source.

Definition at line 162 of file Zone.cpp.


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