50 const char*
errMsg()
const;
56 const Param&
operator[](
int idx )
const {
return *params_[idx];}
59 int size()
const {
return sz_; }
61 const char*
getPrefix()
const {
return prefix_.buf();}
65 bool isEqual(
const Param&)
const;
78 #define mDescGetParamGroup(PT,ret,desc,key) \ 79 ParamGroup<PT>* ret; \ 81 Param* param = desc.getParam( key ); \ 82 mDynamicCastGet(ParamGroup<PT>*,tmp,param) \ 86 #define mDescGetConstParamGroup(PT,ret,desc,key) \ 87 const ParamGroup<PT>* ret; \ 89 const Param* param = desc.getParam( key ); \ 90 mDynamicCastGet(const ParamGroup<PT>*,tmp,param)\ 103 template <
class PT>
inline 107 if ( !pgr || pgr->size() != sz_ )
109 if ( prefix_ != pgr->getPrefix() )
112 for (
int idx=0; idx<sz_; idx++ )
114 if ( params_[idx]->getSpec()->nElems()
115 != pgr->params_[idx]->getSpec()->nElems() )
119 idy<params_[idx]->getSpec()->nElems(); idy++ )
121 const BufferString txt( params_[idx]->getSpec()->text(idx) );
122 if ( txt != pgr->params_[idx]->getSpec()->text(idx) )
130 template <
class PT>
inline 133 if ( !enabled_ )
return true;
134 if ( !sz_ )
return false;
136 for (
int idx=0; idx<sz_; idx++ )
138 if ( !params_[idx]->isOK() )
141 err =
"cannot parse parameter "; err += idx;
142 err +=
" of the group "; err += prefix_;
151 template <
class PT>
inline 154 setSize( vals.
size() );
155 for (
int idx=0; idx<sz_; idx++ )
157 if ( !params_[idx]->setCompositeValue(vals.
get(idx) ) )
165 template <
class PT>
inline 172 template <
class PT>
inline 177 template <
class PT>
inline 188 template <
class PT>
inline 197 PT* np =
new PT( (PT&)a[idx] );
203 template <
class PT>
inline 210 template <
class PT>
inline 217 template <
class PT>
inline 222 PT* newpara =
new PT(
templ_);
230 template <
class PT>
inline 233 for (
int idx=0; idx<
sz_; idx++ )
238 res.
add( parstr ).
add(
" " );
244 template <
class PT>
inline 247 for (
int idx=0; idx<
sz_; idx++ )
253 val =
params_[idx]->getDefaultValue();
254 res.
add( val ).
add(
" " );
259 #define mAttribSpecSet(sizegiver,sizetaker) \ 263 if ( sizegiver == sizetaker.size() ) \ 266 sizetaker.setSize( sizegiver ); \ bool setValues(BufferStringSet &)
Definition: attribparamgroup.h:152
bool isEqual(const Param &) const
Definition: attribparamgroup.h:104
const char * str() const
Definition: odstring.h:46
BufferString & get(size_type idx)
Definition: bufstringset.h:49
const char * errMsg() const
Definition: attribparamgroup.h:173
Set of BufferString objects.
Definition: bufstringset.h:25
bool isRequired() const
Definition: attribparambase.h:52
ParamGroup(int startsz, const char *prefix, const PT &templ)
Definition: attribparamgroup.h:178
ObjectSet< PT > params_
Definition: attribparamgroup.h:71
FixedString getKey() const
Definition: attribparambase.h:56
size_type size() const
Definition: objectset.h:48
BufferString errmsg_
Definition: attribparamgroup.h:73
bool getCompositeValue(BufferString &) const
Definition: attribparamgroup.h:231
int getSize() const
Definition: attribparamgroup.h:211
~ParamGroup()
Definition: attribparamgroup.h:204
const BufferString prefix_
Definition: attribparamgroup.h:69
A parameter that is used by an attribute.
Definition: attribparambase.h:34
const char * getPrefix() const
Definition: attribparamgroup.h:61
int size() const
Definition: attribparamgroup.h:59
#define mDynamicCastGet(typ, out, in)
Definition: commondefs.h:123
OD::String with its own variable length buffer. The buffer has a guaranteed minimum size...
Definition: bufstring.h:38
BufferString errmsg_
Definition: horizontracker.h:117
int isEmpty() const
Definition: attribparamgroup.h:60
ParamGroup< PT > * clone() const
Definition: attribparamgroup.h:166
bool isgroup_
Definition: attribparambase.h:75
bool isOK() const
Definition: attribparamgroup.h:131
size_type size() const
Definition: bufstringset.h:37
const char * errMsg() const
Definition: horizontracker.h:59
#define mClass(module)
Definition: commondefs.h:161
void setSize(int)
Definition: attribparamgroup.h:218
Attrib::Param that contains many (a set) Attrib::Param of one kind.
Definition: attribparamgroup.h:39
void fillDefStr(BufferString &) const
Definition: attribparamgroup.h:245
Param & operator[](int idx)
Definition: attribparamgroup.h:55
Semblance Attribute.
Definition: attribdataholder.h:21
void deepErase(ObjectSet< T > &os)
empty the ObjectSet deleting all objects pointed to.
Definition: objectset.h:122
int sz_
Definition: attribparamgroup.h:67
PT templ_
Definition: attribparamgroup.h:70
const Param & operator[](int idx) const
Definition: attribparamgroup.h:56