@@ -47,7 +47,6 @@ class Library;
4747 * class internal options.
4848 */
4949class CmdLineParser {
50- friend class TestCmdlineParser ;
5150public:
5251 /* *
5352 * The constructor.
@@ -80,19 +79,6 @@ class CmdLineParser {
8079 static std::list<FileWithDetails> filterFiles (const std::vector<std::string>& fileFilters,
8180 const std::list<FileWithDetails>& filesResolved);
8281
83- /* *
84- * Parse given command line.
85- * @return true if command line was ok, false if there was an error.
86- */
87- Result parseFromArgs (int argc, const char * const argv[]);
88-
89- /* *
90- * Return the path names user gave to command line.
91- */
92- const std::vector<std::string>& getPathNames () const {
93- return mPathNames ;
94- }
95-
9682 /* *
9783 * Return the files user gave to command line.
9884 */
@@ -107,26 +93,24 @@ class CmdLineParser {
10793 return mFileSettings ;
10894 }
10995
96+ protected:
11097 /* *
111- * Return a list of paths user wants to ignore.
98+ * Parse given command line.
99+ * @return true if command line was ok, false if there was an error.
112100 */
113- const std::vector<std::string>& getIgnoredPaths () const {
114- return mIgnoredPaths ;
115- }
101+ Result parseFromArgs (int argc, const char * const argv[]);
116102
117103 /* *
118104 * Get Cppcheck version
119105 */
120106 std::string getVersion () const ;
121107
122- protected:
123-
108+ private:
124109 /* *
125110 * Print help text to the console.
126111 */
127112 void printHelp () const ;
128113
129- private:
130114 bool isCppcheckPremium () const ;
131115
132116 template <typename T>
@@ -168,19 +152,21 @@ class CmdLineParser {
168152
169153 bool loadCppcheckCfg ();
170154
155+ void outputFormatOptionMixingError () const ;
156+
171157 CmdLineLogger &mLogger ;
172158
159+ Settings &mSettings ;
160+ Suppressions &mSuppressions ;
161+
162+ protected:
173163 std::vector<std::string> mPathNames ;
174164 std::list<FileWithDetails> mFiles ;
175165 std::list<FileSettings> mFileSettings ;
176166 std::vector<std::string> mIgnoredPaths ;
177- Settings &mSettings ;
178- Suppressions &mSuppressions ;
179167 bool mAnalyzeAllVsConfigsSetOnCmdLine = false ;
180168 /* * @brief Name of the language that is enforced. Empty per default. */
181169 Standards::Language mEnforcedLang {Standards::Language::None};
182-
183- void outputFormatOptionMixingError () const ;
184170};
185171
186172// / @}
0 commit comments