mirror of
https://github.com/KeqingMoe/argparse.git
synced 2025-07-04 15:14:39 +00:00
Better naming: follow python naming convention.
This commit is contained in:
parent
89b9e22f9a
commit
7ef0de410b
@ -800,12 +800,12 @@ public:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void add_pre_text(std::string aPreText) {
|
void add_description(std::string aDescription) {
|
||||||
mPreText = std::move(aPreText);
|
mDescription = std::move(aDescription);
|
||||||
}
|
}
|
||||||
|
|
||||||
void add_post_text(std::string aPostText) {
|
void add_epilog(std::string aEpilog) {
|
||||||
mPostText = std::move(aPostText);
|
mEpilog = std::move(aEpilog);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Call parse_args_internal - which does all the work
|
/* Call parse_args_internal - which does all the work
|
||||||
@ -872,8 +872,8 @@ public:
|
|||||||
}
|
}
|
||||||
stream << "\n";
|
stream << "\n";
|
||||||
|
|
||||||
if(!parser.mPreText.empty())
|
if(!parser.mDescription.empty())
|
||||||
stream << parser.mPreText << "\n";
|
stream << parser.mDescription << "\n";
|
||||||
|
|
||||||
stream << "\n";
|
stream << "\n";
|
||||||
|
|
||||||
@ -894,8 +894,8 @@ public:
|
|||||||
stream << mOptionalArgument;
|
stream << mOptionalArgument;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!parser.mPostText.empty())
|
if(!parser.mEpilog.empty())
|
||||||
stream << parser.mPostText << "\n\n";
|
stream << parser.mEpilog << "\n\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
return stream;
|
return stream;
|
||||||
@ -1004,8 +1004,8 @@ private:
|
|||||||
}
|
}
|
||||||
|
|
||||||
std::string mProgramName;
|
std::string mProgramName;
|
||||||
std::string mPreText;
|
std::string mDescription;
|
||||||
std::string mPostText;
|
std::string mEpilog;
|
||||||
std::list<Argument> mPositionalArguments;
|
std::list<Argument> mPositionalArguments;
|
||||||
std::list<Argument> mOptionalArguments;
|
std::list<Argument> mOptionalArguments;
|
||||||
std::map<std::string_view, list_iterator, std::less<>> mArgumentMap;
|
std::map<std::string_view, list_iterator, std::less<>> mArgumentMap;
|
||||||
|
Loading…
Reference in New Issue
Block a user