21 #include <unity/scopes/Variant.h>
22 #include <unity/util/DefinesPtrs.h>
77 static Department::UPtr
create(std::string
const& department_id,
CannedQuery const& query, std::string
const& label);
131 std::string
id()
const;
137 std::string
label()
const;
174 std::unique_ptr<internal::DepartmentImpl> p;
175 friend class internal::DepartmentImpl;
std::string label() const
Get the label of this department.
Definition: Department.cpp:97
void set_subdepartments(DepartmentList const &departments)
Set sub-departments of this department.
Definition: Department.cpp:77
std::string alternate_label() const
Get the alternate label of this department.
Definition: Department.cpp:102
std::string id() const
Get the identifier of this department.
Definition: Department.cpp:92
std::list< std::shared_ptr< Department const > > DepartmentList
List of departments (see unity::scopes::Department)
Definition: Department.h:44
Top-level namespace for all things Unity-related.
Definition: Version.h:49
bool has_subdepartments() const
Check if this department has subdepartments or has_subdepartments flag is set.
Definition: Department.cpp:112
std::map< std::string, Variant > VariantMap
A dictionary of (string, Variant) pairs.
Definition: Variant.h:38
Definition: ActionMetadata.h:31
A department with optional sub-departments.
Definition: Department.h:49
Parameters of a search query.
Definition: CannedQuery.h:49
static Department::UPtr create(CannedQuery const &query, std::string const &label)
Create a department with the given canned query and name.
CannedQuery query() const
Get the canned query associated with this department.
Definition: Department.cpp:107
DepartmentList subdepartments() const
Get list of sub-departments of this department.
Definition: Department.cpp:117
void set_has_subdepartments(bool subdepartments=true)
Sets has_subdepartments flag of this department.
Definition: Department.cpp:72
void add_subdepartment(Department::SCPtr const &department)
Add sub-department to this department.
Definition: Department.cpp:82
void set_alternate_label(std::string const &label)
Set the alternate label (plural of the normal label) of this department.
Definition: Department.cpp:87