summaryrefslogtreecommitdiff
path: root/src/mongo/db/namespace-inl.h
diff options
context:
space:
mode:
authorAndy Schwerin <Andy Schwerin schwerin@10gen.com>2012-03-07 12:09:42 -0500
committerAndy Schwerin <schwerin@10gen.com>2012-03-23 10:35:31 -0400
commitd67ce1cd31f6ea2e766d5c201ab5430735cbb3b8 (patch)
tree809d2a20ce0489d9f3fb5d390ea3a0f9686c9708 /src/mongo/db/namespace-inl.h
parentf9c8560b866b3b286dc67548cbb82975fd4add46 (diff)
downloadmongo-d67ce1cd31f6ea2e766d5c201ab5430735cbb3b8.tar.gz
SCons refactoring, cleans up building and testing the C++ client.
This patch does the following: 1.) Remove pcre.h dependencies in the C++ client, and remove some other unnecessary dependencies. 2.) Clean up how we build the client from the client source tarball, so it's more like how we build it from the git repo / full source tarball. 3.) Fix up our "scons" so you only have to write "scons ." to build all of our binaries, the binary archive (zip or tgz) and client source archive (zip or tgz). 4.) Fix up SCons aliases "core", "tools", and "all". 5.) Let user specify the name of the client tarball via a SCons command line switch. Resolves SERVER-4231, SERVER-5255.
Diffstat (limited to 'src/mongo/db/namespace-inl.h')
-rw-r--r--src/mongo/db/namespace-inl.h63
1 files changed, 2 insertions, 61 deletions
diff --git a/src/mongo/db/namespace-inl.h b/src/mongo/db/namespace-inl.h
index a621a229546..c18f681e0b9 100644
--- a/src/mongo/db/namespace-inl.h
+++ b/src/mongo/db/namespace-inl.h
@@ -18,7 +18,7 @@
#pragma once
-#include "namespace.h"
+#include "mongo/db/namespace.h"
namespace mongo {
@@ -70,63 +70,4 @@ namespace mongo {
return old + "." + local;
}
- inline IndexDetails& NamespaceDetails::idx(int idxNo, bool missingExpected ) {
- if( idxNo < NIndexesBase ) {
- IndexDetails& id = _indexes[idxNo];
- return id;
- }
- Extra *e = extra();
- if ( ! e ) {
- if ( missingExpected )
- throw MsgAssertionException( 13283 , "Missing Extra" );
- massert(14045, "missing Extra", e);
- }
- int i = idxNo - NIndexesBase;
- if( i >= NIndexesExtra ) {
- e = e->next(this);
- if ( ! e ) {
- if ( missingExpected )
- throw MsgAssertionException( 14823 , "missing extra" );
- massert(14824, "missing Extra", e);
- }
- i -= NIndexesExtra;
- }
- return e->details[i];
- }
-
- inline int NamespaceDetails::idxNo(IndexDetails& idx) {
- IndexIterator i = ii();
- while( i.more() ) {
- if( &i.next() == &idx )
- return i.pos()-1;
- }
- massert( 10349 , "E12000 idxNo fails", false);
- return -1;
- }
-
- inline int NamespaceDetails::findIndexByKeyPattern(const BSONObj& keyPattern) {
- IndexIterator i = ii();
- while( i.more() ) {
- if( i.next().keyPattern() == keyPattern )
- return i.pos()-1;
- }
- return -1;
- }
-
- // @return offset in indexes[]
- inline int NamespaceDetails::findIndexByName(const char *name) {
- IndexIterator i = ii();
- while( i.more() ) {
- if ( strcmp(i.next().info.obj().getStringField("name"),name) == 0 )
- return i.pos()-1;
- }
- return -1;
- }
-
- inline NamespaceDetails::IndexIterator::IndexIterator(NamespaceDetails *_d) {
- d = _d;
- i = 0;
- n = d->nIndexes;
- }
-
-}
+} // namespace mongo