Main Page | Class List | File List | Class Members | File Members

copt.m File Reference

COpt class definition. More...

#include <Coconut/copt.h>
#include <stdlib.h>

Defines

#define S_ASSERT(EXP, MSG)

Functions

id initOptNoArg:longName:optDesc: (id, char, id sname,[longName] id, const char *, id lname,[optDesc] id, const char *, id odesc, id, id opt_id, id, id s_opt_id,)
id initOptHasStr:longName:optDesc:argDesc: (id, char, id sname,[longName] id, const char *, id lname,[optDesc] id, const char *, id odesc,[argDesc] id, const char *, id adesc, id, id opt_id, id, id s_opt_id,)
id initOptHasNum:longName:optDesc:argDesc: (id, char, id sname,[longName] id, const char *, id lname,[optDesc] id, const char *, id odesc,[argDesc] id, const char *, id adesc, id, id opt_id, id, id s_opt_id,)
void dealloc ()
int opt_id ()
void setGivenFlag: (id, BOOL, id flag, id, id is_given, id, id flag,)
BOOL is_given ()
COptArgType arg_type ()
NSString * long_name ()
char short_name ()
void setStrArg: (id, NSString *, id src, id, id src, id retain,)
arg_type==COPT_ARG_TYPE_STRING,
"not string arg" 
S_ASSERT ()
void setIntArg: (id, int, id src, id, arg_type==COPT_ARG_TYPE_INT,"not int arg"S_ASSERT,)
NSString * opt_desc ()
NSString * arg ()
 if (short_name!= '\0')
void print: (id, FILE *, id outfp, id, id static, id const, id char, id s_null, id, id null,)
 fprintf (outfp,"(opt(type%x)\n", arg_type)
 fprintf (outfp,"(shortname%c)(longname\"%s\")\n", short_name, lname)
 fprintf (outfp,"(desc\"%s\")(argdesc\"%s\"))\n", odesc, adesc)

Variables

 is_given = FALSE
 long_name = s_opt_make_string(lname)
 short_name = sname
 arg_type = COPT_ARG_TYPE_NONE
 opt_desc = s_opt_make_string(odesc)
 arg_desc = nil
 return [super init]
arg_data str_arg = nil
arg_data int_arg = 0
char buf [256]
size_t pos
const char * lname = long_name ? [long_name cString] : s_null
const char * adesc = arg_desc ? [arg_desc cString] : s_null
const char * odesc = opt_desc ? [opt_desc cString] : s_null


Detailed Description

COpt class definition.

Date:
2004.02.14
Author:
Steel Wheels Project
Copyright
Copyright (C) 2004 Steel Wheels Project. All right reserved.
Description
COpt class definition. COpt class contains information for command line option and it's argument.

Define Documentation

#define S_ASSERT EXP,
MSG   ) 
 

Value:

if(!(EXP)){ \
                fprintf(stderr, "%s at line %d: %s\n",__FILE__,__LINE__,MSG) ; \
        }


Generated on Wed Jul 14 18:34:59 2004 for Coconut by doxygen 1.3.6