31#ifndef ARGS__API_HPP__INCLUDED
32#define ARGS__API_HPP__INCLUDED
51template<
typename PARENT,
typename SELF,
typename ARGPTR,
61template<
typename PARENT,
typename ARGPTR >
75 template<
typename NAME >
80 bool required =
false )
82 auto group = std::unique_ptr< OnlyOneGroup, details::Deleter< ArgIface > > (
83 new OnlyOneGroup( std::forward< NAME > ( name ), required ),
90 m_self.addArg( std::move(
a ) );
97 template<
typename NAME >
104 auto group = std::unique_ptr< AllOfGroup, details::Deleter< ArgIface > > (
112 m_self.addArg( std::move(
a ) );
119 template<
typename NAME >
126 auto group = std::unique_ptr< AtLeastOneGroup, details::Deleter< ArgIface > > (
134 m_self.addArg( std::move(
a ) );
141 template<
typename NAME >
148 bool isWithValue =
false,
150 bool isRequired =
false,
161 auto arg = std::unique_ptr< Arg, details::Deleter< ArgIface > > (
162 new Arg( flag, std::forward< NAME > ( name ), isWithValue,
167 arg->setDescription( desc );
172 if( !defaultValue.empty() )
173 arg->setDefaultValue( defaultValue );
175 if( !valueSpecifier.empty() )
176 arg->setValueSpecifier( valueSpecifier );
180 m_self.addArg( std::move(
a ) );
190 bool isWithValue =
false,
192 bool isRequired =
false,
203 auto arg = std::unique_ptr< Arg, details::Deleter< ArgIface > > (
204 new Arg( flag, isWithValue, isRequired ),
208 arg->setDescription( desc );
213 if( !defaultValue.empty() )
214 arg->setDefaultValue( defaultValue );
216 if( !valueSpecifier.empty() )
217 arg->setValueSpecifier( valueSpecifier );
221 m_self.addArg( std::move(
a ) );
227 template<
typename NAME >
232 bool isWithValue =
false,
234 bool isRequired =
false,
245 auto arg = std::unique_ptr< Arg, details::Deleter< ArgIface > > (
246 new Arg( std::forward< NAME > ( name ), isWithValue,
251 arg->setDescription( desc );
256 if( !defaultValue.empty() )
257 arg->setDefaultValue( defaultValue );
259 if( !valueSpecifier.empty() )
260 arg->setValueSpecifier( valueSpecifier );
264 m_self.addArg( std::move(
a ) );
270 template<
typename NAME >
277 bool isWithValue =
false,
279 bool isRequired =
false,
290 auto arg = std::unique_ptr< MultiArg, details::Deleter< ArgIface > > (
291 new MultiArg( flag, std::forward< NAME > ( name ), isWithValue,
296 arg->setDescription( desc );
301 if( !defaultValue.empty() )
302 arg->setDefaultValue( defaultValue );
304 if( !valueSpecifier.empty() )
305 arg->setValueSpecifier( valueSpecifier );
309 m_self.addArg( std::move(
a ) );
319 bool isWithValue =
false,
321 bool isRequired =
false,
332 auto arg = std::unique_ptr< MultiArg, details::Deleter< ArgIface > > (
333 new MultiArg( flag, isWithValue, isRequired ),
337 arg->setDescription( desc );
342 if( !defaultValue.empty() )
343 arg->setDefaultValue( defaultValue );
345 if( !valueSpecifier.empty() )
346 arg->setValueSpecifier( valueSpecifier );
350 m_self.addArg( std::move(
a ) );
356 template<
typename NAME >
361 bool isWithValue =
false,
363 bool isRequired =
false,
374 auto arg = std::unique_ptr< MultiArg, details::Deleter< ArgIface > > (
375 new MultiArg( std::forward< NAME > ( name ), isWithValue,
380 arg->setDescription( desc );
385 if( !defaultValue.empty() )
386 arg->setDefaultValue( defaultValue );
388 if( !valueSpecifier.empty() )
389 arg->setValueSpecifier( valueSpecifier );
393 m_self.addArg( std::move(
a ) );
399 template<
typename NAME >
406 bool isWithValue =
false,
408 bool isRequired =
false,
419 auto arg = std::unique_ptr< MultiArg, details::Deleter< ArgIface > > (
420 new MultiArg( flag, std::forward< NAME > ( name ), isWithValue,
425 arg->setDescription( desc );
430 if( !defaultValues.empty() )
431 arg->setDefaultValues( defaultValues );
433 if( !valueSpecifier.empty() )
434 arg->setValueSpecifier( valueSpecifier );
438 m_self.addArg( std::move(
a ) );
448 bool isWithValue =
false,
450 bool isRequired =
false,
461 auto arg = std::unique_ptr< MultiArg, details::Deleter< ArgIface > > (
462 new MultiArg( flag, isWithValue, isRequired ),
466 arg->setDescription( desc );
471 if( !defaultValues.empty() )
472 arg->setDefaultValues( defaultValues );
474 if( !valueSpecifier.empty() )
475 arg->setValueSpecifier( valueSpecifier );
479 m_self.addArg( std::move(
a ) );
485 template<
typename NAME >
490 bool isWithValue =
false,
492 bool isRequired =
false,
503 auto arg = std::unique_ptr< MultiArg, details::Deleter< ArgIface > > (
504 new MultiArg( std::forward< NAME > ( name ), isWithValue,
509 arg->setDescription( desc );
514 if( !defaultValues.empty() )
515 arg->setDefaultValues( defaultValues );
517 if( !valueSpecifier.empty() )
518 arg->setValueSpecifier( valueSpecifier );
522 m_self.addArg( std::move(
a ) );
555 template<
typename NAME >
572 auto cmd = std::unique_ptr< Command, details::Deleter< ArgIface > > (
577 cmd->setDescription( desc );
582 if( !defaultValue.empty() )
583 cmd->setDefaultValue( defaultValue );
585 if( !valueSpecifier.empty() )
586 cmd->setValueSpecifier( valueSpecifier );
592 m_self.addArg( std::move(
arg ) );
598 template<
typename NAME >
615 auto cmd = std::unique_ptr< Command, details::Deleter< ArgIface > > (
620 cmd->setDescription( desc );
625 if( !defaultValues.empty() )
626 cmd->setDefaultValues( defaultValues );
628 if( !valueSpecifier.empty() )
629 cmd->setValueSpecifier( valueSpecifier );
635 m_self.addArg( std::move(
arg ) );
659template<
typename PARENT,
typename SELF,
typename ARGPTR >
674 template<
typename NAME >
681 auto group = std::unique_ptr< OnlyOneGroup, details::Deleter< ArgIface > > (
689 m_self.addArg( std::move(
a ) );
696 template<
typename NAME >
703 auto group = std::unique_ptr< AllOfGroup, details::Deleter< ArgIface > > (
711 m_self.addArg( std::move(
a ) );
718 template<
typename NAME >
725 auto group = std::unique_ptr< AtLeastOneGroup, details::Deleter< ArgIface > > (
733 m_self.addArg( std::move(
a ) );
740 template<
typename NAME >
747 bool isWithValue =
false,
749 bool isRequired =
false,
760 auto arg = std::unique_ptr< Arg, details::Deleter< ArgIface > > (
761 new Arg( flag, std::forward< NAME > ( name ), isWithValue,
766 arg->setDescription( desc );
771 if( !defaultValue.empty() )
772 arg->setDefaultValue( defaultValue );
774 if( !valueSpecifier.empty() )
775 arg->setValueSpecifier( valueSpecifier );
779 m_self.addArg( std::move(
a ) );
789 bool isWithValue =
false,
791 bool isRequired =
false,
802 auto arg = std::unique_ptr< Arg, details::Deleter< ArgIface > > (
803 new Arg( flag, isWithValue, isRequired ),
807 arg->setDescription( desc );
812 if( !defaultValue.empty() )
813 arg->setDefaultValue( defaultValue );
815 if( !valueSpecifier.empty() )
816 arg->setValueSpecifier( valueSpecifier );
820 m_self.addArg( std::move(
a ) );
826 template<
typename NAME >
831 bool isWithValue =
false,
833 bool isRequired =
false,
844 auto arg = std::unique_ptr< Arg, details::Deleter< ArgIface > > (
845 new Arg( std::forward< NAME > ( name ), isWithValue,
850 arg->setDescription( desc );
855 if( !defaultValue.empty() )
856 arg->setDefaultValue( defaultValue );
858 if( !valueSpecifier.empty() )
859 arg->setValueSpecifier( valueSpecifier );
863 m_self.addArg( std::move(
a ) );
869 template<
typename NAME >
876 bool isWithValue =
false,
878 bool isRequired =
false,
889 auto arg = std::unique_ptr< MultiArg, details::Deleter< ArgIface > > (
890 new MultiArg( flag, std::forward< NAME > ( name ), isWithValue,
895 arg->setDescription( desc );
900 if( !defaultValue.empty() )
901 arg->setDefaultValue( defaultValue );
903 if( !valueSpecifier.empty() )
904 arg->setValueSpecifier( valueSpecifier );
908 m_self.addArg( std::move(
a ) );
918 bool isWithValue =
false,
920 bool isRequired =
false,
931 auto arg = std::unique_ptr< MultiArg, details::Deleter< ArgIface > > (
932 new MultiArg( flag, isWithValue, isRequired ),
936 arg->setDescription( desc );
941 if( !defaultValue.empty() )
942 arg->setDefaultValue( defaultValue );
944 if( !valueSpecifier.empty() )
945 arg->setValueSpecifier( valueSpecifier );
949 m_self.addArg( std::move(
a ) );
955 template<
typename NAME >
960 bool isWithValue =
false,
962 bool isRequired =
false,
973 auto arg = std::unique_ptr< MultiArg, details::Deleter< ArgIface > > (
974 new MultiArg( std::forward< NAME > ( name ), isWithValue,
979 arg->setDescription( desc );
984 if( !defaultValue.empty() )
985 arg->setDefaultValue( defaultValue );
987 if( !valueSpecifier.empty() )
988 arg->setValueSpecifier( valueSpecifier );
992 m_self.addArg( std::move(
a ) );
998 template<
typename NAME >
1005 bool isWithValue =
false,
1007 bool isRequired =
false,
1018 auto arg = std::unique_ptr< MultiArg, details::Deleter< ArgIface > > (
1019 new MultiArg( flag, std::forward< NAME > ( name ), isWithValue,
1024 arg->setDescription( desc );
1029 if( !defaultValues.empty() )
1030 arg->setDefaultValues( defaultValues );
1032 if( !valueSpecifier.empty() )
1033 arg->setValueSpecifier( valueSpecifier );
1037 m_self.addArg( std::move(
a ) );
1047 bool isWithValue =
false,
1049 bool isRequired =
false,
1060 auto arg = std::unique_ptr< MultiArg, details::Deleter< ArgIface > > (
1061 new MultiArg( flag, isWithValue, isRequired ),
1065 arg->setDescription( desc );
1070 if( !defaultValues.empty() )
1071 arg->setDefaultValues( defaultValues );
1073 if( !valueSpecifier.empty() )
1074 arg->setValueSpecifier( valueSpecifier );
1078 m_self.addArg( std::move(
a ) );
1084 template<
typename NAME >
1089 bool isWithValue =
false,
1091 bool isRequired =
false,
1102 auto arg = std::unique_ptr< MultiArg, details::Deleter< ArgIface > > (
1103 new MultiArg( std::forward< NAME > ( name ), isWithValue,
1108 arg->setDescription( desc );
1113 if( !defaultValues.empty() )
1114 arg->setDefaultValues( defaultValues );
1116 if( !valueSpecifier.empty() )
1117 arg->setValueSpecifier( valueSpecifier );
1121 m_self.addArg( std::move(
a ) );
1154 template<
typename NAME >
1171 auto cmd = std::unique_ptr< Command, details::Deleter< ArgIface > > (
1176 cmd->setDescription( desc );
1181 if( !defaultValue.empty() )
1182 cmd->setDefaultValue( defaultValue );
1184 if( !valueSpecifier.empty() )
1185 cmd->setValueSpecifier( valueSpecifier );
1191 m_self.addArg( std::move(
arg ) );
1197 template<
typename NAME >
1214 auto cmd = std::unique_ptr< Command, details::Deleter< ArgIface > > (
1219 cmd->setDescription( desc );
1224 if( !defaultValues.empty() )
1225 cmd->setDefaultValues( defaultValues );
1227 if( !valueSpecifier.empty() )
1228 cmd->setValueSpecifier( valueSpecifier );
1234 m_self.addArg( std::move(
arg ) );
1258template<
typename PARENT,
typename SELF,
typename ARGPTR >
1272 template<
typename NAME >
1279 auto group = std::unique_ptr< OnlyOneGroup, details::Deleter< ArgIface > > (
1287 m_self.addArg( std::move(
a ) );
1290 ( *(
static_cast< PARENT*
> (
this ) ),
g );
1294 template<
typename NAME >
1301 auto group = std::unique_ptr< AllOfGroup, details::Deleter< ArgIface > > (
1309 m_self.addArg( std::move(
a ) );
1312 ( *(
static_cast< PARENT*
> (
this ) ),
g );
1316 template<
typename NAME >
1323 auto group = std::unique_ptr< AtLeastOneGroup, details::Deleter< ArgIface > > (
1331 m_self.addArg( std::move(
a ) );
1334 ( *(
static_cast< PARENT*
> (
this ) ),
g );
1338 template<
typename NAME >
1345 bool isWithValue =
false,
1347 bool isRequired =
false,
1358 auto arg = std::unique_ptr< Arg, details::Deleter< ArgIface > > (
1359 new Arg( flag, std::forward< NAME > ( name ), isWithValue,
1364 arg->setDescription( desc );
1369 if( !defaultValue.empty() )
1370 arg->setDefaultValue( defaultValue );
1372 if( !valueSpecifier.empty() )
1373 arg->setValueSpecifier( valueSpecifier );
1377 m_self.addArg( std::move(
a ) );
1387 bool isWithValue =
false,
1389 bool isRequired =
false,
1400 auto arg = std::unique_ptr< Arg, details::Deleter< ArgIface > > (
1401 new Arg( flag, isWithValue, isRequired ),
1405 arg->setDescription( desc );
1410 if( !defaultValue.empty() )
1411 arg->setDefaultValue( defaultValue );
1413 if( !valueSpecifier.empty() )
1414 arg->setValueSpecifier( valueSpecifier );
1418 m_self.addArg( std::move(
a ) );
1424 template<
typename NAME >
1429 bool isWithValue =
false,
1431 bool isRequired =
false,
1442 auto arg = std::unique_ptr< Arg, details::Deleter< ArgIface > > (
1443 new Arg( std::forward< NAME > ( name ), isWithValue,
1448 arg->setDescription( desc );
1453 if( !defaultValue.empty() )
1454 arg->setDefaultValue( defaultValue );
1456 if( !valueSpecifier.empty() )
1457 arg->setValueSpecifier( valueSpecifier );
1461 m_self.addArg( std::move(
a ) );
1467 template<
typename NAME >
1474 bool isWithValue =
false,
1476 bool isRequired =
false,
1487 auto arg = std::unique_ptr< MultiArg, details::Deleter< ArgIface > > (
1488 new MultiArg( flag, std::forward< NAME > ( name ), isWithValue,
1493 arg->setDescription( desc );
1498 if( !defaultValue.empty() )
1499 arg->setDefaultValue( defaultValue );
1501 if( !valueSpecifier.empty() )
1502 arg->setValueSpecifier( valueSpecifier );
1506 m_self.addArg( std::move(
a ) );
1516 bool isWithValue =
false,
1518 bool isRequired =
false,
1529 auto arg = std::unique_ptr< MultiArg, details::Deleter< ArgIface > > (
1530 new MultiArg( flag, isWithValue, isRequired ),
1534 arg->setDescription( desc );
1539 if( !defaultValue.empty() )
1540 arg->setDefaultValue( defaultValue );
1542 if( !valueSpecifier.empty() )
1543 arg->setValueSpecifier( valueSpecifier );
1547 m_self.addArg( std::move(
a ) );
1553 template<
typename NAME >
1558 bool isWithValue =
false,
1560 bool isRequired =
false,
1571 auto arg = std::unique_ptr< MultiArg, details::Deleter< ArgIface > > (
1572 new MultiArg( std::forward< NAME > ( name ), isWithValue,
1577 arg->setDescription( desc );
1582 if( !defaultValue.empty() )
1583 arg->setDefaultValue( defaultValue );
1585 if( !valueSpecifier.empty() )
1586 arg->setValueSpecifier( valueSpecifier );
1590 m_self.addArg( std::move(
a ) );
1596 template<
typename NAME >
1603 bool isWithValue =
false,
1605 bool isRequired =
false,
1616 auto arg = std::unique_ptr< MultiArg, details::Deleter< ArgIface > > (
1617 new MultiArg( flag, std::forward< NAME > ( name ), isWithValue,
1622 arg->setDescription( desc );
1627 if( !defaultValues.empty() )
1628 arg->setDefaultValues( defaultValues );
1630 if( !valueSpecifier.empty() )
1631 arg->setValueSpecifier( valueSpecifier );
1635 m_self.addArg( std::move(
a ) );
1645 bool isWithValue =
false,
1647 bool isRequired =
false,
1658 auto arg = std::unique_ptr< MultiArg, details::Deleter< ArgIface > > (
1659 new MultiArg( flag, isWithValue, isRequired ),
1663 arg->setDescription( desc );
1668 if( !defaultValues.empty() )
1669 arg->setDefaultValues( defaultValues );
1671 if( !valueSpecifier.empty() )
1672 arg->setValueSpecifier( valueSpecifier );
1676 m_self.addArg( std::move(
a ) );
1682 template<
typename NAME >
1687 bool isWithValue =
false,
1689 bool isRequired =
false,
1700 auto arg = std::unique_ptr< MultiArg, details::Deleter< ArgIface > > (
1701 new MultiArg( std::forward< NAME > ( name ), isWithValue,
1706 arg->setDescription( desc );
1711 if( !defaultValues.empty() )
1712 arg->setDefaultValues( defaultValues );
1714 if( !valueSpecifier.empty() )
1715 arg->setValueSpecifier( valueSpecifier );
1719 m_self.addArg( std::move(
a ) );
1725 template<
typename NAME >
1742 auto cmd = std::unique_ptr< Command, details::Deleter< ArgIface > > (
1747 cmd->setDescription( desc );
1752 if( !defaultValue.empty() )
1753 cmd->setDefaultValue( defaultValue );
1755 if( !valueSpecifier.empty() )
1756 cmd->setValueSpecifier( valueSpecifier );
1762 m_self.addArg( std::move(
arg ) );
1768 template<
typename NAME >
1785 auto cmd = std::unique_ptr< Command, details::Deleter< ArgIface > > (
1790 cmd->setDescription( desc );
1795 if( !defaultValues.empty() )
1796 cmd->setDefaultValues( defaultValues );
1798 if( !valueSpecifier.empty() )
1799 cmd->setValueSpecifier( valueSpecifier );
1805 m_self.addArg( std::move(
arg ) );
Group of args where all arguments should be defined.
Argument with one value that can be present only once in the command line.
Group of args where at least one argument should be defined.
Command in the command line interface.
std::unique_ptr< ArgIface, details::Deleter< ArgIface > > ArgPtr
Smart pointer to the argument.
MultiArg is a class that presents argument in the command line taht can be presented more than once o...
Group of args where only one argument can be defined.
API< PARENT, Command, ARGPTR, false > addArg(ArgIface *arg)
Add argument.
API< API< PARENT, Command, ARGPTR, false >, AllOfGroup, ARGPTR, false > addAllOfGroup(NAME &&name, bool required=false)
Add AllOfGroup.
API< PARENT, Command, ARGPTR, false > & addMultiArgWithFlagOnlyAndDefaultValues(Char flag, bool isWithValue=false, bool isRequired=false, const String &desc=String(), const String &longDesc=String(), const StringList &defaultValues=StringList(), const String &valueSpecifier=String())
Add multi argument with flag only.
API< PARENT, Command, ARGPTR, false > addArg(GroupIface::ArgPtr arg)
Add argument.
PARENT & end() const
End this group.
API< PARENT, Command, ARGPTR, false > & addMultiArg(Char flag, NAME &&name, bool isWithValue=false, bool isRequired=false, const String &desc=String(), const String &longDesc=String(), const String &defaultValue=String(), const String &valueSpecifier=String())
Add multi argument.
API< PARENT, Command, ARGPTR, false > & addArgWithNameOnly(NAME &&name, bool isWithValue=false, bool isRequired=false, const String &desc=String(), const String &longDesc=String(), const String &defaultValue=String(), const String &valueSpecifier=String())
Add argument with name only.
API< API< PARENT, Command, ARGPTR, false >, OnlyOneGroup, ARGPTR, false > addOnlyOneGroup(NAME &&name, bool required=false)
Add OnlyOneGroup.
API< PARENT, Command, ARGPTR, false > & addMultiArgWithNameOnlyAndDefaultValues(NAME &&name, bool isWithValue=false, bool isRequired=false, const String &desc=String(), const String &longDesc=String(), const StringList &defaultValues=StringList(), const String &valueSpecifier=String())
Add multi argument with name only.
API(PARENT &parent, Command &self)
API< PARENT, Command, ARGPTR, false > & addMultiArgWithFlagOnly(Char flag, bool isWithValue=false, bool isRequired=false, const String &desc=String(), const String &longDesc=String(), const String &defaultValue=String(), const String &valueSpecifier=String())
Add multi argument with flag only.
API< PARENT, Command, ARGPTR, false > & addArgWithFlagOnly(Char flag, bool isWithValue=false, bool isRequired=false, const String &desc=String(), const String &longDesc=String(), const String &defaultValue=String(), const String &valueSpecifier=String())
Add argument with flag only.
API< PARENT, Command, ARGPTR, false > & addMultiArgWithDefaulValues(Char flag, NAME &&name, bool isWithValue=false, bool isRequired=false, const String &desc=String(), const String &longDesc=String(), const StringList &defaultValues=StringList(), const String &valueSpecifier=String())
Add multi argument.
API< PARENT, Command, ARGPTR, false > addArg(ArgIface &arg)
Add argument.
API< API< PARENT, Command, ARGPTR, false >, AtLeastOneGroup, ARGPTR, false > addAtLeastOneGroup(NAME &&name, bool required=false)
Add AtLeastOneGroup.
API< PARENT, Command, ARGPTR, false > & addMultiArgWithNameOnly(NAME &&name, bool isWithValue=false, bool isRequired=false, const String &desc=String(), const String &longDesc=String(), const String &defaultValue=String(), const String &valueSpecifier=String())
Add multi argument with name only.
API< API< PARENT, Command, ARGPTR, false >, Command, ARGPTR, false > addCommandWithDefaultValues(NAME &&name, ValueOptions opt=ValueOptions::NoValue, bool isSubCommandRequired=false, const String &desc=String(), const String &longDesc=String(), const StringList &defaultValues=StringList(), const String &valueSpecifier=String())
Add Command.
API< PARENT, Command, ARGPTR, false > & addArgWithFlagAndName(Char flag, NAME &&name, bool isWithValue=false, bool isRequired=false, const String &desc=String(), const String &longDesc=String(), const String &defaultValue=String(), const String &valueSpecifier=String())
Add argument.
API< API< PARENT, Command, ARGPTR, false >, Command, ARGPTR, false > addCommand(NAME &&name, ValueOptions opt=ValueOptions::NoValue, bool isSubCommandRequired=false, const String &desc=String(), const String &longDesc=String(), const String &defaultValue=String(), const String &valueSpecifier=String())
Add Command.
API< PARENT, SELF, ARGPTR, false > & addMultiArgWithNameOnlyAndDefaultValues(NAME &&name, bool isWithValue=false, bool isRequired=false, const String &desc=String(), const String &longDesc=String(), const StringList &defaultValues=StringList(), const String &valueSpecifier=String())
Add multi argument with name only.
API< API< PARENT, SELF, ARGPTR, false >, Command, ARGPTR, false > addCommandWithDefaultValues(NAME &&name, ValueOptions opt=ValueOptions::NoValue, bool isSubCommandRequired=false, const String &desc=String(), const String &longDesc=String(), const StringList &defaultValues=StringList(), const String &valueSpecifier=String())
Add Command.
API< PARENT, SELF, ARGPTR, false > addArg(ArgIface *arg)
Add argument.
API< PARENT, SELF, ARGPTR, false > addArg(ArgIface &arg)
Add argument.
API< API< PARENT, SELF, ARGPTR, false >, Command, ARGPTR, false > addCommand(NAME &&name, ValueOptions opt=ValueOptions::NoValue, bool isSubCommandRequired=false, const String &desc=String(), const String &longDesc=String(), const String &defaultValue=String(), const String &valueSpecifier=String())
Add Command.
API< PARENT, SELF, ARGPTR, false > & addMultiArgWithDefaulValues(Char flag, NAME &&name, bool isWithValue=false, bool isRequired=false, const String &desc=String(), const String &longDesc=String(), const StringList &defaultValues=StringList(), const String &valueSpecifier=String())
Add multi argument.
API< API< PARENT, SELF, ARGPTR, false >, AtLeastOneGroup, ARGPTR, false > addAtLeastOneGroup(NAME &&name, bool required=false)
Add AtLeastOneGroup.
API< API< PARENT, SELF, ARGPTR, false >, OnlyOneGroup, ARGPTR, false > addOnlyOneGroup(NAME &&name, bool required=false)
Add OnlyOneGroup.
API< PARENT, SELF, ARGPTR, false > & addMultiArgWithFlagOnly(Char flag, bool isWithValue=false, bool isRequired=false, const String &desc=String(), const String &longDesc=String(), const String &defaultValue=String(), const String &valueSpecifier=String())
Add multi argument with flag only.
API< PARENT, SELF, ARGPTR, false > & addArgWithFlagOnly(Char flag, bool isWithValue=false, bool isRequired=false, const String &desc=String(), const String &longDesc=String(), const String &defaultValue=String(), const String &valueSpecifier=String())
Add argument with flag only.
API< PARENT, SELF, ARGPTR, false > & addMultiArgWithFlagOnlyAndDefaultValues(Char flag, bool isWithValue=false, bool isRequired=false, const String &desc=String(), const String &longDesc=String(), const StringList &defaultValues=StringList(), const String &valueSpecifier=String())
Add multi argument with flag only.
API< PARENT, SELF, ARGPTR, false > & addArgWithNameOnly(NAME &&name, bool isWithValue=false, bool isRequired=false, const String &desc=String(), const String &longDesc=String(), const String &defaultValue=String(), const String &valueSpecifier=String())
Add argument with name only.
API< PARENT, SELF, ARGPTR, false > addArg(GroupIface::ArgPtr arg)
Add argument.
API< PARENT, SELF, ARGPTR, false > & addArgWithFlagAndName(Char flag, NAME &&name, bool isWithValue=false, bool isRequired=false, const String &desc=String(), const String &longDesc=String(), const String &defaultValue=String(), const String &valueSpecifier=String())
Add argument.
API< API< PARENT, SELF, ARGPTR, false >, AllOfGroup, ARGPTR, false > addAllOfGroup(NAME &&name, bool required=false)
Add AllOfGroup.
API< PARENT, SELF, ARGPTR, false > & addMultiArg(Char flag, NAME &&name, bool isWithValue=false, bool isRequired=false, const String &desc=String(), const String &longDesc=String(), const String &defaultValue=String(), const String &valueSpecifier=String())
Add multi argument.
API< PARENT, SELF, ARGPTR, false > & addMultiArgWithNameOnly(NAME &&name, bool isWithValue=false, bool isRequired=false, const String &desc=String(), const String &longDesc=String(), const String &defaultValue=String(), const String &valueSpecifier=String())
Add multi argument with name only.
API(PARENT &parent, SELF &self)
PARENT & end() const
End this group.
PARENT & addMultiArgWithNameOnlyAndDefaultValues(NAME &&name, bool isWithValue=false, bool isRequired=false, const String &desc=String(), const String &longDesc=String(), const StringList &defaultValues=StringList(), const String &valueSpecifier=String())
Add multi argument with name only.
PARENT & addArgWithFlagOnly(Char flag, bool isWithValue=false, bool isRequired=false, const String &desc=String(), const String &longDesc=String(), const String &defaultValue=String(), const String &valueSpecifier=String())
Add argument with flag only.
PARENT & addMultiArgWithNameOnly(NAME &&name, bool isWithValue=false, bool isRequired=false, const String &desc=String(), const String &longDesc=String(), const String &defaultValue=String(), const String &valueSpecifier=String())
Add multi argument with name only.
API< PARENT, AtLeastOneGroup, ARGPTR, false > addAtLeastOneGroup(NAME &&name, bool required=false)
Add AtLeastOneGroup.
PARENT & addArgWithFlagAndName(Char flag, NAME &&name, bool isWithValue=false, bool isRequired=false, const String &desc=String(), const String &longDesc=String(), const String &defaultValue=String(), const String &valueSpecifier=String())
Add argument.
API< PARENT, AllOfGroup, ARGPTR, false > addAllOfGroup(NAME &&name, bool required=false)
Add AllOfGroup.
API< PARENT, Command, ARGPTR, false > addCommandWithDefaultValues(NAME &&name, ValueOptions opt=ValueOptions::NoValue, bool isSubCommandRequired=false, const String &desc=String(), const String &longDesc=String(), const StringList &defaultValues=StringList(), const String &valueSpecifier=String())
Add Command.
API< PARENT, OnlyOneGroup, ARGPTR, false > addOnlyOneGroup(NAME &&name, bool required=false)
Add OnlyOneGroup.
PARENT & addMultiArgWithFlagOnlyAndDefaultValues(Char flag, bool isWithValue=false, bool isRequired=false, const String &desc=String(), const String &longDesc=String(), const StringList &defaultValues=StringList(), const String &valueSpecifier=String())
Add multi argument with flag only.
PARENT & addArgWithNameOnly(NAME &&name, bool isWithValue=false, bool isRequired=false, const String &desc=String(), const String &longDesc=String(), const String &defaultValue=String(), const String &valueSpecifier=String())
Add argument with name only.
API< PARENT, Command, ARGPTR, false > addCommand(NAME &&name, ValueOptions opt=ValueOptions::NoValue, bool isSubCommandRequired=false, const String &desc=String(), const String &longDesc=String(), const String &defaultValue=String(), const String &valueSpecifier=String())
Add Command.
API(PARENT &parent, SELF &self)
PARENT & addMultiArg(Char flag, NAME &&name, bool isWithValue=false, bool isRequired=false, const String &desc=String(), const String &longDesc=String(), const String &defaultValue=String(), const String &valueSpecifier=String())
Add multi argument.
PARENT & addMultiArgWithFlagOnly(Char flag, bool isWithValue=false, bool isRequired=false, const String &desc=String(), const String &longDesc=String(), const String &defaultValue=String(), const String &valueSpecifier=String())
Add multi argument with flag only.
PARENT & addMultiArgWithDefaulValues(Char flag, NAME &&name, bool isWithValue=false, bool isRequired=false, const String &desc=String(), const String &longDesc=String(), const StringList &defaultValues=StringList(), const String &valueSpecifier=String())
Add multi argument.
std::string String
String type.
std::vector< String > StringList
List of strings.
ValueOptions
Options for value property.
String::value_type Char
Char type.