QSDK 1.1 Documentation
Main Page | Modules | Class Hierarchy | Alphabetical List | Compound List | File List | Compound Members | File Members | Related Pages

Q::ConceptValue Struct Reference
[Knowledge Base]

#include <Q/q.h>

Inheritance diagram for Q::ConceptValue:

Q::Concept Q::Object Q::ObjectBase List of all members.

Public Member Functions

 ConceptValue (int)
 ConceptValue (double)
 ConceptValue (float)
 ConceptValue (const char *)

Detailed Description

Value concepts are built by ConceptValue. Value concepts are the way to store values in the knowledge database. Values like, 3.7, 46 and "hello world". These examples would be a ConceptValue(float), ConceptValue(int) and ConceptValue(const char*) respectively.

You can use ConceptValue to build facts that store property values. For example, (sea fishcount 3), (bob health 99.2) or (bob slogan "ni!").

ConceptValues are still concepts, so the ConceptValue class contains only constructors. Use methods of Q::Concept to access the value as native datatypes.

An important difference between value concepts and standard concepts is that value concepts are not unique, whereas standard concepts are. This means that any "bob" Concept in the knowledge database is the same thing and any facts about bob or connected to bob are about the same bob. Each value concept is a separate instance. To this end, facts connecting to value concepts are not invertible. So although you can Q::Query(sea, fishcount) to get the ConceptValue 3, you can't Query(fishcount, 3) to find all things with 3 fish in them like a separate (pond fishcount 3).


Constructor & Destructor Documentation

Q::ConceptValue::ConceptValue int   ) 
 

Create a new value concept from an integer.

Q::ConceptValue::ConceptValue double   ) 
 

Create a new value concept from a double.

Q::ConceptValue::ConceptValue float   ) 
 

Create a new value concept from a float.

Q::ConceptValue::ConceptValue const char *   ) 
 

Create a new value concept from a string.

Return to QSDK documentation Contents page. Contact details for support, information and fault-reporting.
Qube Software Limited © 2000-2004