diff options
author | U-tellus\cwestin <cwestin@10gen.com> | 2012-01-30 17:12:51 -0800 |
---|---|---|
committer | U-tellus\cwestin <cwestin@10gen.com> | 2012-02-14 18:02:58 -0800 |
commit | 57ea070eb7c129935d9d96e7655dfd4467eef857 (patch) | |
tree | eac2b5e232078b2a7e70632272d5f3f13b6a7b0d /src/mongo/db/pipeline/field_path.h | |
parent | 1eaada83e82be3a8c4ef5977f5843f0d7aa3dfc1 (diff) | |
download | mongo-57ea070eb7c129935d9d96e7655dfd4467eef857.tar.gz |
checkpoint dependency tracker for SERVER-4644
Diffstat (limited to 'src/mongo/db/pipeline/field_path.h')
-rwxr-xr-x | src/mongo/db/pipeline/field_path.h | 35 |
1 files changed, 31 insertions, 4 deletions
diff --git a/src/mongo/db/pipeline/field_path.h b/src/mongo/db/pipeline/field_path.h index d54c2edd1da..618eb283e3e 100755 --- a/src/mongo/db/pipeline/field_path.h +++ b/src/mongo/db/pipeline/field_path.h @@ -24,17 +24,26 @@ namespace mongo { public:
virtual ~FieldPath();
+ /**
+ Constructor.
+
+ @param fieldPath the dotted field path string
+ */
FieldPath(const string &fieldPath);
+
+ /**
+ Constructor.
+ */
FieldPath();
- /*
+ /**
Get the number of path elements in the field path.
@returns the number of path elements
*/
size_t getPathLength() const;
- /*
+ /**
Get a particular path element from the path.
@param i the index of the path element
@@ -42,7 +51,7 @@ namespace mongo { */
string getFieldName(size_t i) const;
- /*
+ /**
Get the full path.
@param fieldPrefix whether or not to include the field prefix
@@ -50,7 +59,7 @@ namespace mongo { */
string getPath(bool fieldPrefix) const;
- /*
+ /**
Write the full path.
@param outStream where to write the path to
@@ -58,8 +67,22 @@ namespace mongo { */
void writePath(ostream &outStream, bool fieldPrefix) const;
+ /**
+ Assignment operator.
+
+ @param rRHS right hand side of the assignment
+ */
FieldPath &operator=(const FieldPath &rRHS);
+ /**
+ Get the prefix string.
+
+ @returns the prefix string
+ */
+ static const char *getPrefix();
+
+ static const char prefix[];
+
private:
vector<string> vFieldName;
};
@@ -78,5 +101,9 @@ namespace mongo { return vFieldName[i];
}
+ inline const char *FieldPath::getPrefix() {
+ return prefix;
+ }
+
}
|