Skip to content

Commit 565d374

Browse files
committed
Use @file to tell doxygen to document globals, add more doc for BSON() and QUERY()
1 parent 72eb0d5 commit 565d374

File tree

6 files changed

+15
-7
lines changed

6 files changed

+15
-7
lines changed

client/connpool.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* connpool.h */
1+
/** @file connpool.h */
22

33
/**
44
* Copyright (C) 2008 10gen Inc.

client/dbclient.h

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// dbclient.h - connect to a Mongo database as a database, from C++
1+
/** @file dbclient.h - connect to a Mongo database as a database, from C++ */
22

33
/**
44
* Copyright (C) 2008 10gen Inc.
@@ -75,7 +75,7 @@ namespace mongo {
7575
};
7676
#pragma pack()
7777

78-
/** Represents a query. Typically one uses the QUERY(...) macro to construct a query object.
78+
/** Represents a query. Typically one uses the QUERY(...) macro to construct a Query object.
7979
Example:
8080
QUERY( "age" << 33 << "school" << "UCLA" ).sort("name")
8181
*/
@@ -135,6 +135,9 @@ namespace mongo {
135135
Query& where(const char *jscode) { return where(jscode, BSONObj()); }
136136
};
137137

138+
/** Typically one uses the QUERY(...) macro to construct a Query object.
139+
Example: QUERY( "age" << 33 << "school" << "UCLA" )
140+
*/
138141
#define QUERY(x) Query( BSON(x) )
139142

140143
/**

client/gridfs.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// gridfs.h
1+
/** @file gridfs.h */
22

33
#pragma once
44

client/model.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// model.h
1+
/** @file model.h */
22

33
/**
44
* Copyright (C) 2008 10gen Inc.

db/jsobj.h

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* jsobj.h */
1+
/** @file jsobj.h */
22

33
/**
44
BSONObj and its helpers
@@ -732,6 +732,11 @@ namespace mongo {
732732
/** Use BSON macro to build a BSONObj from a stream
733733
e.g.,
734734
BSON( "name" << "joe" << "age" << 33 )
735+
736+
The labels GT, GTE, LT, LTE, NE can be helpful for stream-oriented construction
737+
of a BSONObj, particularly when assembling a Query. For example,
738+
BSON( "a" << GT << 23.4 << NE << 3 << "b" << 2 ) produces the object
739+
{ a: { \$gt: 23.4, \$ne: 3 }, b: 2 }.
735740
*/
736741
#define BSON(x) (( BSONObjBuilder() << x ).obj())
737742

db/json.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// json.h
1+
/** @file json.h */
22

33
/**
44
* Copyright (C) 2008 10gen Inc.

0 commit comments

Comments
 (0)