@@ -1323,7 +1323,7 @@ static void RegisterPreIncludedHeaders(cling::Interpreter &clingInterp)
1323
1323
#ifndef R__WIN32
1324
1324
PreIncludes += "#include <cassert>\n";
1325
1325
#endif
1326
- PreIncludes += "using namespace std;\n";
1326
+ PreIncludes += "using namespace std;\n";
1327
1327
clingInterp.declare(PreIncludes);
1328
1328
}
1329
1329
@@ -2683,6 +2683,23 @@ void TCling::AddIncludePath(const char *path)
2683
2683
fInterpreter->AddIncludePath(sPath.Data());
2684
2684
}
2685
2685
2686
+ ////////////////////////////////////////////////////////////////////////////////
2687
+ /// \brief Replaces current list of directories with a single path in which the
2688
+ /// interpreter looks for include files.
2689
+ /// \param[in] path The path to the directory.
2690
+ /// \note Only one path item can be specified at a time, i.e. "path1:path2" is
2691
+ /// \b NOT supported.
2692
+ /// \warning Only the path to the directory should be specified, without
2693
+ /// prepending the \c -I prefix, i.e.
2694
+ /// <tt>gCling->AddIncludePath("/path/to/my/includes")</tt>. If the
2695
+ /// \c -I prefix is used it will be ignored.
2696
+ void TCling::SetIncludePath(const char *path)
2697
+ {
2698
+ R__LOCKGUARD(gInterpreterMutex);
2699
+ fInterpreter->ResetIncludePaths();
2700
+ AddIncludePath(path);
2701
+ }
2702
+
2686
2703
////////////////////////////////////////////////////////////////////////////////
2687
2704
/// Visit all members over members, recursing over base classes.
2688
2705
@@ -3075,14 +3092,6 @@ void TCling::InspectMembers(TMemberInspector& insp, const void* obj,
3075
3092
} // loop over bases
3076
3093
}
3077
3094
3078
- ////////////////////////////////////////////////////////////////////////////////
3079
- /// Check if constructor exited correctly, ie the instance is in a valid state
3080
- /// \return true if there is a compiler instance available, false otherwise
3081
- bool TCling::IsValid() const
3082
- {
3083
- return fInterpreter->getCI() != nullptr;
3084
- }
3085
-
3086
3095
////////////////////////////////////////////////////////////////////////////////
3087
3096
/// Reset the interpreter internal state in case a previous action was not correctly
3088
3097
/// terminated.
0 commit comments