BCommand Class Reference

#include <app/BCommand.h>

Inheritance diagram for BCommand:

BnCommand ICommand BBinder IInterface IBinder SAtom SAtom BUnixCommand List of all members.

Public Member Functions

FILE * __sF (int which) const
virtual void AddCommand (const SString &name, const sptr< ICommand > &command)
sptr< IBinderArgToBinder (const SValue &arg) const
 Given an argument value, convert it to an object.
SString ArgToPath (const SValue &arg) const
 Given an argument value, convert it to an absolute path.
 BCommand (const SContext &context)
 BCommand ()
virtual sptr< IByteOutputByteError () const
virtual sptr< IByteInputByteInput () const
virtual sptr< IByteOutputByteOutput () const
virtual sptr< ICommandClone () const
SString CurDir () const
int32_t CurrentPropertySequence () const
virtual SString Documentation () const
 Retrieve a short description of the command.
virtual SValue Environment () const
bool GetColorFlag () const
virtual sptr< ICommandGetCommand (const SString &name) const
bool GetEchoFlag () const
const char * getenv (const char *key) const
virtual SValue GetProperty (const SValue &key) const
bool GetTraceFlag () const
int putenv (const char *string)
virtual void RemoveCommand (const SString &name)
virtual void RemoveProperty (const SValue &key)
virtual SValue Run (const ArgList &args)=0
virtual void SetByteError (const sptr< IByteOutput > &error)
virtual void SetByteInput (const sptr< IByteInput > &input)
virtual void SetByteOutput (const sptr< IByteOutput > &output)
int setenv (const char *name, const char *value, int rewrite)
virtual void SetEnvironment (const SValue &env)
virtual void SetFileDescriptors (const SValue &fds)
virtual void SetProperty (const SValue &key, const SValue &value)
virtual sptr< ICommandSpawn (const SString &command) const
sptr< ICommandSpawnCustom (const SString &command, const SContext &context, const sptr< IProcess > &team) const
int system (const char *cmd)
sptr< ITextOutputTextError ()
sptr< ITextInputTextInput ()
sptr< ITextOutputTextOutput ()
void unsetenv (const char *name)

Protected Member Functions

virtual ~BCommand ()

Constructor & Destructor Documentation

BCommand  ) 
 

BCommand const SContext context  ) 
 

~BCommand  )  [protected, virtual]
 


Member Function Documentation

FILE * __sF int  which  )  const
 

void AddCommand const SString name,
const sptr< ICommand > &  command
[virtual]
 

Implements ICommand.

sptr< IBinder > ArgToBinder const SValue arg  )  const
 

Given an argument value, convert it to an object.

If the SValue contains an object, the binder is returned directly. Otherwise, if it is a string, this is taken as a path and looked up in the context.

SString ArgToPath const SValue arg  )  const
 

Given an argument value, convert it to an absolute path.

If the SValue contains a string, it is appended to the PWD and returned. Otherwise, "" is returned.

sptr< IByteOutput > ByteError  )  const [virtual]
 

Implements ICommand.

sptr< IByteInput > ByteInput  )  const [virtual]
 

Implements ICommand.

sptr< IByteOutput > ByteOutput  )  const [virtual]
 

Implements ICommand.

sptr< ICommand > Clone  )  const [virtual]
 

SString CurDir  )  const
 

int32_t CurrentPropertySequence  )  const
 

SString Documentation  )  const [virtual]
 

Retrieve a short description of the command.

(Here's one we stole from Python.) Every command may optionally have a documentation property. This can be retrieved at runtime to provide detailed help on any command. Shell users everywhere rejoice!

Implements ICommand.

SValue Environment  )  const [virtual]
 

Implements ICommand.

bool GetColorFlag  )  const
 

sptr< ICommand > GetCommand const SString name  )  const [virtual]
 

Implements ICommand.

bool GetEchoFlag  )  const
 

const char * getenv const char *  key  )  const
 

SValue GetProperty const SValue key  )  const [virtual]
 

Implements ICommand.

bool GetTraceFlag  )  const
 

int putenv const char *  string  ) 
 

void RemoveCommand const SString name  )  [virtual]
 

Implements ICommand.

void RemoveProperty const SValue key  )  [virtual]
 

Implements ICommand.

virtual SValue Run const ArgList args  )  [pure virtual]
 

Implemented in BUnixCommand.

void SetByteError const sptr< IByteOutput > &  error  )  [virtual]
 

Implements ICommand.

void SetByteInput const sptr< IByteInput > &  input  )  [virtual]
 

Implements ICommand.

void SetByteOutput const sptr< IByteOutput > &  output  )  [virtual]
 

Implements ICommand.

int setenv const char *  name,
const char *  value,
int  rewrite
 

void SetEnvironment const SValue env  )  [virtual]
 

Implements ICommand.

void SetFileDescriptors const SValue fds  )  [virtual]
 

Implements ICommand.

void SetProperty const SValue key,
const SValue value
[virtual]
 

Implements ICommand.

sptr< ICommand > Spawn const SString command  )  const [virtual]
 

Implements ICommand.

sptr< ICommand > SpawnCustom const SString command,
const SContext context,
const sptr< IProcess > &  team
const
 

int system const char *  cmd  ) 
 

sptr< ITextOutput > TextError  ) 
 

sptr< ITextInput > TextInput  ) 
 

sptr< ITextOutput > TextOutput  ) 
 

void unsetenv const char *  name  ) 
 


The documentation for this class was generated from the following files: