diff options
Diffstat (limited to 'src/mongo/scripting/mozjs/implscope.h')
-rw-r--r-- | src/mongo/scripting/mozjs/implscope.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/mongo/scripting/mozjs/implscope.h b/src/mongo/scripting/mozjs/implscope.h index 8ae4c6ab3d5..cba83cba184 100644 --- a/src/mongo/scripting/mozjs/implscope.h +++ b/src/mongo/scripting/mozjs/implscope.h @@ -60,6 +60,7 @@ #include "mongo/scripting/mozjs/oid.h" #include "mongo/scripting/mozjs/regexp.h" #include "mongo/scripting/mozjs/session.h" +#include "mongo/scripting/mozjs/status.h" #include "mongo/scripting/mozjs/timestamp.h" #include "mongo/scripting/mozjs/uri.h" #include "mongo/stdx/unordered_set.h" @@ -294,6 +295,12 @@ public: } template <typename T> + typename std::enable_if<std::is_same<T, MongoStatusInfo>::value, WrapType<T>&>::type + getProto() { + return _statusProto; + } + + template <typename T> typename std::enable_if<std::is_same<T, TimestampInfo>::value, WrapType<T>&>::type getProto() { return _timestampProto; } @@ -303,6 +310,11 @@ public: return _uriProto; } + template <typename T> + typename std::enable_if<std::is_same<T, GlobalInfo>::value, WrapType<T>&>::type getProto() { + return _globalProto; + } + static const char* const kExecResult; static const char* const kInvokeResult; @@ -444,6 +456,7 @@ private: WrapType<OIDInfo> _oidProto; WrapType<RegExpInfo> _regExpProto; WrapType<SessionInfo> _sessionProto; + WrapType<MongoStatusInfo> _statusProto; WrapType<TimestampInfo> _timestampProto; WrapType<URIInfo> _uriProto; }; |