new RecordVal Remove() method to clear a field

This commit is contained in:
Vern Paxson 2021-02-25 15:04:46 -08:00
parent 931cec4e06
commit c757db2714
2 changed files with 19 additions and 6 deletions

View file

@ -1061,6 +1061,13 @@ public:
void Assign(int field, Ts&&... args)
{ Assign(field, make_intrusive<T>(std::forward<Ts>(args)...)); }
/**
* Sets the given record field to not-in-record. Equivalent to
* Assign using a nil ValPtr.
* @param field The field index to remove.
*/
void Remove(int field);
/**
* Appends a value to the record's fields. The caller is responsible
* for ensuring that fields are appended in the correct order and