Unity Scopes API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
unity::scopes::Department Class Referencefinal

A department with optional sub-departments. More...

#include <unity/scopes/Department.h>

Public Member Functions

 Department (CannedQuery const &query, std::string const &label)
 Create a department with the given canned query and name. More...
 
 Department (std::string const &department_id, CannedQuery const &query, std::string const &label)
 Create a department with the given department identifier, canned query, and name. More...
 
 Department (std::string const &department_id, CannedQuery const &query, std::string const &label, DepartmentList const &subdepartments)
 Create a department with the given department identifier, canned query, name, and sub-departments. More...
 
void set_subdepartments (DepartmentList const &departments)
 Set sub-departments of this department. More...
 
std::string id () const
 Get the identifier of this department. More...
 
std::string label () const
 Get the label of this department. More...
 
CannedQuery query () const
 Get the canned query associated with this department. More...
 
DepartmentList subdepartments () const
 Get list of sub-departments of this department. More...
 
Copy and assignment

Copy and assignment operators (move and non-move versions) have the usual value semantics.

 Department (Department const &other)
 
 Department (Department &&)
 
Departmentoperator= (Department const &other)
 
Departmentoperator= (Department &&)
 

Detailed Description

A department with optional sub-departments.

Constructor & Destructor Documentation

unity::scopes::Department::Department ( CannedQuery const &  query,
std::string const &  label 
)

Create a department with the given canned query and name.

The identifier of this department instance is that of the query instance (CannedQuery::department_id()).

Parameters
queryThe query (and associated parameters, such as filter state) to be executed when the user selects this department.
labelThe display name of this department.
unity::scopes::Department::Department ( std::string const &  department_id,
CannedQuery const &  query,
std::string const &  label 
)

Create a department with the given department identifier, canned query, and name.

The canned query's target department identifier is updated with department_id. This constructor is convenient for creating multiple departments that use the same query and only need a different department identifier.

Parameters
department_idThe department identifier.
queryThe canned query (and associated parameters, such as filter state) to be executed when the user selects this department.
labelThe display name of this department.
unity::scopes::Department::Department ( std::string const &  department_id,
CannedQuery const &  query,
std::string const &  label,
DepartmentList const &  subdepartments 
)

Create a department with the given department identifier, canned query, name, and sub-departments.

The canned query's target department identifier is updated with department_id. This constructor is convenient for creating multiple departments that use the same query and only need a different department identifier.

Parameters
department_idThe department identifier.
queryThe canned query (and associated parameters, such as filter state) to be executed when the user selects this department.
labelThe display name of this department.
subdepartmentsThe sub-departments of this department.

Member Function Documentation

std::string unity::scopes::Department::id ( ) const

Get the identifier of this department.

Returns
The department identifier.
std::string unity::scopes::Department::label ( ) const

Get the label of this department.

Returns
The department label.
CannedQuery unity::scopes::Department::query ( ) const

Get the canned query associated with this department.

Returns
The canned query for this department.
void unity::scopes::Department::set_subdepartments ( DepartmentList const &  departments)

Set sub-departments of this department.

Parameters
departmentsThe list of sub-departments.
DepartmentList unity::scopes::Department::subdepartments ( ) const

Get list of sub-departments of this department.

Returns
The list of sub-departments.

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