This file is indexed.

/usr/include/Poco/MongoDB/ResponseMessage.h is in libpoco-dev 1.8.0.1-1ubuntu4.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
//
// ResponseMessage.h
//
// Library: MongoDB
// Package: MongoDB
// Module:  ResponseMessage
//
// Definition of the ResponseMessage class.
//
// Copyright (c) 2012, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier:	BSL-1.0
//


#ifndef MongoDB_ResponseMessage_INCLUDED
#define MongoDB_ResponseMessage_INCLUDED


#include "Poco/MongoDB/MongoDB.h"
#include "Poco/MongoDB/Message.h"
#include "Poco/MongoDB/Document.h"
#include <istream>
#include <cstdlib>


namespace Poco {
namespace MongoDB {


class MongoDB_API ResponseMessage: public Message
	/// This class represents a response (OP_REPLY) from MongoDB.
{
public:
	ResponseMessage();
		/// Creates an empty ResponseMessage.

	virtual ~ResponseMessage();
		/// Destroys the ResponseMessage.

	Int64 cursorID() const;
		/// Returns the cursor ID.

	void clear();
		/// Clears the response.

	std::size_t count() const;
		/// Returns the number of documents in the response.

	Document::Vector& documents();
		/// Returns a vector containing the received documents.

	bool empty() const;
		/// Returns true if the response does not contain any documents.

	bool hasDocuments() const;
		/// Returns true if there is at least one document in the response.

	void read(std::istream& istr);
		/// Reads the response from the stream.

private:
	Int32 _responseFlags;
	Int64 _cursorID;
	Int32 _startingFrom;
	Int32 _numberReturned;
	Document::Vector _documents;
};


//
// inlines
//
inline std::size_t ResponseMessage::count() const
{
	return _documents.size();
}


inline bool ResponseMessage::empty() const
{
	return _documents.size() == 0;
}


inline Int64 ResponseMessage::cursorID() const
{
	return _cursorID;
}


inline Document::Vector& ResponseMessage::documents()
{
	return _documents;
}


inline bool ResponseMessage::hasDocuments() const
{
	return _documents.size() > 0;
}


} } // namespace Poco::MongoDB


#endif // MongoDB_ResponseMessage_INCLUDED