summaryrefslogtreecommitdiff
path: root/src/mongo/db/pipeline/document_source.cpp
diff options
context:
space:
mode:
authorMathias Stearn <mathias@10gen.com>2012-06-21 18:10:49 -0400
committerMathias Stearn <mathias@10gen.com>2012-06-29 13:41:23 -0400
commit22ec5a0e0fc388b2226d51b41b1657367f5f1438 (patch)
treec224622799baf97fb4d417b3e7dead14c27e5912 /src/mongo/db/pipeline/document_source.cpp
parenteb7e375dd3c6331f0cc30a42fb6cb86d557b68ac (diff)
downloadmongo-22ec5a0e0fc388b2226d51b41b1657367f5f1438.tar.gz
Convert to unix line endings
Sorry about the huge diff, but it is just line-ending changes so you can skip it
Diffstat (limited to 'src/mongo/db/pipeline/document_source.cpp')
-rwxr-xr-xsrc/mongo/db/pipeline/document_source.cpp172
1 files changed, 86 insertions, 86 deletions
diff --git a/src/mongo/db/pipeline/document_source.cpp b/src/mongo/db/pipeline/document_source.cpp
index 7d5f8355dfa..0f77a90730d 100755
--- a/src/mongo/db/pipeline/document_source.cpp
+++ b/src/mongo/db/pipeline/document_source.cpp
@@ -1,86 +1,86 @@
-/**
-* Copyright (C) 2011 10gen Inc.
-*
-* This program is free software: you can redistribute it and/or modify
-* it under the terms of the GNU Affero General Public License, version 3,
-* as published by the Free Software Foundation.
-*
-* This program is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU Affero General Public License for more details.
-*
-* You should have received a copy of the GNU Affero General Public License
-* along with this program. If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#include "pch.h"
-
-#include "db/pipeline/document_source.h"
-#include "db/pipeline/expression_context.h"
-
-namespace mongo {
-
- DocumentSource::DocumentSource(
- const intrusive_ptr<ExpressionContext> &pCtx):
- pSource(NULL),
- step(-1),
- pExpCtx(pCtx),
- nRowsOut(0) {
- }
-
- DocumentSource::~DocumentSource() {
- }
-
- const char *DocumentSource::getSourceName() const {
- static const char unknown[] = "[UNKNOWN]";
- return unknown;
- }
-
- void DocumentSource::setSource(DocumentSource *pTheSource) {
- verify(!pSource);
- pSource = pTheSource;
- }
-
- bool DocumentSource::coalesce(
- const intrusive_ptr<DocumentSource> &pNextSource) {
- return false;
- }
-
- void DocumentSource::optimize() {
- }
-
- void DocumentSource::manageDependencies(
- const intrusive_ptr<DependencyTracker> &pTracker) {
-#ifdef MONGO_LATER_SERVER_4644
- verify(false); // identify any sources that need this but don't have it
-#endif /* MONGO_LATER_SERVER_4644 */
- }
-
- bool DocumentSource::advance() {
- pExpCtx->checkForInterrupt(); // might not return
- return false;
- }
-
- void DocumentSource::addToBsonArray(
- BSONArrayBuilder *pBuilder, bool explain) const {
- BSONObjBuilder insides;
- sourceToBson(&insides, explain);
-
-/* No statistics at this time
- if (explain) {
- insides.append("nOut", nOut);
- }
-*/
-
- pBuilder->append(insides.done());
- }
-
- void DocumentSource::writeString(stringstream &ss) const {
- BSONArrayBuilder bab;
- addToBsonArray(&bab);
- BSONArray ba(bab.arr());
- ss << ba.toString(/* isArray */true);
- // our toString should use standard string types.....
- }
-}
+/**
+* Copyright (C) 2011 10gen Inc.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Affero General Public License, version 3,
+* as published by the Free Software Foundation.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU Affero General Public License for more details.
+*
+* You should have received a copy of the GNU Affero General Public License
+* along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include "pch.h"
+
+#include "db/pipeline/document_source.h"
+#include "db/pipeline/expression_context.h"
+
+namespace mongo {
+
+ DocumentSource::DocumentSource(
+ const intrusive_ptr<ExpressionContext> &pCtx):
+ pSource(NULL),
+ step(-1),
+ pExpCtx(pCtx),
+ nRowsOut(0) {
+ }
+
+ DocumentSource::~DocumentSource() {
+ }
+
+ const char *DocumentSource::getSourceName() const {
+ static const char unknown[] = "[UNKNOWN]";
+ return unknown;
+ }
+
+ void DocumentSource::setSource(DocumentSource *pTheSource) {
+ verify(!pSource);
+ pSource = pTheSource;
+ }
+
+ bool DocumentSource::coalesce(
+ const intrusive_ptr<DocumentSource> &pNextSource) {
+ return false;
+ }
+
+ void DocumentSource::optimize() {
+ }
+
+ void DocumentSource::manageDependencies(
+ const intrusive_ptr<DependencyTracker> &pTracker) {
+#ifdef MONGO_LATER_SERVER_4644
+ verify(false); // identify any sources that need this but don't have it
+#endif /* MONGO_LATER_SERVER_4644 */
+ }
+
+ bool DocumentSource::advance() {
+ pExpCtx->checkForInterrupt(); // might not return
+ return false;
+ }
+
+ void DocumentSource::addToBsonArray(
+ BSONArrayBuilder *pBuilder, bool explain) const {
+ BSONObjBuilder insides;
+ sourceToBson(&insides, explain);
+
+/* No statistics at this time
+ if (explain) {
+ insides.append("nOut", nOut);
+ }
+*/
+
+ pBuilder->append(insides.done());
+ }
+
+ void DocumentSource::writeString(stringstream &ss) const {
+ BSONArrayBuilder bab;
+ addToBsonArray(&bab);
+ BSONArray ba(bab.arr());
+ ss << ba.toString(/* isArray */true);
+ // our toString should use standard string types.....
+ }
+}