]> granicus.if.org Git - icinga2/blob - lib/cli/objectlistcommand.hpp
Added ca restore command+docs to undo effects of ca remove
[icinga2] / lib / cli / objectlistcommand.hpp
1 /* Icinga 2 | (c) 2012 Icinga GmbH | GPLv2+ */
2
3 #ifndef OBJECTLISTCOMMAND_H
4 #define OBJECTLISTCOMMAND_H
5
6 #include "base/dictionary.hpp"
7 #include "base/array.hpp"
8 #include "cli/clicommand.hpp"
9 #include <ostream>
10
11 namespace icinga
12 {
13
14 /**
15  * The "object list" command.
16  *
17  * @ingroup cli
18  */
19 class ObjectListCommand final : public CLICommand
20 {
21 public:
22         DECLARE_PTR_TYPEDEFS(ObjectListCommand);
23
24         String GetDescription() const override;
25         String GetShortDescription() const override;
26         void InitParameters(boost::program_options::options_description& visibleDesc,
27                 boost::program_options::options_description& hiddenDesc) const override;
28         int Run(const boost::program_options::variables_map& vm, const std::vector<std::string>& ap) const override;
29
30 private:
31         static void PrintTypeCounts(std::ostream& fp, const std::map<String, int>& type_count);
32 };
33
34 }
35
36 #endif /* OBJECTLISTCOMMAND_H */