summaryrefslogtreecommitdiff
path: root/src/mongo/db/pipeline/field_path.h
diff options
context:
space:
mode:
authorU-tellus\cwestin <cwestin@10gen.com>2012-01-30 17:12:51 -0800
committerU-tellus\cwestin <cwestin@10gen.com>2012-02-14 18:02:58 -0800
commit57ea070eb7c129935d9d96e7655dfd4467eef857 (patch)
treeeac2b5e232078b2a7e70632272d5f3f13b6a7b0d /src/mongo/db/pipeline/field_path.h
parent1eaada83e82be3a8c4ef5977f5843f0d7aa3dfc1 (diff)
downloadmongo-57ea070eb7c129935d9d96e7655dfd4467eef857.tar.gz
checkpoint dependency tracker for SERVER-4644
Diffstat (limited to 'src/mongo/db/pipeline/field_path.h')
-rwxr-xr-xsrc/mongo/db/pipeline/field_path.h35
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;
+ }
+
}