SASC-NG
DVBSoftCAM

cOptStr Class Reference

#include <opts.h>

Inheritance diagram for cOptStr:

List of all members.

Public Member Functions

 cOptStr (const char *Name, const char *Title, char *Storage, int Size, const char *Allowed)
virtual ~cOptStr ()
virtual void Parse (const char *Value)
virtual void Backup (void)
virtual bool Set (void)
virtual void Store (const char *PreStr)
virtual void Create (cOsdMenu *menu)

Protected Attributes

char * storage
char * value
const char * allowed
int size

Detailed Description

Definition at line 87 of file opts.h.


Constructor & Destructor Documentation

cOptStr::cOptStr ( const char *  Name,
const char *  Title,
char *  Storage,
int  Size,
const char *  Allowed 
)

Definition at line 347 of file sc.c.

References allowed, MALLOC, size, storage, and value.

:cOpt(Name,Title)
{
  storage=Storage; size=Size; allowed=Allowed;
  value=MALLOC(char,size);
}
cOptStr::~cOptStr ( ) [virtual]

Definition at line 354 of file sc.c.

References free, and value.

{
  free(value);
}

Member Function Documentation

void cOptStr::Backup ( void  ) [virtual]

Implements cOpt.

Definition at line 364 of file sc.c.

References size, storage, strn0cpy(), and value.

void cOptStr::Create ( cOsdMenu *  menu) [virtual]

Implements cOpt.

Definition at line 380 of file sc.c.

References cOsdMenu::Add(), allowed, size, cOpt::title, tr, and value.

void cOptStr::Parse ( const char *  Value) [virtual]

Implements cOpt.

Definition at line 359 of file sc.c.

References size, storage, and strn0cpy().

{
  strn0cpy(storage,Value,size);
}
bool cOptStr::Set ( void  ) [virtual]

Implements cOpt.

Definition at line 369 of file sc.c.

References size, storage, strn0cpy(), and value.

{
  if(strcmp(value,storage)) { strn0cpy(storage,value,size); return true; }
  return false;
}
void cOptStr::Store ( const char *  PreStr) [virtual]

Implements cOpt.

Definition at line 375 of file sc.c.

References cOpt::FullName(), cPlugin::SetupStore(), and storage.


Member Data Documentation

const char* cOptStr::allowed [protected]

Definition at line 90 of file opts.h.

Referenced by cOptStr(), and Create().

int cOptStr::size [protected]

Definition at line 91 of file opts.h.

Referenced by Backup(), cOptStr(), Create(), Parse(), and Set().

char* cOptStr::storage [protected]

Definition at line 89 of file opts.h.

Referenced by Backup(), cOptStr(), Parse(), Set(), and Store().

char * cOptStr::value [protected]

Definition at line 89 of file opts.h.

Referenced by Backup(), cOptStr(), Create(), Set(), and ~cOptStr().


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines