- Documentation
- Reference manual
- Packages
- A C++ interface to SWI-Prolog
- A C++ interface to SWI-Prolog (Version 2)
- Overview of accessing and changing values (version 2)
- Converting PlTerm to native C and C++ types (version 2)
- Unification (version 2)
- Comparison (version 2)
- Analysing compound terms (version 2)
- Miscellaneous (version 2)
- The class PlTerm_string (version 2)
- The class PlCodeList (version 2)
- The class PlCharList (version 2)
- The class PlCompound (version 2)
- The class PlTail (version 2)
- The class PlTermv (version 2)
- The class PlAtom - Supporting Prolog constants (version 2)
- Classes for the recorded database: PlRecord and PlRecordExternalCopy
- Overview of accessing and changing values (version 2)
- A C++ interface to SWI-Prolog (Version 2)
- A C++ interface to SWI-Prolog
2.10.5 Miscellaneous (version 2)
- bool is_null()
t.is_null()
is the same ast.unwrap() == PlTerm::null
- bool not_null()
t.not_null()
is the same ast.unwrap() != PlTerm::null
- bool reset()
t.reset()
is the same ast.unwrap() = PlTerm::null
- bool reset(term_t)
t.reset(x)
is the same ast.unwrap() = x
- int PlTerm::type()
- Yields the actual type of the term as PL_term_type(). Return
values are
PL_VARIABLE
,PL_FLOAT
,PL_INTEGER
,PL_ATOM
,PL_STRING
orPL_TERM
- std::string as_string(PlEncoding enc=EncLocale)
- Returns the string representation of the atom. See PlAtom::as_string() for an explanation of the encodings and caveats about std::string::c_str().
- std::string atomic_as_string(PlEncoding enc=EncLocale)
- As PlTerm::as_string(), but throws an exception if the term isn't atomic (see atomic/1).
- std::string atom_or_string_as_string(PlEncoding enc=EncLocale)
- As PlTerm::as_string(),
but throws an exception if the term isn't an atom or a string.
To avoid very confusing combinations of constructors and therefore
possible undesirable effects a number of subclasses of PlTerm
have been defined that provide constructors for creating special Prolog
terms. These subclasses are defined below.