UKS
Universal Knowledge Store
Loading...
Searching...
No Matches
UKS.ThoughtRef Struct Reference

A Thought, or the label of one, passed to a UKS method: uks.AddStatement("Fido", isA, "dog"). Converting a string only remembers the label; the method that receives it looks the label up in its own store, so a label always means a Thought of the store being called. More...

Public Member Functions

override string ToString ()
 The Thought's label, or the label given.
Thought? Find (UKS store)
 The existing Thought, or null for an empty reference or an unknown label. Nothing is created. A Thought from another store is a programming error and throws.

Static Public Member Functions

static implicit operator ThoughtRef (Thought? thought)
 A reference to a Thought.
static implicit operator ThoughtRef (string? label)
 A reference by label, looked up in the store of the method receiving it.

Properties

bool IsEmpty [get]
 True when it names no Thought (null, or an empty label).

Detailed Description

A Thought, or the label of one, passed to a UKS method: uks.AddStatement("Fido", isA, "dog"). Converting a string only remembers the label; the method that receives it looks the label up in its own store, so a label always means a Thought of the store being called.

Pass default, not a bare null, for "no Thought": a null literal could be either a Thought or a string, so the compiler rejects it as ambiguous.


The documentation for this struct was generated from the following file:
  • ThoughtRef.cs