MongoDB C++ Driver  legacy-1.0.5
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
bson-inl.h
1 
6 /* Copyright 2009 10gen Inc.
7  *
8  * Licensed under the Apache License, Version 2.0 (the "License");
9  * you may not use this file except in compliance with the License.
10  * You may obtain a copy of the License at
11  *
12  * http://www.apache.org/licenses/LICENSE-2.0
13  *
14  * Unless required by applicable law or agreed to in writing, software
15  * distributed under the License is distributed on an "AS IS" BASIS,
16  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17  * See the License for the specific language governing permissions and
18  * limitations under the License.
19  */
20 
21 #pragma once
22 
23 namespace mongo {
24 
25  template<class T>
26  inline BSONObjBuilder& BSONObjBuilderValueStream::operator<<( T value ) {
27  _builder->append(_fieldName, value);
28  _fieldName = StringData();
29  return *_builder;
30  }
31 
32  template<class T> inline
33  BSONObjBuilder& Labeler::operator<<( T value ) {
34  s_->subobj()->append( l_.l_, value );
35  return *s_->_builder;
36  }
37 
38 }
the main MongoDB namespace
Definition: bulk_operation_builder.h:24
BSONObjBuilder & append(const BSONElement &e)
append element to the object we are building
Definition: bsonobjbuilder.h:123