ParaView
Public Types | Public Member Functions | Static Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | List of all members
vtkCommandOptions Class Reference

ParaView options storage. More...

#include <vtkCommandOptions.h>

Inheritance diagram for vtkCommandOptions:
Inheritance graph
[legend]
Collaboration diagram for vtkCommandOptions:
Collaboration graph
[legend]

Public Types

enum  { EVERYBODY = 0, XMLONLY = 0x1 }
 
typedef vtkObject Superclass
 

Public Member Functions

virtual const char * GetClassName ()
 
virtual int IsA (const char *type)
 
void PrintSelf (ostream &os, vtkIndent indent)
 
int Parse (int argc, const char *const argv[])
 
void GetRemainingArguments (int *argc, char **argv[])
 
const char * GetHelp ()
 
int GetProcessType ()
 Set/Get the type of the process for this set of options. More...
 
void SetProcessType (int p)
 
const char * GetArgv0 ()
 Get argv[0]. More...
 
int GetLastArgument ()
 Get the index of the last argument parsed. More...
 
virtual int ParseExtraXMLTag (const char *, const char **)
 Pass in the name and the attributes for all tags that are not Options. More...
 
virtual int GetHelpSelected ()
 Was help selected? More...
 
virtual void SetHelpSelected (int)
 Was help selected? More...
 
virtual char * GetUnknownArgument ()
 In case of unknown argument, set this variable with the unknown argument. More...
 
virtual char * GetErrorMessage ()
 Get the error message if Parse returned 0. More...
 
virtual char * GetApplicationPath ()
 Get full path of executable (based on Argv0) More...
 

Static Public Member Functions

static vtkCommandOptionsNew ()
 
static int IsTypeOf (const char *type)
 
static vtkCommandOptionsSafeDownCast (vtkObject *o)
 

Protected Types

typedef int(* CallbackType) (const char *argument, const char *value, void *call_data)
 Prototype for callbacks. More...
 

Protected Member Functions

 vtkCommandOptions ()
 Default constructor. More...
 
virtual ~vtkCommandOptions ()
 Destructor. More...
 
void AddCallback (const char *longarg, const char *shortarg, CallbackType callback, void *call_data, const char *help, int type=EVERYBODY)
 
virtual void Initialize ()
 Initialize arguments. More...
 
virtual int PostProcess (int argc, const char *const *argv)
 After parsing, process extra option dependencies. More...
 
virtual int WrongArgument (const char *argument)
 This method is called when wrong argument is found. More...
 
virtual int DeprecatedArgument (const char *argument)
 This method is called when a deprecated argument is found. More...
 
int LoadXMLConfigFile (const char *)
 This method loads the paraview config file. More...
 
virtual void SetUnknownArgument (const char *)
 
virtual void SetErrorMessage (const char *)
 
virtual void SetXMLConfigFile (const char *)
 
void CleanArgcArgv ()
 
virtual void SetApplicationPath (const char *)
 
void ComputeApplicationPath ()
 
void AddBooleanArgument (const char *longarg, const char *shortarg, int *var, const char *help, int type=EVERYBODY)
 Add a command line option. More...
 
void AddDeprecatedArgument (const char *longarg, const char *shortarg, const char *help, int type=EVERYBODY)
 Add a command line option. More...
 
void AddArgument (const char *longarg, const char *shortarg, int *var, const char *help, int type=EVERYBODY)
 Add a command line option. More...
 
void AddArgument (const char *longarg, const char *shortarg, char **var, const char *help, int type=EVERYBODY)
 Add a command line option. More...
 

Protected Attributes

vtkCommandOptionsXMLParserXMLParser
 

Detailed Description

ParaView options storage.

An object of this class represents a storage for ParaView options

These options can be retrieved during run-time, set using configuration file or using Command Line Arguments.

Definition at line 34 of file vtkCommandOptions.h.

Member Typedef Documentation

◆ Superclass

typedef vtkObject vtkCommandOptions::Superclass

Definition at line 38 of file vtkCommandOptions.h.

◆ CallbackType

typedef int(* vtkCommandOptions::CallbackType) (const char *argument, const char *value, void *call_data)
protected

Prototype for callbacks.

Definition at line 118 of file vtkCommandOptions.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
EVERYBODY 
XMLONLY 

Definition at line 44 of file vtkCommandOptions.h.

Constructor & Destructor Documentation

◆ vtkCommandOptions()

vtkCommandOptions::vtkCommandOptions ( )
protected

Default constructor.

◆ ~vtkCommandOptions()

virtual vtkCommandOptions::~vtkCommandOptions ( )
protectedvirtual

Destructor.

Member Function Documentation

◆ New()

static vtkCommandOptions* vtkCommandOptions::New ( )
static

◆ GetClassName()

virtual const char* vtkCommandOptions::GetClassName ( )
virtual

◆ IsTypeOf()

static int vtkCommandOptions::IsTypeOf ( const char *  type)
static

◆ IsA()

virtual int vtkCommandOptions::IsA ( const char *  type)
virtual

◆ SafeDownCast()

static vtkCommandOptions* vtkCommandOptions::SafeDownCast ( vtkObject *  o)
static

◆ PrintSelf()

void vtkCommandOptions::PrintSelf ( ostream &  os,
vtkIndent  indent 
)

◆ Parse()

int vtkCommandOptions::Parse ( int  argc,
const char *const  argv[] 
)

◆ GetRemainingArguments()

void vtkCommandOptions::GetRemainingArguments ( int *  argc,
char **  argv[] 
)

◆ GetHelp()

const char* vtkCommandOptions::GetHelp ( )

◆ GetHelpSelected()

virtual int vtkCommandOptions::GetHelpSelected ( )
virtual

Was help selected?

◆ SetHelpSelected()

virtual void vtkCommandOptions::SetHelpSelected ( int  )
virtual

Was help selected?

◆ GetProcessType()

int vtkCommandOptions::GetProcessType ( )
inline

Set/Get the type of the process for this set of options.

data-server, render-server, combined-server or client.

Definition at line 64 of file vtkCommandOptions.h.

◆ SetProcessType()

void vtkCommandOptions::SetProcessType ( int  p)
inline

Definition at line 65 of file vtkCommandOptions.h.

◆ GetUnknownArgument()

virtual char* vtkCommandOptions::GetUnknownArgument ( )
virtual

In case of unknown argument, set this variable with the unknown argument.

◆ GetErrorMessage()

virtual char* vtkCommandOptions::GetErrorMessage ( )
virtual

Get the error message if Parse returned 0.

◆ GetArgv0()

const char* vtkCommandOptions::GetArgv0 ( )

Get argv[0].

◆ GetApplicationPath()

virtual char* vtkCommandOptions::GetApplicationPath ( )
virtual

Get full path of executable (based on Argv0)

◆ GetLastArgument()

int vtkCommandOptions::GetLastArgument ( )

Get the index of the last argument parsed.

◆ ParseExtraXMLTag()

virtual int vtkCommandOptions::ParseExtraXMLTag ( const char *  ,
const char **   
)
inlinevirtual

Pass in the name and the attributes for all tags that are not Options.

If it returns 1, then it is successful, and 0 if it failed.

Reimplemented in vtkPVServerOptions.

Definition at line 102 of file vtkCommandOptions.h.

◆ AddBooleanArgument()

void vtkCommandOptions::AddBooleanArgument ( const char *  longarg,
const char *  shortarg,
int *  var,
const char *  help,
int  type = EVERYBODY 
)
protected

Add a command line option.

For each argument added there is a long version –long and a short version -l, a help string, and a variable that is set to the value of the option. The types can be int, char*, or boolean (set to 1 of option is present). Also deprecated arguments can be added with only a help string. The help string should say that the argument is deprecated and suggest the alternative argument to use. Each option can specify in a bit flag int the processes that the option is valid for, the default is to be valid for all paraview processes.

◆ AddDeprecatedArgument()

void vtkCommandOptions::AddDeprecatedArgument ( const char *  longarg,
const char *  shortarg,
const char *  help,
int  type = EVERYBODY 
)
protected

Add a command line option.

For each argument added there is a long version –long and a short version -l, a help string, and a variable that is set to the value of the option. The types can be int, char*, or boolean (set to 1 of option is present). Also deprecated arguments can be added with only a help string. The help string should say that the argument is deprecated and suggest the alternative argument to use. Each option can specify in a bit flag int the processes that the option is valid for, the default is to be valid for all paraview processes.

◆ AddArgument() [1/2]

void vtkCommandOptions::AddArgument ( const char *  longarg,
const char *  shortarg,
int *  var,
const char *  help,
int  type = EVERYBODY 
)
protected

Add a command line option.

For each argument added there is a long version –long and a short version -l, a help string, and a variable that is set to the value of the option. The types can be int, char*, or boolean (set to 1 of option is present). Also deprecated arguments can be added with only a help string. The help string should say that the argument is deprecated and suggest the alternative argument to use. Each option can specify in a bit flag int the processes that the option is valid for, the default is to be valid for all paraview processes.

◆ AddArgument() [2/2]

void vtkCommandOptions::AddArgument ( const char *  longarg,
const char *  shortarg,
char **  var,
const char *  help,
int  type = EVERYBODY 
)
protected

Add a command line option.

For each argument added there is a long version –long and a short version -l, a help string, and a variable that is set to the value of the option. The types can be int, char*, or boolean (set to 1 of option is present). Also deprecated arguments can be added with only a help string. The help string should say that the argument is deprecated and suggest the alternative argument to use. Each option can specify in a bit flag int the processes that the option is valid for, the default is to be valid for all paraview processes.

◆ AddCallback()

void vtkCommandOptions::AddCallback ( const char *  longarg,
const char *  shortarg,
CallbackType  callback,
void *  call_data,
const char *  help,
int  type = EVERYBODY 
)
protected

◆ Initialize()

virtual void vtkCommandOptions::Initialize ( )
protectedvirtual

Initialize arguments.

Reimplemented in vtkPVOptions, pqOptions, and vtkPVServerOptions.

◆ PostProcess()

virtual int vtkCommandOptions::PostProcess ( int  argc,
const char *const *  argv 
)
protectedvirtual

After parsing, process extra option dependencies.

Reimplemented in vtkPVOptions, pqOptions, and vtkPVPythonOptions.

◆ WrongArgument()

virtual int vtkCommandOptions::WrongArgument ( const char *  argument)
protectedvirtual

This method is called when wrong argument is found.

If it returns 0, then the parsing will fail.

Reimplemented in vtkPVOptions, pqOptions, and vtkPVPythonOptions.

◆ DeprecatedArgument()

virtual int vtkCommandOptions::DeprecatedArgument ( const char *  argument)
protectedvirtual

This method is called when a deprecated argument is found.

If it returns 0, then the parsing will fail.

Reimplemented in vtkPVOptions.

◆ LoadXMLConfigFile()

int vtkCommandOptions::LoadXMLConfigFile ( const char *  )
protected

This method loads the paraview config file.

The command line will override any of the values in this file, but all options can be in the file.

◆ SetUnknownArgument()

virtual void vtkCommandOptions::SetUnknownArgument ( const char *  )
protectedvirtual

◆ SetErrorMessage()

virtual void vtkCommandOptions::SetErrorMessage ( const char *  )
protectedvirtual

◆ SetXMLConfigFile()

virtual void vtkCommandOptions::SetXMLConfigFile ( const char *  )
protectedvirtual

◆ CleanArgcArgv()

void vtkCommandOptions::CleanArgcArgv ( )
protected

◆ SetApplicationPath()

virtual void vtkCommandOptions::SetApplicationPath ( const char *  )
protectedvirtual

◆ ComputeApplicationPath()

void vtkCommandOptions::ComputeApplicationPath ( )
protected

Member Data Documentation

◆ XMLParser

vtkCommandOptionsXMLParser* vtkCommandOptions::XMLParser
protected

Definition at line 185 of file vtkCommandOptions.h.


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