diff --git a/cwFlowTypes.h b/cwFlowTypes.h index 221f0ad..7a01b46 100644 --- a/cwFlowTypes.h +++ b/cwFlowTypes.h @@ -468,7 +468,7 @@ namespace cw void var_destroy( variable_t* var ); // Channelizing creates a new var record with an explicit channel index to replace the - // automatically generated variable whose channel index is set to 'all'. + // automatically generated variable whose channel index is set to 'kAnyChIdx'. rc_t var_channelize( proc_t* proc, const char* var_label, unsigned sfx_id, unsigned chIdx, const object_t* value_cfg, unsigned vid, variable_t*& varRef ); // Wrapper around call to var->proc->members->value() diff --git a/cwObject.h b/cwObject.h index 8bc78d7..d58ee20 100644 --- a/cwObject.h +++ b/cwObject.h @@ -32,7 +32,9 @@ namespace cw kHexFl = 0x10000000, kIdentFl = 0x20000000, - kOptFl = 0x40000000 + + kOptFl = 0x40000000, + kReqFl = 0x00000000, }; @@ -304,10 +306,13 @@ namespace cw // readv("label0",flags0,v0,"label1",flags0,v1, ... ) - // Use kOptFl for optional fields. + // Use kReqFl/kOptFl for required/optional fields. // Use kListTId and kDictTId to validate the type of container fields. // In general it should not be necessary to validate numeric and string types because // they are validated by virtue of being converted to the returned value. + // Note that readv() assumes that the list of possible fields given as input is complete + // and any fields that it finds which are not in the list are not valid. This + // validity check is the main difference between readv() and getv()/getv_opt(). template< typename T0, typename T1, typename... ARGS > rc_t readv( T0 label, unsigned flags, T1& valRef, ARGS&&... args ) const { return _readv(nullptr, label,flags,valRef,args...); }