// Assume that this function returns a QueryResult object QueryResult getResult(); QueryResult result = getResult(); int flags = result._resultFlags; // Do something with the flags value if (flags & FLAG1) { // ... } if (flags & FLAG2) { // ... }
// Assume that this function takes a QueryResult object as input void processResult(QueryResult result); QueryResult result = getResult(); result.doSomeOperation(); // Assume that QueryResult has some public methods processResult(result);In this example, we assume that the QueryResult class has some public methods that can be used to process the result. We obtain a QueryResult object and call a method on it, then pass the object to a function that will further process the result. The _resultFlags variable may be used internally by the QueryResult class or its methods.