void getWorkingSetMemberType(const WorkingSetMember& member) { switch(member.value.getType()) { case mongo::NumberInt: std::cout << "Type: int" << std::endl; break; case mongo::String: std::cout << "Type: string" << std::endl; break; // add more cases for each type } }
void modifyWorkingSetMemberValue(WorkingSetMember& member, const mongo::BSONObj newValue) { member.value = newValue; }These examples use the Mongo C++ Driver, so the package/library used is likely the MongoDB C++ Driver.