OpendTect-6_4  6.4
datainpspec.h
Go to the documentation of this file.
1 #ifndef datainpspec_h
2 #define datainpspec_h
3 
4 /*+
5 ________________________________________________________________________
6 
7  (C) dGB Beheer B.V.; (LICENSE) http://opendtect.org/OpendTect_license.txt
8  Author: A.H. Lammertink
9  Date: 08/02/2001
10  RCS: $Id$
11 ________________________________________________________________________
12 
13 -*/
14 
15 #include "generalmod.h"
16 #include "ranges.h"
17 #include "string2.h"
18 #include "undefval.h"
19 #include "bufstringset.h"
20 #include "position.h"
21 #include "typeset.h"
22 #include "keystrs.h"
23 #include "uistrings.h"
24 
25 class EnumDef;
26 
32 { mODTextTranslationClass(DataType)
33 public:
34 
35  enum Rep { intTp, floatTp, doubleTp, boolTp, stringTp };
36  enum Form { normal, interval, filename, position, list };
37 
38  DataType( Rep tp, Form frm=normal )
39  : rep_( tp ), form_(frm) {}
40 
41  inline Rep rep() const { return rep_; }
42  inline Form form() const { return form_; }
43 
44  bool operator==( const DataType& oth ) const
45  { return (rep_==oth.rep_) && (form_==oth.form_); }
46  bool operator!=( const DataType& oth ) const
47  { return ! (oth == *this); }
48 
49 
50 protected:
51 
52  Rep rep_;
54 
55 };
56 
57 
62 template<class T>
63 mClass(General) DataTypeImpl : public ::DataType
65 public:
66 
67 
68  DataTypeImpl( Form frm=normal )
69  : DataType( rep__( (T)0 ), frm ) {}
70 protected:
71 
72  inline Rep rep__( int i ) const { return intTp; }
73  inline Rep rep__( float f ) const { return floatTp; }
74  inline Rep rep__( double d ) const { return doubleTp; }
75  inline Rep rep__( bool b ) const { return boolTp; }
76  inline Rep rep__( const char* s ) const { return stringTp; }
77 
78 };
79 
80 
81 
82 
90 { mODTextTranslationClass(DataInpSpec)
91 public:
92 
93 
94  DataInpSpec(DataType);
95  DataInpSpec(const DataInpSpec&);
96  virtual ~DataInpSpec() {}
97 
98  DataType type() const;
99 
100  virtual DataInpSpec* clone() const =0;
101  virtual int nElems() const { return 1; }
102 
103  virtual bool isUndef( int idx=0 ) const =0;
104 
105  virtual bool hasLimits() const { return false; }
106  virtual bool isInsideLimits(int idx=0) const;
107 
108  virtual const char* text( int idx=0 ) const =0;
109  virtual bool setText(const char*,int idx=0) =0;
110 
111  void fillPar(IOPar&) const;
113  bool usePar(const IOPar&);
116  virtual int getIntValue(int idx=0) const;
117  virtual double getDValue(int idx=0) const;
118  virtual float getFValue(int idx=0) const;
119  virtual bool getBoolValue(int idx=0) const;
120 
121  virtual void setValue(int i,int idx=0);
122  virtual void setValue(double d,int idx=0);
123  virtual void setValue(float f,int idx=0);
124  virtual void setValue(bool b,int idx=0);
125 
126  virtual int getDefaultIntValue(int idx=0) const;
127  virtual double getDefaultValue(int idx=0) const;
128  virtual float getDefaultfValue(int idx=0) const;
129  virtual bool getDefaultBoolValue(int idx=0) const;
130  virtual const char* getDefaultStringValue(int idx=0) const;
131 
132  virtual void setDefaultValue(int i,int idx=0) {}
133  virtual void setDefaultValue(double d,int idx=0) {}
134  virtual void setDefaultValue(float f,int idx=0) {}
135  virtual void setDefaultValue(bool b,int idx=0) {}
136  virtual void setDefaultValue(const char* s,int idx=0) {}
137 
138  virtual const char* name(int idx=0) const;
139  virtual DataInpSpec& setName(const char*,int idx=0);
140 
141 protected:
142 
143  void setType( DataType t );
146 
149 
150 private:
151 
152  static const char* valuestr;
153 
154 public:
155  /*mDeprecated*/ double getdValue(int idx=0) const { return getDValue(idx); }
156  /*mDeprecated*/ float getfValue(int idx=0) const { return getFValue(idx); }
157 };
158 
159 
160 #define mDefDISSetValBaseClassImpl(typ) \
161  virtual void setValue( typ val, int idx=0 ) \
162  { DataInpSpec::setValue(val,idx); }
163 #define mDefDISSetDefValBaseClassImpl(typ) \
164  virtual void setDefaultValue( typ val, int idx=0 ) \
165  { DataInpSpec::setDefaultValue(val,idx); }
166 
167 
174 template <class T>
175 mClass(General) NumInpSpec : public DataInpSpec
177 public:
178  NumInpSpec()
179  : DataInpSpec( DataTypeImpl<T>() )
180  , limits_(0)
181  { mSetUdf( value_ ); mSetUdf( defaultvalue_ ); }
182  NumInpSpec( T val )
183  : DataInpSpec( DataTypeImpl<T>() )
184  , limits_(0)
185  , value_(val)
186  { mSetUdf( defaultvalue_ ); }
187  NumInpSpec( T val, T start, T stop=mUdf(T), T step=1)
188  : DataInpSpec(DataTypeImpl<T>())
189  , limits_(new StepInterval<T>(start,stop,step))
190  , value_(val)
191  { mSetUdf( defaultvalue_ ); }
192  NumInpSpec( T val, const StepInterval<T>& intv )
193  : DataInpSpec(DataTypeImpl<T>())
194  , limits_(new StepInterval<T>(intv))
195  , value_(val)
196  { mSetUdf( defaultvalue_ ); }
197  NumInpSpec(const NumInpSpec<T>&);
198  ~NumInpSpec() { delete limits_; }
199 
200  virtual NumInpSpec<T>* clone() const
201  { return new NumInpSpec<T>( *this ); }
202 
203  virtual bool isUndef( int idx=0 ) const
204  { return mIsUdf(value_); }
205 
206  virtual bool setText( const char* s, int idx=0 )
207  { return getFromString( value_, s, mUdf(T) ); }
208 
209  virtual int getIntValue(int idx=0) const { return (int)value(); }
210  virtual double getDValue(int idx=0) const { return value(); }
211  virtual float getFValue(int idx=0) const { return (float)value(); }
212 
213  virtual int getDefaultIntValue(int idx=0) const
214  { return (int)defaultValue(); }
215  virtual double getDefaultValue(int idx=0) const
216  { return defaultValue(); }
217  virtual float getDefaultfValue(int idx=0) const
218  { return ( float ) defaultValue(); }
219 
220  virtual void setDefaultValue( int val, int idx=0 )
221  { defaultvalue_ = (T)val; }
222  virtual void setDefaultValue( double val, int idx=0 )
223  { defaultvalue_ = (T)val; }
224  virtual void setDefaultValue( float val, int idx=0 )
225  { defaultvalue_ = (T)val; }
228  T value() const
229  {
230  if ( mIsUdf(value_) ) return mUdf(T);
231  return value_;
232  }
233 
234  T defaultValue() const
235  {
236  if ( mIsUdf(defaultvalue_) ) return mUdf(T);
237  return defaultvalue_;
238  }
239 
240  virtual const char* text( int idx=0 ) const
241  {
242  if ( isUndef() ) return "";
243  else return toString( value() );
244  }
245 
246  virtual bool hasLimits() const { return limits_; }
247  virtual bool isInsideLimits( int idx=0 ) const
248  {
249  if ( !limits_ ) return true;
250  if ( !isUndef(idx) )
251  return limits_->includes( value(), true );;
252 
253  const bool startudf = mIsUdf(limits_->start);
254  const bool stopudf = mIsUdf(limits_->stop);
255  if ( startudf && stopudf ) return true;
256  if ( startudf )
257  return value() < limits_->stop;
258  if ( stopudf )
259  return value() > limits_->start;
260  return false;
261  }
262 
263  const StepInterval<T>* limits() const { return limits_; }
265  { return setLimits(
266  StepInterval<T>(intv.start,intv.stop,1) ); }
268  {
269  delete limits_;
270  limits_ = new StepInterval<T>( r );
271  return *this;
272  }
273 
274 protected:
275 
278 
280 };
281 
282 
283 template <class T>
285  : DataInpSpec( nis )
286  , limits_( nis.limits_ ? new StepInterval<T>(*nis.limits_) : 0 )
287  , value_( nis.value_ )
288  , defaultvalue_( nis.defaultvalue_ )
289 {}
290 
291 
295 
296 
306 template <class T>
307 mClass(General) NumInpIntervalSpec : public DataInpSpec
309 public:
310  NumInpIntervalSpec( bool withstep=false )
312  , startlimits_(0), stoplimits_(0), steplimits_(0)
313  , symm_(false)
314  , wsymm_(false)
315  , interval_( withstep ? new StepInterval<T>(
316  mUdf(T),
317  mUdf(T),
318  mUdf(T) )
319  : new Interval<T>(
320  mUdf(T),
321  mUdf(T) ) )
322  , defaultinterval_( withstep ? new StepInterval<T>(
323  mUdf(T),
324  mUdf(T),
325  mUdf(T) )
326  : new Interval<T>(
327  mUdf(T),
328  mUdf(T) ) )
329  {}
330 
331  NumInpIntervalSpec( const Interval<T>& interval )
332  : DataInpSpec(DataTypeImpl<T>(::DataType::interval))
333  , startlimits_(0), stoplimits_(0), steplimits_(0)
334  , symm_(false)
335  , wsymm_(false)
336  , interval_( interval.clone() )
337  , defaultinterval_( hasStep() ? new StepInterval<T>(
338  mUdf(T),
339  mUdf(T),
340  mUdf(T) )
341  : new Interval<T>(
342  mUdf(T),
343  mUdf(T) ) )
344  {}
345 
347  : DataInpSpec( o )
348  , startlimits_(0), stoplimits_(0), steplimits_(0)
349  , symm_(o.isSymmetric())
350  , wsymm_(o.withSymmetric())
351  , interval_( o.interval_ ? o.interval_->clone() : 0)
352  , defaultinterval_( o.defaultinterval_ ?
353  o.defaultinterval_->clone() : 0)
354  {
355  if ( o.limits(0) ) setLimits( *o.limits(0), 0 );
356  if ( o.limits(1) ) setLimits( *o.limits(1), 1 );
357  if ( o.limits(2) ) setLimits( *o.limits(2), 2 );
358  }
359 
361  {
362  delete interval_;
363  delete defaultinterval_;
364  delete startlimits_;
365  delete stoplimits_;
366  delete steplimits_;
367  }
368 
369  virtual NumInpIntervalSpec<T>* clone() const
370  { return new NumInpIntervalSpec<T>( *this ); }
371 
372  virtual int nElems() const { return hasStep() ? 3 : 2; }
373  inline bool hasStep() const { return stpi(); }
374 
375  virtual bool isUndef( int idx=0 ) const
376  {
377  if ( !interval_ ) return true;
378  return mIsUdf( value_(idx) );
379  }
380 
381  virtual void setValue( const Interval<T>& intval )
382  {
383  if ( interval_ ) delete interval_;
384  interval_ = intval.clone();
385  }
390 
391  virtual void setDefaultValue( const Interval<T>& defaultintval )
392  {
393  if ( defaultinterval_ ) delete defaultinterval_;
394  defaultinterval_ = defaultintval.clone();
395  }
401 
402  virtual bool setText( const char* s, int idx=0 )
403  {
404  if ( pt_value_(idx) )
405  return getFromString(*pt_value_(idx),s,mUdf(T));
406  return false;
407  }
408 
409  T value( int idx=0 ) const
410  {
411  if ( isUndef(idx) ) return mUdf(T);
412  return value_(idx);
413  }
414 
415  virtual int getIntValue(int idx=0) const { return (int)value(idx); }
416  virtual double getDValue(int idx=0) const { return value(idx); }
417  virtual float getFValue(int idx=0) const { return (float)value(idx); }
418 
419  T defaultValue( int idx=0 ) const
420  {
421  if ( !defaultinterval_ ) return mUdf(T);
422  return defaultvalue_(idx);
423  }
424 
425  virtual int getDefaultIntValue(int idx=0) const
426  { return (int)defaultValue(idx); }
427  virtual double getDefaultValue(int idx=0) const
428  { return defaultValue(idx); }
429  virtual float getDefaultfValue(int idx=0) const
430  { return (float) defaultValue(idx); }
431 
432  virtual const char* text( int idx=0 ) const
433  {
434  if ( isUndef(idx) ) return "";
435  return toString( value(idx));
436  }
437 
438  virtual bool hasLimits() const
439  { return startlimits_||stoplimits_||steplimits_; }
440  virtual bool isInsideLimits( int idx=0 ) const
441  {
442  const StepInterval<T>* lims = limits(idx);
443  if ( !lims ) return true;
444  if ( !isUndef(idx) )
445  return lims->includes( value(idx), true );
446 
447  const bool startudf = mIsUdf(lims->start);
448  const bool stopudf = mIsUdf(lims->stop);
449  if ( startudf && stopudf ) return true;
450  if ( startudf )
451  return value(idx) < lims->stop;
452  if ( stopudf )
453  return value(idx) > lims->start;
454  return false;
455  }
456 
457 
464  const StepInterval<T>* limits( int idx=0 ) const
465  {
466  switch( idx )
467  {
468  default:
469  case 0 : return startlimits_;
470  case 1 : return stoplimits_;
471  case 2 : return steplimits_;
472  }
473  }
474 
475 
486  {
487  if ( idx<0 || idx==0 )
488  {
489  delete startlimits_;
490  startlimits_ = new StepInterval<T>( r );
491  }
492  if ( idx<0 || idx==1 )
493  {
494  delete stoplimits_;
495  stoplimits_ = new StepInterval<T>( r );
496  }
497  if ( idx==-2 || idx==2 )
498  {
499  delete steplimits_;
500  steplimits_ = new StepInterval<T>( r );
501  }
502 
503  return *this;
504  }
505  NumInpIntervalSpec& setLimits( const Interval<T>& r, int idx=-1 )
506  {
507  return setLimits(
508  StepInterval<T>(r.start,r.stop,1), idx );
509  }
510 
511  void setSymmetric( bool yn )
512  { symm_ = yn; wsymm_ = true; }
513  bool isSymmetric() const { return symm_; }
514  void setWithSymmetric( bool yn ) { wsymm_ = yn; }
515  bool withSymmetric() const { return wsymm_; }
516 
517 protected:
518 
521 
525 
526  bool symm_;
527  bool wsymm_;
528 
529  T value_( int idx=0 ) const
530  {
531  if ( pt_value_(idx) ) return *pt_value_(idx);
532  return mUdf(T);
533  }
534 
535  T defaultvalue_( int idx=0 ) const
536  {
537  if ( pt_value_(idx,true) )
538  return *pt_value_(idx,true);
539 
540  return mUdf(T);
541  }
542 
543  T* pt_value_( int idx=0, bool defval=false ) const
544  {
545  if ( defval )
546  {
547  if ( !defaultinterval_) return 0;
548  if ( idx == 0 ) return &defaultinterval_->start;
549  if ( idx == 1 ) return &defaultinterval_->stop;
550  if ( hasStep() ) return &stpi(defval)->step;
551  }
552  else
553  {
554  if ( !interval_) return 0;
555  if ( idx == 0 ) return &interval_->start;
556  if ( idx == 1 ) return &interval_->stop;
557  if ( hasStep() ) return &stpi()->step;
558  }
559  return 0;
560  }
561 
562  StepInterval<T>* stpi( bool defval=false ) const
563  {
565  defval ? defaultinterval_ : interval_)
566  return const_cast<StepInterval<T>*>( si );
567  }
568 };
569 
570 
574 
575 
577 mExpClass(General) StringInpSpec : public DataInpSpec
579 public:
580  StringInpSpec( const char* s=0 );
581  virtual bool isUndef(int idx=0) const;
582 
583  virtual DataInpSpec* clone() const;
584  const char* text() const;
585 
586  virtual bool setText(const char*,int idx=0) ;
587  virtual const char* text(int) const;
588 
589  void setDefaultValue(const char*,int);
590  const char* getDefaultStringValue(int) const;
591 
596 
597 protected:
598 
599  bool isUndef_;
601  BufferString defaultstr_;
602 
603 };
604 
609 public:
610  FileNameInpSpec( const char* fname=0 );
611  virtual DataInpSpec* clone() const;
612 };
613 
614 
627 mExpClass(General) BoolInpSpec : public DataInpSpec
629 public:
630  BoolInpSpec(bool yesno,
631  const uiString& truetxt=uiStrings::sYes(),
632  const uiString& falsetxt=uiStrings::sNo(),
633  bool isset=true);
634  BoolInpSpec(const BoolInpSpec&);
635 
636  virtual bool isUndef(int idx=0) const;
637 
638  virtual DataInpSpec* clone() const;
639  uiString trueFalseTxt(bool tf=true) const;
640  void setTrueFalseTxt(bool,const uiString&);
641 
642  bool checked() const;
643  void setChecked(bool yesno);
644  virtual const char* text(int idx=0) const;
645 
646  virtual bool setText(const char* s,int idx=0);
647  virtual bool getBoolValue(int idx=0) const;
648  virtual void setValue(bool,int idx=0);
652  virtual bool getDefaultBoolValue(int idx=0) const;
653  virtual void setDefaultValue(bool,int idx=0);
658 
659  bool isSet() const { return isset_; }
660  void setSet( bool yesno=true ) { isset_ = yesno; }
661 
662 protected:
663 
666  bool yn_;
668  bool isset_;
669 
670 };
671 
672 
673 
674 
677 mExpClass(General) StringListInpSpec : public DataInpSpec
679 public:
682  StringListInpSpec(const char** sl=0);
683  StringListInpSpec(const uiString*);
686  StringListInpSpec(const EnumDef&);
690 
691  virtual bool isUndef(int idx=0) const;
692 
693  virtual DataInpSpec* clone() const;
694 
695  const uiStringSet& strings() const;
696 
697  const EnumDef* enumDef() const { return enumdef_ ; }
698  void setEnumDef(const EnumDef&);
700 
701  void addString(const uiString& txt);
702  virtual const char* text(int idx=0) const;
703  void setItemText(int idx, const uiString&);
704  virtual bool setText(const char* s,int nr);
705 
706  virtual int getIntValue(int idx=0) const;
707  virtual double getDValue(int idx=0) const;
708  virtual float getFValue(int idx=0) const;
709 
710  virtual void setValue(int i,int idx=0);
711  virtual void setValue(double d,int idx=0);
712  virtual void setValue(float f,int idx=0);
714 
715  virtual void setDefaultValue(int i,int idx=0);
716  virtual int getDefaultIntValue(int idx=0) const;
721 
722  bool isSet() const { return isset_; }
723  void setSet( bool yn=true ) { isset_ = yn; }
724 
725 protected:
726 
728  int cur_;
730  bool isset_;
732 };
733 
734 
737 mExpClass(General) PositionInpSpec : public DataInpSpec
739 public:
740 
741  struct Setup
742  {
743  Setup( bool wc=false, bool d2=false, bool ps=false )
744  : wantcoords_(wc)
745  , is2d_(d2)
746  , isps_(ps)
747  , isrel_(false) { clear(); }
748 
749  mDefSetupMemb(bool,wantcoords)
750  mDefSetupMemb(bool,is2d)
751  mDefSetupMemb(bool,isps)
752  mDefSetupMemb(bool,isrel)
753  mDefSetupMemb(Coord,coord)
754  mDefSetupMemb(BinID,binid) // For 2D, put trace number in crl
755  mDefSetupMemb(float,offs)
756 
757  void clear()
758  {
759  coord_.x = coord_.y = mUdf(double);
760  binid_.inl() = binid_.crl() = mUdf(int);
761  offs_ = 0;
762  }
763  };
764 
765  PositionInpSpec(const Setup&);
766  PositionInpSpec(const BinID&,bool isps=false);
767  PositionInpSpec(const Coord&,bool isps=false,
768  bool is2d=false);
769  PositionInpSpec(int trcnr,bool isps=false);
770 
771  virtual DataInpSpec* clone() const { return new PositionInpSpec(*this); }
772  virtual int nElems() const;
773 
774  float value( int idx=0 ) const
775  { return getVal(setup_,idx); }
776  void setValue( float f, int idx=0 )
777  { setVal( setup_, idx, f ); }
781  virtual bool isUndef(int idx=0) const;
782  virtual const char* text(int idx=0) const;
783  virtual bool setText(const char* s,int idx=0);
784 
785  float defaultValue( int idx=0 ) const
786  { return getVal(defsetup_,idx); }
787  void setDefaultValue( float f, int idx=0 )
788  { setVal( defsetup_, idx, f ); }
793 
794  Setup& setup( bool def=false )
795  { return def ? defsetup_ : setup_; }
796  const Setup& setup( bool def=false ) const
797  { return def ? defsetup_ : setup_; }
798 
799  Coord getCoord(double udfval=mUdf(double)) const;
800  BinID getBinID(int udfval=mUdf(int)) const;
801  int getTrcNr(int udfval=mUdf(int)) const;
802  float getOffset(float udfval=mUdf(float)) const;
803 
804 protected:
805 
808 
809  float getVal(const Setup&,int) const;
810  void setVal(Setup&,int,float);
811 };
812 
813 #endif
#define mExpClass(module)
Definition: commondefs.h:160
virtual void setName(const char *)
virtual void setValue(int i, int idx=0)
mODTextTranslationClass(NumInpIntervalSpec) public
Definition: datainpspec.h:308
#define mIsUdf(val)
Use mIsUdf to check for undefinedness of simple types.
Definition: undefval.h:287
double getdValue(int idx=0) const
Definition: datainpspec.h:155
bool getFromString(int &, const char *, int udfval)
Rep rep() const
Definition: datainpspec.h:41
T defaultValue() const
Definition: datainpspec.h:234
StepInterval< T > * steplimits_
Definition: datainpspec.h:524
DataType(Rep tp, Form frm=normal)
Definition: datainpspec.h:38
virtual double getDefaultValue(int idx=0) const
Definition: datainpspec.h:427
NumInpSpec(T val)
Definition: datainpspec.h:182
virtual void setDefaultValue(float f, int idx=0)
Definition: datainpspec.h:134
bool isset_
Definition: datainpspec.h:668
NumInpIntervalSpec(const NumInpIntervalSpec< T > &o)
Definition: datainpspec.h:346
bool hasStep() const
Definition: datainpspec.h:373
void setDefaultValue(float f, int idx=0)
Definition: datainpspec.h:787
const EnumDef * enumdef_
Definition: datainpspec.h:731
Form form_
Definition: datainpspec.h:53
virtual bool getDefaultBoolValue(int idx=0) const
NumInpSpec< double > DoubleInpSpec
Definition: datainpspec.h:294
#define mODTextTranslationClass(clss)
Definition: uistring.h:38
#define mSetUdf(val)
Use this macro to set simple types to undefined.
Definition: undefval.h:274
const StepInterval< T > * limits(int idx=0) const
gets limits for interval components.
Definition: datainpspec.h:464
mODTextTranslationClass(DataInpSpec) public DataInpSpec(const DataInpSpec &)
NumInpIntervalSpec< float > FloatInpIntervalSpec
Definition: datainpspec.h:572
bool yn_
Definition: datainpspec.h:666
Form form() const
Definition: datainpspec.h:42
virtual int nElems() const
Definition: datainpspec.h:372
BufferStringSet names_
Definition: datainpspec.h:148
virtual void setDefaultValue(int val, int idx=0)
Definition: datainpspec.h:220
StepInterval< T > * stoplimits_
Definition: datainpspec.h:523
void usePar(const IOPar &iop, ODPolygon< T > &poly, const char *inpkey)
Definition: polygon.h:188
virtual double getDValue(int idx=0) const
Definition: datainpspec.h:416
Definition: datainpspec.h:36
DataType implementation.
Definition: datainpspec.h:63
StepInterval< T > * startlimits_
Definition: datainpspec.h:522
void setWithSymmetric(bool yn)
Definition: datainpspec.h:514
virtual void setDefaultValue(double d, int idx=0)
Definition: datainpspec.h:133
uiString falsetext_
Definition: datainpspec.h:665
const StepInterval< T > * limits() const
Definition: datainpspec.h:263
Setup defsetup_
Definition: datainpspec.h:807
mODTextTranslationClass(DataTypeImpl) public
Definition: datainpspec.h:64
void clear(std::ios &)
NumInpIntervalSpec & setLimits(const StepInterval< T > &r, int idx=-1)
sets limits for interval components.
Definition: datainpspec.h:485
virtual double getDValue(int idx=0) const
Definition: datainpspec.h:210
virtual float getFValue(int idx=0) const
Definition: datainpspec.h:417
Definition: uistring.h:89
NumInpSpec< T > & setLimits(const Interval< T > &intv)
Definition: datainpspec.h:264
virtual bool getBoolValue(int idx=0) const
bool operator!=(const DataType &oth) const
Definition: datainpspec.h:46
A cartesian coordinate in 2D space.
Definition: coord.h:25
bool operator==(const DataType &oth) const
Definition: datainpspec.h:44
Set of BufferString objects.
Definition: bufstringset.h:28
virtual DataInpSpec * clone() const
Definition: datainpspec.h:771
TypeSet< int > nameidxs_
Definition: datainpspec.h:147
Data type.
Definition: datainpspec.h:31
Rep rep_
Definition: datainpspec.h:52
T value(int idx=0) const
Definition: datainpspec.h:409
Interval of values.
Definition: commontypes.h:31
NumInpSpec(T val, const StepInterval< T > &intv)
Definition: datainpspec.h:192
float value(int idx=0) const
Definition: datainpspec.h:774
virtual int getDefaultIntValue(int idx=0) const
Definition: datainpspec.h:213
Specifications for character string inputs.
Definition: datainpspec.h:577
virtual bool isInsideLimits(int idx=0) const
Definition: datainpspec.h:440
bool symm_
Definition: datainpspec.h:526
NumInpIntervalSpec(const Interval< T > &interval)
Definition: datainpspec.h:331
uiStringSet strings_
Definition: datainpspec.h:727
NumInpIntervalSpec< int > IntInpIntervalSpec
Definition: datainpspec.h:571
bool prefempty_
Definition: datainpspec.h:145
virtual NumInpSpec< T > * clone() const
Definition: datainpspec.h:200
Setup setup_
Definition: datainpspec.h:806
virtual bool hasLimits() const
Definition: datainpspec.h:438
static uiString sNo()
Definition: uistrings.h:375
virtual ~DataInpSpec()
Definition: datainpspec.h:96
Rep rep__(float f) const
Definition: datainpspec.h:73
Generalized set of parameters of the keyword-value type.
Definition: iopar.h:47
int defaultval_
Definition: datainpspec.h:729
Specification of input characteristics.
Definition: datainpspec.h:89
virtual bool isUndef(int idx=0) const
Definition: datainpspec.h:375
#define mUdf(type)
Use this macro to get the undefined for simple types.
Definition: undefval.h:272
virtual NumInpIntervalSpec< T > * clone() const
Definition: datainpspec.h:369
uiString truetext_
Definition: datainpspec.h:664
virtual int getIntValue(int idx=0) const
Definition: datainpspec.h:415
const uiStringSet & strings() const
Definition: enums.h:59
Interval with step.
Definition: commontypes.h:33
Setup(bool wc=false, bool d2=false, bool ps=false)
Definition: datainpspec.h:743
Interval< T > * defaultinterval_
Definition: datainpspec.h:520
virtual bool hasLimits() const
Definition: datainpspec.h:105
bool defaultyn_
Definition: datainpspec.h:667
T defaultvalue_
Definition: datainpspec.h:277
virtual void setDefaultValue(double val, int idx=0)
Definition: datainpspec.h:222
virtual void setDefaultValue(float val, int idx=0)
Definition: datainpspec.h:224
void setSet(bool yn=true)
Definition: datainpspec.h:723
static uiString sYes()
Definition: uistrings.h:526
#define mDefSetupMemb(typ, memb)
Definition: commondefs.h:137
T defaultValue(int idx=0) const
Definition: datainpspec.h:419
Specifications for numerical inputs that may or may not have limits.
Definition: datainpspec.h:175
Form
Definition: datainpspec.h:36
float getfValue(int idx=0) const
Definition: datainpspec.h:156
void fillPar(IOPar &iop, const ODPolygon< T > &poly, const char *inpkey)
Definition: polygon.h:175
#define mDynamicCastGet(typ, out, in)
Definition: commondefs.h:131
Rep rep__(int i) const
Definition: datainpspec.h:72
~NumInpSpec()
Definition: datainpspec.h:198
bool wsymm_
Definition: datainpspec.h:527
virtual int nElems() const
Definition: datainpspec.h:101
virtual void setDefaultValue(bool b, int idx=0)
Definition: datainpspec.h:135
T value() const
Definition: datainpspec.h:228
Specifications for BinID/Coordinate/TrcNrs and offsets.
Definition: datainpspec.h:737
NumInpSpec< int > IntInpSpec
Definition: datainpspec.h:292
virtual float getDefaultfValue(int idx=0) const
Definition: datainpspec.h:429
bool isset_
Definition: datainpspec.h:730
Rep rep__(bool b) const
Definition: datainpspec.h:75
virtual const char * text(int idx=0) const
Definition: datainpspec.h:240
NumInpSpec(T val, T start, T stop=mUdf(T), T step=1)
Definition: datainpspec.h:187
T stop
Definition: ranges.h:93
OD::String with its own variable length buffer. The buffer has a guaranteed minimum size...
Definition: bufstring.h:40
StepInterval< T > * limits_
Definition: datainpspec.h:279
virtual const char * text(int idx=0) const
Definition: datainpspec.h:432
bool isSymmetric() const
Definition: datainpspec.h:513
void setSet(bool yesno=true)
Definition: datainpspec.h:660
virtual double getDefaultValue(int idx=0) const
Definition: datainpspec.h:215
NumInpSpec< T > & setLimits(const StepInterval< T > &r)
Definition: datainpspec.h:267
Positioning in a seismic survey: inline/crossline or lineNr/trcNr.
Definition: binid.h:30
Definition: datainpspec.h:741
virtual int getIntValue(int idx=0) const
Definition: datainpspec.h:209
#define mDefDISSetDefValBaseClassImpl(typ)
Definition: datainpspec.h:163
StepInterval< T > * stpi(bool defval=false) const
Definition: datainpspec.h:562
T value_(int idx=0) const
Definition: datainpspec.h:529
mODTextTranslationClass(NumInpSpec) public
Definition: datainpspec.h:176
bool includes(const X &, bool allowrev) const
Definition: ranges.h:482
virtual bool isInsideLimits(int idx=0) const
Definition: datainpspec.h:247
virtual void setValue(const Interval< T > &intval)
Definition: datainpspec.h:381
Definition: datainpspec.h:36
const EnumDef * enumDef() const
Definition: datainpspec.h:697
~NumInpIntervalSpec()
Definition: datainpspec.h:360
NumInpIntervalSpec & setLimits(const Interval< T > &r, int idx=-1)
Definition: datainpspec.h:505
virtual float getDefaultfValue(int idx=0) const
Definition: datainpspec.h:217
virtual const char * getDefaultStringValue(int idx=0) const
virtual void setDefaultValue(int i, int idx=0)
Definition: datainpspec.h:132
T start
Definition: ranges.h:92
Specifications for numerical intervals.
Definition: datainpspec.h:307
Definition: uistring.h:218
NumInpSpec< float > FloatInpSpec
Definition: datainpspec.h:293
DataType
Definition: seistype.h:54
Rep rep__(double d) const
Definition: datainpspec.h:74
T * pt_value_(int idx=0, bool defval=false) const
Definition: datainpspec.h:543
int cur_
Definition: datainpspec.h:728
NumInpIntervalSpec< double > DoubleInpIntervalSpec
Definition: datainpspec.h:573
#define mDefDISSetValBaseClassImpl(typ)
Definition: datainpspec.h:160
void setValue(float f, int idx=0)
Definition: datainpspec.h:776
Interval< T > * interval_
Definition: datainpspec.h:519
#define mClass(module)
Definition: commondefs.h:164
void setSymmetric(bool yn)
Definition: datainpspec.h:511
bool withSymmetric() const
Definition: datainpspec.h:515
virtual bool setText(const char *s, int idx=0)
Definition: datainpspec.h:206
virtual bool hasLimits() const
Definition: datainpspec.h:246
Specifications for file-name inputs.
Definition: datainpspec.h:607
virtual const OD::String & name() const
Definition: namedobj.h:47
virtual void setDefaultValue(const char *s, int idx=0)
Definition: datainpspec.h:136
virtual bool isUndef(int idx=0) const
Definition: datainpspec.h:203
static const char * valuestr
Definition: datainpspec.h:152
DataType tp_
Definition: datainpspec.h:144
Export_Basic const char * toString(ViewStyle)
Holds data pertinent to a certain enum. It does not know the enum values themselves, but treat them as integers.
Definition: enums.h:45
T defaultvalue_(int idx=0) const
Definition: datainpspec.h:535
Rep rep__(const char *s) const
Definition: datainpspec.h:76
virtual int getDefaultIntValue(int idx=0) const
Definition: datainpspec.h:425
T value_
Definition: datainpspec.h:276
Specifications for boolean inputs.
Definition: datainpspec.h:627
Specifications for list of character string inputs.
Definition: datainpspec.h:677
virtual float getFValue(int idx=0) const
Definition: datainpspec.h:211
const Setup & setup(bool def=false) const
Definition: datainpspec.h:796
virtual Interval< T > * clone() const
Definition: ranges.h:407

Generated at for the OpendTect seismic interpretation project. Copyright (C): dGB Beheer B. V. 2019