Unity Scopes API
|
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 &&) | |
Department & | operator= (Department const &other) |
Department & | operator= (Department &&) |
A department with optional sub-departments.
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()).
query | The query (and associated parameters, such as filter state) to be executed when the user selects this department. |
label | The 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.
department_id | The department identifier. |
query | The canned query (and associated parameters, such as filter state) to be executed when the user selects this department. |
label | The 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.
department_id | The department identifier. |
query | The canned query (and associated parameters, such as filter state) to be executed when the user selects this department. |
label | The display name of this department. |
subdepartments | The sub-departments of this department. |
std::string unity::scopes::Department::id | ( | ) | const |
Get the identifier of this department.
std::string unity::scopes::Department::label | ( | ) | const |
Get the label of this department.
CannedQuery unity::scopes::Department::query | ( | ) | const |
Get the canned query associated with this department.
void unity::scopes::Department::set_subdepartments | ( | DepartmentList const & | departments | ) |
Set sub-departments of this department.
departments | The list of sub-departments. |
DepartmentList unity::scopes::Department::subdepartments | ( | ) | const |
Get list of sub-departments of this department.