#include <value.hh>
|
virtual std::string | showType () const =0 |
|
virtual std::string | typeOf () const =0 |
|
virtual std::string | coerceToString (EvalState &state, const PosIdx &pos, NixStringContext &context, bool copyMore, bool copyToStore) const |
|
virtual bool | operator== (const ExternalValueBase &b) const noexcept |
|
virtual nlohmann::json | printValueAsJSON (EvalState &state, bool strict, NixStringContext &context, bool copyToStore=true) const |
|
virtual void | printValueAsXML (EvalState &state, bool strict, bool location, XMLWriter &doc, NixStringContext &context, PathSet &drvsSeen, const PosIdx pos) const |
|
|
virtual std::ostream & | print (std::ostream &str) const =0 |
|
External values must descend from ExternalValueBase, so that type-agnostic nix functions (e.g. showType) can be implemented
◆ coerceToString()
std::string nix::ExternalValueBase::coerceToString |
( |
EvalState & | state, |
|
|
const PosIdx & | pos, |
|
|
NixStringContext & | context, |
|
|
bool | copyMore, |
|
|
bool | copyToStore ) const |
|
virtual |
Coerce the value to a string. Defaults to uncoercable, i.e. throws an error.
◆ operator==()
Compare to another value of the same type. Defaults to uncomparable, i.e. always false.
◆ print()
virtual std::ostream & nix::ExternalValueBase::print |
( |
std::ostream & | str | ) |
const |
|
protectedpure virtual |
◆ printValueAsJSON()
json nix::ExternalValueBase::printValueAsJSON |
( |
EvalState & | state, |
|
|
bool | strict, |
|
|
NixStringContext & | context, |
|
|
bool | copyToStore = true ) const |
|
virtual |
Print the value as JSON. Defaults to unconvertable, i.e. throws an error
◆ printValueAsXML()
void nix::ExternalValueBase::printValueAsXML |
( |
EvalState & | state, |
|
|
bool | strict, |
|
|
bool | location, |
|
|
XMLWriter & | doc, |
|
|
NixStringContext & | context, |
|
|
PathSet & | drvsSeen, |
|
|
const PosIdx | pos ) const |
|
virtual |
Print the value as XML. Defaults to unevaluated
◆ showType()
virtual std::string nix::ExternalValueBase::showType |
( |
| ) |
const |
|
pure virtual |
Return a simple string describing the type
◆ typeOf()
virtual std::string nix::ExternalValueBase::typeOf |
( |
| ) |
const |
|
pure virtual |
Return a string to be used in builtins.typeOf
The documentation for this class was generated from the following files:
- /home/buildozer/aports/community/nix/src/nix-2.26.3/src/libexpr/value.hh
- /home/buildozer/aports/community/nix/src/nix-2.26.3/src/libexpr/eval.cc
- /home/buildozer/aports/community/nix/src/nix-2.26.3/src/libexpr/value-to-json.cc
- /home/buildozer/aports/community/nix/src/nix-2.26.3/src/libexpr/value-to-xml.cc