Cobalt Framework  beta
Console application support
Classes | Functions
CBCommandLine.h File Reference

Define CBCommandLine class. More...

#include <Coconut/Coconut.h>
#include "CBForwarders.h"

Go to the source code of this file.

Classes

struct  CBCommandLine
 Information of parsed command line. More...

Functions

struct CBCommandLineCBAllocateCommandLine (const char *appname, struct CNResource *resource)
 Allocate command line information.
static void CBReleaseCommandLine (struct CBCommandLine *dst)
 Release command line info.
static const char * CBApplicationNameInCommandLine (const struct CBCommandLine *src)
 Get application name from the command line.
void CBAddOptionToCommandLine (struct CBCommandLine *dst, struct CBOption *src)
 Add option to command line info.
static struct CNListItem * CBFirstOptionInCommandLine (const struct CBCommandLine *src)
 Get 1st item in the option list.
void CBAddArgumentToCommandLine (struct CBCommandLine *dst, struct CNString *src)
 Add argument to command line info.
static struct CNListItem * CBFirstArgumentInCommandLine (const struct CBCommandLine *src)
 Get 1st item in the argument list.

Detailed Description

Define CBCommandLine class.

Copyright
Copyright (C) 2012 Steel Wheels Project

Function Documentation

void CBAddArgumentToCommandLine ( struct CBCommandLine dst,
struct CNString *  src 
)

Add argument to command line info.

Parameters:
dstDestination command line info
srcArgument to be added
void CBAddOptionToCommandLine ( struct CBCommandLine dst,
struct CBOption src 
)

Add option to command line info.

Parameters:
dstDestination command line info
srcOption to be added
struct CBCommandLine* CBAllocateCommandLine ( const char *  appname,
struct CNResource *  resource 
) [read]

Allocate command line information.

Returns:
Allocated command line
Parameters:
appnameName of application
resourceResource to allocate command line information
static const char* CBApplicationNameInCommandLine ( const struct CBCommandLine src) [inline, static]

Get application name from the command line.

Returns:
Application name
Parameters:
srcSource command line
static struct CNListItem* CBFirstArgumentInCommandLine ( const struct CBCommandLine src) [static, read]

Get 1st item in the argument list.

Return values:
item1st item in the argument list
NULLThere are no item in the argument list
Parameters:
srcSource command line
static struct CNListItem* CBFirstOptionInCommandLine ( const struct CBCommandLine src) [static, read]

Get 1st item in the option list.

Return values:
item1st item in the option list
NULLThere are no item in the option list
Parameters:
srcSource command line
static void CBReleaseCommandLine ( struct CBCommandLine dst) [inline, static]

Release command line info.

Parameters:
dstDestination command line info
 All Classes Files Functions Variables Enumerations Enumerator Defines