aboutsummaryrefslogtreecommitdiff
path: root/src/libcmd/installables.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/libcmd/installables.hh')
-rw-r--r--src/libcmd/installables.hh8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/libcmd/installables.hh b/src/libcmd/installables.hh
index d489315df..da6a3addd 100644
--- a/src/libcmd/installables.hh
+++ b/src/libcmd/installables.hh
@@ -103,9 +103,13 @@ struct Installable
return {};
}
+ /* Get a cursor to each value this Installable could refer to. However
+ if none exists, throw exception instead of returning empty vector. */
virtual std::vector<ref<eval_cache::AttrCursor>>
getCursors(EvalState & state);
+ /* Get the first and most preferred cursor this Installable could refer
+ to, or throw an exception if none exists. */
virtual ref<eval_cache::AttrCursor>
getCursor(EvalState & state);
@@ -193,8 +197,8 @@ struct InstallableFlake : InstallableValue
std::pair<Value *, PosIdx> toValue(EvalState & state) override;
- /* Get a cursor to every attrpath in getActualAttrPaths() that
- exists. */
+ /* Get a cursor to every attrpath in getActualAttrPaths()
+ that exists. However if none exists, throw an exception. */
std::vector<ref<eval_cache::AttrCursor>>
getCursors(EvalState & state) override;