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) override
 
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...
 
- Public Member Functions inherited from vtkObject
 vtkBaseTypeMacro (vtkObject, vtkObjectBase)
 
virtual void DebugOn ()
 
virtual void DebugOff ()
 
bool GetDebug ()
 
void SetDebug (bool debugFlag)
 
virtual void Modified ()
 
virtual vtkMTimeType GetMTime ()
 
void RemoveObserver (unsigned long tag)
 
void RemoveObservers (unsigned long event)
 
void RemoveObservers (const char *event)
 
void RemoveAllObservers ()
 
int HasObserver (unsigned long event)
 
int HasObserver (const char *event)
 
int InvokeEvent (unsigned long event)
 
int InvokeEvent (const char *event)
 
unsigned long AddObserver (unsigned long event, vtkCommand *, float priority=0.0f)
 
unsigned long AddObserver (const char *event, vtkCommand *, float priority=0.0f)
 
vtkCommandGetCommand (unsigned long tag)
 
void RemoveObserver (vtkCommand *)
 
void RemoveObservers (unsigned long event, vtkCommand *)
 
void RemoveObservers (const char *event, vtkCommand *)
 
int HasObserver (unsigned long event, vtkCommand *)
 
int HasObserver (const char *event, vtkCommand *)
 
unsigned long AddObserver (unsigned long event, U observer, void(T::*callback)(), float priority=0.0f)
 
unsigned long AddObserver (unsigned long event, U observer, void(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f)
 
unsigned long AddObserver (unsigned long event, U observer, bool(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f)
 
int InvokeEvent (unsigned long event, void *callData)
 
int InvokeEvent (const char *event, void *callData)
 
unsigned long AddObserver (unsigned long event, vtkCommand *, float priority=0.0f)
 
unsigned long AddObserver (const char *event, vtkCommand *, float priority=0.0f)
 
vtkCommandGetCommand (unsigned long tag)
 
void RemoveObserver (vtkCommand *)
 
void RemoveObservers (unsigned long event, vtkCommand *)
 
void RemoveObservers (const char *event, vtkCommand *)
 
int HasObserver (unsigned long event, vtkCommand *)
 
int HasObserver (const char *event, vtkCommand *)
 
unsigned long AddObserver (unsigned long event, U observer, void(T::*callback)(), float priority=0.0f)
 
unsigned long AddObserver (unsigned long event, U observer, void(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f)
 
unsigned long AddObserver (unsigned long event, U observer, bool(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f)
 
int InvokeEvent (unsigned long event, void *callData)
 
int InvokeEvent (const char *event, void *callData)
 
- Public Member Functions inherited from vtkObjectBase
const char * GetClassName () const
 
virtual void Delete ()
 
virtual void FastDelete ()
 
void Print (ostream &os)
 
virtual void Register (vtkObjectBase *o)
 
virtual void UnRegister (vtkObjectBase *o)
 
void SetReferenceCount (int)
 
virtual void PrintHeader (ostream &os, vtkIndent indent)
 
virtual void PrintTrailer (ostream &os, vtkIndent indent)
 
int GetReferenceCount ()
 
void PrintRevisions (ostream &)
 
virtual void PrintHeader (ostream &os, vtkIndent indent)
 
virtual void PrintTrailer (ostream &os, vtkIndent indent)
 
int GetReferenceCount ()
 
void PrintRevisions (ostream &)
 

Static Public Member Functions

static vtkCommandOptionsNew ()
 
static int IsTypeOf (const char *type)
 
static vtkCommandOptionsSafeDownCast (vtkObject *o)
 
- Static Public Member Functions inherited from vtkObject
static vtkObjectNew ()
 
static void BreakOnError ()
 
static void SetGlobalWarningDisplay (int val)
 
static void GlobalWarningDisplayOn ()
 
static void GlobalWarningDisplayOff ()
 
static int GetGlobalWarningDisplay ()
 
static void SetGlobalWarningDisplay (int val)
 
static void GlobalWarningDisplayOn ()
 
static void GlobalWarningDisplayOff ()
 
static int GetGlobalWarningDisplay ()
 
- Static Public Member Functions inherited from vtkObjectBase
static vtkTypeBool IsTypeOf (const char *name)
 
static vtkObjectBaseNew ()
 
static vtkObjectBaseNew ()
 

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...
 
 ~vtkCommandOptions () override
 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 Member Functions inherited from vtkObject
 vtkObject ()
 
virtual ~vtkObject ()
 
void RegisterInternal (vtkObjectBase *, vtkTypeBool check) VTK_OVERRIDE
 
void UnRegisterInternal (vtkObjectBase *, vtkTypeBool check) VTK_OVERRIDE
 
void InternalGrabFocus (vtkCommand *mouseEvents, vtkCommand *keypressEvents=NULL)
 
void InternalReleaseFocus ()
 
void InternalGrabFocus (vtkCommand *mouseEvents, vtkCommand *keypressEvents=NULL)
 
void InternalReleaseFocus ()
 
- Protected Member Functions inherited from vtkObjectBase
 vtkObjectBase ()
 
virtual ~vtkObjectBase ()
 
virtual void CollectRevisions (ostream &)
 
virtual void ReportReferences (vtkGarbageCollector *)
 
 vtkObjectBase (const vtkObjectBase &)
 
void operator= (const vtkObjectBase &)
 

Protected Attributes

vtkCommandOptionsXMLParserXMLParser
 
- Protected Attributes inherited from vtkObject
bool Debug
 
vtkTimeStamp MTime
 
vtkSubjectHelper * SubjectHelper
 
- Protected Attributes inherited from vtkObjectBase
vtkAtomicInt32 ReferenceCount
 
vtkWeakPointerBase ** WeakPointers
 

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.

Deprecated:
in ParaView 5.12.0. See vtkCLIOptions instead. See https://gitlab.kitware.com/paraview/paraview/-/merge_requests/4951 for developer guidelines.

Definition at line 27 of file vtkCommandOptions.h.

Member Typedef Documentation

◆ Superclass

Definition at line 32 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 112 of file vtkCommandOptions.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
EVERYBODY 
XMLONLY 

Definition at line 38 of file vtkCommandOptions.h.

Constructor & Destructor Documentation

◆ vtkCommandOptions()

vtkCommandOptions::vtkCommandOptions ( )
protected

Default constructor.

◆ ~vtkCommandOptions()

vtkCommandOptions::~vtkCommandOptions ( )
overrideprotected

Destructor.

Member Function Documentation

◆ New()

static vtkCommandOptions* vtkCommandOptions::New ( )
static

◆ GetClassName()

virtual const char* vtkCommandOptions::GetClassName ( )
virtual

Reimplemented in vtkPVOptions.

◆ IsTypeOf()

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

◆ IsA()

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

Reimplemented from vtkObjectBase.

Reimplemented in vtkPVOptions.

◆ SafeDownCast()

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

◆ PrintSelf()

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

Reimplemented from vtkObject.

◆ 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 58 of file vtkCommandOptions.h.

◆ SetProcessType()

void vtkCommandOptions::SetProcessType ( int  p)
inline

Definition at line 59 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.

Definition at line 96 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.

◆ PostProcess()

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

After parsing, process extra option dependencies.

◆ 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.

◆ 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.

◆ 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 178 of file vtkCommandOptions.h.


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