Open CASCADE Technology  7.4.0
Public Member Functions | Static Public Member Functions

IFSelect_ParamEditor Class Reference

A ParamEditor gives access for edition to a list of TypedValue (i.e. of Static too) Its definition is made of the TypedValue to edit themselves, and can add some constants, which can then be displayed but not changed (for instance, system name, processor version ...) More...

#include <IFSelect_ParamEditor.hxx>

Inheritance diagram for IFSelect_ParamEditor:
Inheritance graph
[legend]

Public Member Functions

 IFSelect_ParamEditor (const Standard_Integer nbmax=100, const Standard_CString label="")
 Creates a ParamEditor, empty, with a maximum count of params (default is 100) And a label, by default it will be "Param Editor". More...
 
void AddValue (const Handle< Interface_TypedValue > &val, const Standard_CString shortname="")
 Adds a TypedValue By default, its short name equates its complete name, it can be explicited. More...
 
void AddConstantText (const Standard_CString val, const Standard_CString shortname, const Standard_CString completename="")
 Adds a Constant Text, it will be Read Only By default, its long name equates its shortname. More...
 
TCollection_AsciiString Label () const override
 Returns the specific label. More...
 
Standard_Boolean Recognize (const Handle< IFSelect_EditForm > &form) const override
 Tells if this Editor can work on this EditForm and its content (model, entity ?) More...
 
Handle< TCollection_HAsciiStringStringValue (const Handle< IFSelect_EditForm > &form, const Standard_Integer num) const override
 Returns the value of an EditForm, for a given item (if not a list. for a list, a Null String may be returned) More...
 
Standard_Boolean Load (const Handle< IFSelect_EditForm > &form, const Handle< Standard_Transient > &ent, const Handle< Interface_InterfaceModel > &model) const override
 Loads original values from some data, to an EditForm Remark: <ent> may be Null, this means all <model> is concerned Also <model> may be Null, if no context applies for <ent> And both <ent> and <model> may be Null, for a full static editor. More...
 
Standard_Boolean Apply (const Handle< IFSelect_EditForm > &form, const Handle< Standard_Transient > &ent, const Handle< Interface_InterfaceModel > &model) const override
 Applies modified values of the EditForm with some data Remark: <ent> may be Null, this means all <model> is concerned Also <model> may be Null, if no context applies for <ent> And both <ent> and <model> may be Null, for a full static editor. More...
 
- Public Member Functions inherited from IFSelect_Editor
void SetValue (const Standard_Integer num, const Handle< Interface_TypedValue > &typval, const Standard_CString shortname="", const IFSelect_EditValue accessmode=IFSelect_Editable)
 Sets a Typed Value for a given ident and short name, with an Edit Mode. More...
 
void SetList (const Standard_Integer num, const Standard_Integer max=0)
 Sets a parameter to be a List max < 0 : not for a list (set when starting) max = 0 : list with no length limit (default for SetList) max > 0 : list limited to <max> items. More...
 
Standard_Integer NbValues () const
 Returns the count of Typed Values. More...
 
Handle< Interface_TypedValueTypedValue (const Standard_Integer num) const
 Returns a Typed Value from its ident. More...
 
Standard_Boolean IsList (const Standard_Integer num) const
 Tells if a parameter is a list. More...
 
Standard_Integer MaxList (const Standard_Integer num) const
 Returns max length allowed for a list = 0 means : list with no limit < 0 means : not a list. More...
 
Standard_CString Name (const Standard_Integer num, const Standard_Boolean isshort=Standard_False) const
 Returns the name of a Value (complete or short) from its ident Short Name can be empty. More...
 
IFSelect_EditValue EditMode (const Standard_Integer num) const
 Returns the edit mode of a Value. More...
 
Standard_Integer NameNumber (const Standard_CString name) const
 Returns the number (ident) of a Value, from its name, short or complete. If not found, returns 0. More...
 
void PrintNames (const Handle< Message_Messenger > &S) const
 
void PrintDefs (const Handle< Message_Messenger > &S, const Standard_Boolean labels=Standard_False) const
 
Standard_Integer MaxNameLength (const Standard_Integer what) const
 Returns the MaxLength of, according to what : <what> = -1 : length of short names <what> = 0 : length of complete names <what> = 1 : length of values labels. More...
 
virtual Handle< IFSelect_EditFormForm (const Standard_Boolean readonly, const Standard_Boolean undoable=Standard_True) const
 Builds and Returns an EditForm, empty (no data yet) Can be redefined to return a specific type of EditForm. More...
 
virtual Handle< IFSelect_ListEditorListEditor (const Standard_Integer num) const
 Returns a ListEditor for a parameter which is a List Default returns a basic ListEditor for a List, a Null Handle if <num> is not for a List. Can be redefined. More...
 
virtual Handle< TColStd_HSequenceOfHAsciiString > ListValue (const Handle< IFSelect_EditForm > &form, const Standard_Integer num) const
 Returns the value of an EditForm as a List, for a given item If not a list, a Null Handle should be returned Default returns a Null Handle, because many Editors have no list to edit. To be redefined as required. More...
 
virtual Standard_Boolean Update (const Handle< IFSelect_EditForm > &form, const Standard_Integer num, const Handle< TCollection_HAsciiString > &newval, const Standard_Boolean enforce) const
 Updates the EditForm when a parameter is modified I.E. default does nothing, can be redefined, as follows : Returns True when done (even if does nothing), False in case of refuse (for instance, if the new value is not suitable) <num> is the rank of the parameter for the EDITOR itself <enforce> True means that protected parameters can be touched. More...
 
virtual Standard_Boolean UpdateList (const Handle< IFSelect_EditForm > &form, const Standard_Integer num, const Handle< TColStd_HSequenceOfHAsciiString > &newlist, const Standard_Boolean enforce) const
 Acts as Update, but when the value is a list. More...
 
- Public Member Functions inherited from Standard_Transient
 Standard_Transient ()
 Empty constructor. More...
 
 Standard_Transient (const Standard_Transient &)
 Copy constructor – does nothing. More...
 
Standard_Transientoperator= (const Standard_Transient &)
 Assignment operator, needed to avoid copying reference counter. More...
 
virtual ~Standard_Transient ()
 Destructor must be virtual. More...
 
virtual void Delete () const
 Memory deallocator for transient classes. More...
 
virtual const opencascade::handle< Standard_Type > & DynamicType () const
 Returns a type descriptor about this object. More...
 
Standard_Boolean IsInstance (const opencascade::handle< Standard_Type > &theType) const
 Returns a true value if this is an instance of Type. More...
 
Standard_Boolean IsInstance (const Standard_CString theTypeName) const
 Returns a true value if this is an instance of TypeName. More...
 
Standard_Boolean IsKind (const opencascade::handle< Standard_Type > &theType) const
 Returns true if this is an instance of Type or an instance of any class that inherits from Type. Note that multiple inheritance is not supported by OCCT RTTI mechanism. More...
 
Standard_Boolean IsKind (const Standard_CString theTypeName) const
 Returns true if this is an instance of TypeName or an instance of any class that inherits from TypeName. Note that multiple inheritance is not supported by OCCT RTTI mechanism. More...
 
Standard_TransientThis () const
 Returns non-const pointer to this object (like const_cast). For protection against creating handle to objects allocated in stack or call from constructor, it will raise exception Standard_ProgramError if reference counter is zero. More...
 
Standard_Integer GetRefCount () const
 Get the reference counter of this object. More...
 
void IncrementRefCounter () const
 Increments the reference counter of this object. More...
 
Standard_Integer DecrementRefCounter () const
 Decrements the reference counter of this object; returns the decremented value. More...
 

Static Public Member Functions

static Handle< IFSelect_ParamEditorStaticEditor (const Handle< TColStd_HSequenceOfHAsciiString > &list, const Standard_CString label="")
 Returns a ParamEditor to work on the Static Parameters of which names are listed in

Handle if

null or empty. More...

 
- Static Public Member Functions inherited from Standard_Transient
static const char * get_type_name ()
 Returns a type descriptor about this object. More...
 
static const opencascade::handle< Standard_Type > & get_type_descriptor ()
 Returns type descriptor of Standard_Transient class. More...
 

Additional Inherited Members

- Public Types inherited from Standard_Transient
typedef void base_type
 Returns a type descriptor about this object. More...
 
- Protected Member Functions inherited from IFSelect_Editor
 IFSelect_Editor (const Standard_Integer nbval)
 Prepares the list of Typed Values (gives its count) This count can be tuned later, to a LOWER value, this allows to initialize with a "maximum reservation" then cut the extra. More...
 
void SetNbValues (const Standard_Integer nbval)
 Adjusts the true count of values. It can be LOWER or equal to the initial size (which then acts as a reservation), but never greater. More...
 

Detailed Description

A ParamEditor gives access for edition to a list of TypedValue (i.e. of Static too) Its definition is made of the TypedValue to edit themselves, and can add some constants, which can then be displayed but not changed (for instance, system name, processor version ...)

I.E. it gives a way of editing or at least displaying parameters as global

Constructor & Destructor Documentation

◆ IFSelect_ParamEditor()

IFSelect_ParamEditor::IFSelect_ParamEditor ( const Standard_Integer  nbmax = 100,
const Standard_CString  label = "" 
)

Creates a ParamEditor, empty, with a maximum count of params (default is 100) And a label, by default it will be "Param Editor".

Member Function Documentation

◆ AddConstantText()

void IFSelect_ParamEditor::AddConstantText ( const Standard_CString  val,
const Standard_CString  shortname,
const Standard_CString  completename = "" 
)

Adds a Constant Text, it will be Read Only By default, its long name equates its shortname.

◆ AddValue()

void IFSelect_ParamEditor::AddValue ( const Handle< Interface_TypedValue > &  val,
const Standard_CString  shortname = "" 
)

Adds a TypedValue By default, its short name equates its complete name, it can be explicited.

◆ Apply()

Standard_Boolean IFSelect_ParamEditor::Apply ( const Handle< IFSelect_EditForm > &  form,
const Handle< Standard_Transient > &  ent,
const Handle< Interface_InterfaceModel > &  model 
) const
overridevirtual

Applies modified values of the EditForm with some data Remark: <ent> may be Null, this means all <model> is concerned Also <model> may be Null, if no context applies for <ent> And both <ent> and <model> may be Null, for a full static editor.

Implements IFSelect_Editor.

◆ Label()

TCollection_AsciiString IFSelect_ParamEditor::Label ( ) const
overridevirtual

Returns the specific label.

Implements IFSelect_Editor.

◆ Load()

Standard_Boolean IFSelect_ParamEditor::Load ( const Handle< IFSelect_EditForm > &  form,
const Handle< Standard_Transient > &  ent,
const Handle< Interface_InterfaceModel > &  model 
) const
overridevirtual

Loads original values from some data, to an EditForm Remark: <ent> may be Null, this means all <model> is concerned Also <model> may be Null, if no context applies for <ent> And both <ent> and <model> may be Null, for a full static editor.

Implements IFSelect_Editor.

◆ Recognize()

Standard_Boolean IFSelect_ParamEditor::Recognize ( const Handle< IFSelect_EditForm > &  form) const
overridevirtual

Tells if this Editor can work on this EditForm and its content (model, entity ?)

Implements IFSelect_Editor.

◆ StaticEditor()

static Handle< IFSelect_ParamEditor > IFSelect_ParamEditor::StaticEditor ( const Handle< TColStd_HSequenceOfHAsciiString > &  list,
const Standard_CString  label = "" 
)
static

Returns a ParamEditor to work on the Static Parameters of which names are listed in

Handle if

null or empty.

◆ StringValue()

Handle< TCollection_HAsciiString > IFSelect_ParamEditor::StringValue ( const Handle< IFSelect_EditForm > &  form,
const Standard_Integer  num 
) const
overridevirtual

Returns the value of an EditForm, for a given item (if not a list. for a list, a Null String may be returned)

Implements IFSelect_Editor.


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