An adapter for copying a list of C++ strings into a list of C-style strings for passing to C code that expects argc/argv parameters. More...
Public Member Functions | |
CStringList () | |
template<class StringType > | |
CStringList (const UList< StringType > &input) | |
template<class StringType > | |
CStringList (const SubStrings< StringType > &input) | |
~CStringList () | |
bool | empty () const noexcept |
int | size () const noexcept |
char ** | strings () const |
char ** | strings (int start) const |
size_t | length () const |
const char * | data () const |
void | clear () |
template<class StringType > | |
int | reset (const UList< StringType > &input) |
template<class StringType > | |
int | reset (const SubStrings< StringType > &input) |
const char * | operator[] (int i) const |
template<class StringType > | |
Foam::List< StringType > | asList (int argc, const char *const argv[]) |
template<class StringType > | |
Foam::List< StringType > | asList (const char *const argv[]) |
Static Public Member Functions | |
static int | count (const char *const argv[]) |
template<class StringType > | |
static List< StringType > | asList (int argc, const char *const argv[]) |
template<class StringType > | |
static List< StringType > | asList (const char *const argv[]) |
An adapter for copying a list of C++ strings into a list of C-style strings for passing to C code that expects argc/argv parameters.
In addition to providing a C-compatible list of C-strings, the string lists are flattened into a single string of data that can be also be passed en mass.
Example use:
Definition at line 63 of file CStringList.H.
|
inline |
Definition at line 54 of file CStringListI.H.
|
inlineexplicit |
Definition at line 64 of file CStringListI.H.
References Foam::input(), and CStringList::reset().
|
inlineexplicit |
Definition at line 73 of file CStringListI.H.
References Foam::input(), and CStringList::reset().
|
inline |
Definition at line 83 of file CStringListI.H.
References clear().
|
inlinestatic |
Definition at line 38 of file CStringListI.H.
References n.
|
inlinenoexcept |
Definition at line 109 of file CStringListI.H.
Referenced by Foam::system().
|
inlinenoexcept |
Definition at line 115 of file CStringListI.H.
Referenced by Foam::operator<<().
|
inline |
Definition at line 127 of file CStringListI.H.
Referenced by Foam::system().
|
inline |
Definition at line 133 of file CStringListI.H.
|
inline |
Definition at line 121 of file CStringListI.H.
|
inline |
Definition at line 139 of file CStringListI.H.
|
inline |
Definition at line 91 of file CStringListI.H.
|
inline |
Definition at line 146 of file CStringListI.H.
References Foam::input().
Referenced by CStringList::CStringList().
|
inline |
Definition at line 153 of file CStringListI.H.
References Foam::input().
|
static |
|
inlinestatic |
|
inline |
Definition at line 161 of file CStringListI.H.
Foam::List<StringType> asList | ( | int | argc, |
const char *const | argv[] | ||
) |
Definition at line 69 of file CStringListTemplates.C.
Foam::List<StringType> asList | ( | const char *const | argv[] | ) |
Definition at line 84 of file CStringListTemplates.C.
References Foam::BitOps::count().
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.