dboo::version_handler::removed_member

void removed_member(const char* old_name, const member_cvt_base* cvt); // 1)
n/a

Adds a converter that maps an old field into any other field in the class. The converter must be of the type member_cvt<Class, OldMemberType>. The object passed in as dst in the converter is the object CONTAINING the member with the name old_name and not another member in that object. This is in contrast to the function retype_member() which will pass in the member field with the same name as the member found in the input stream. By using removed_member() you can move the old field’s contents to other members in the containing object. If there is a member with the same name as old_name in the current version of the class, when reading the version to which this version_handler manages, the new member will be ignored and the converter will be called instead. Note that if you don’t care about a removed member, there is no need to use a converter for it. If there is no version_handler installed and a member found in the stream but not in the run time, it is simply ignored with just a warning message in the log.

1

Adds a converter that maps an old field into any other field in the

class

Parameters

old_name

The member’s old name.

cvt

A converter object.

Example