Main Page | Alphabetical List | Compound List | File List | Compound Members | File Members

CSemanticConcept Class Reference

Semantic Concept. More...

#include <concept.h>

Collaboration diagram for CSemanticConcept:

Collaboration graph
[legend]
List of all members.

Public Member Functions

bool Load (FILE *a_fp, CTextIDMap &a_idMap)
 Loads the concept from an open file.

bool Save (FILE *a_fp)
 Saves the concept to an open file.

std::string GetName () const
 Gets the concept name.

bool FindPathTo (const SemanticID a_dstID, CFindPathConfig &a_config)
 Finds all paths to a particular destination concept.

SemanticID GetID () const
 Gets the concept ID.

void AddLink (CSemanticLink *a_link, const RelationType a_relation)
 Adds a forward link to another concept.

CLinkMapGetLinks (const RelationType a_relation)
 Gets a link map for a particular type of forward relation.

void AddBackwardLink (CSemanticLink *a_link, const RelationType a_relation)
 Adds a backward link to another concept.

CLinkMapGetBackwardLinks (const RelationType a_relation)
 Gets a backward link map for a particular relation type.

 CSemanticConcept (const std::string &a_name, CSemanticIDGenerator *a_idGen, CTextIDMap *a_idMap)
 Constructor.

 ~CSemanticConcept ()
 Destructor.


Private Member Functions

void p_InitForwardLinks ()
 Initializes the forward links data structure.

void p_InitBackwardLinks ()
 Initializes the backward links data structure.


Private Attributes

const std::string * m_textualName
 Textual name for this concept.

SemanticID m_conceptID
 Numeric ID for this concept.

CLinkMap ** m_forwardLinks
 Forward links.

CLinkMap ** m_backwardLinks
 Backward links.


Detailed Description

Semantic Concept.

Definition at line 34 of file concept.h.


Constructor & Destructor Documentation

CSemanticConcept::CSemanticConcept const std::string &  a_name,
CSemanticIDGenerator a_idGen,
CTextIDMap a_idMap
[inline]
 

Constructor.

Definition at line 180 of file concept.h.

References CSemanticIDGenerator::Get(), m_backwardLinks, m_conceptID, m_forwardLinks, m_textualName, and CTextIDMap::Store().

Here is the call graph for this function:

CSemanticConcept::~CSemanticConcept  )  [inline]
 

Destructor.

Definition at line 203 of file concept.h.

References m_backwardLinks, m_forwardLinks, and MAX_RELATIONS.


Member Function Documentation

void CSemanticConcept::AddBackwardLink CSemanticLink a_link,
const RelationType  a_relation
[inline]
 

Adds a backward link to another concept.

Definition at line 150 of file concept.h.

References m_backwardLinks, p_InitBackwardLinks(), and CLinkMap::Store().

Referenced by CPredicateDecoder::DecodePredicateText(), and CSemanticLink::Load().

Here is the call graph for this function:

void CSemanticConcept::AddLink CSemanticLink a_link,
const RelationType  a_relation
[inline]
 

Adds a forward link to another concept.

Definition at line 121 of file concept.h.

References m_forwardLinks, p_InitForwardLinks(), and CLinkMap::Store().

Referenced by CPredicateDecoder::DecodePredicateText(), and CSemanticLink::Load().

Here is the call graph for this function:

bool CSemanticConcept::FindPathTo const SemanticID  a_dstID,
CFindPathConfig a_config
 

Finds all paths to a particular destination concept.

Definition at line 24 of file concept.cpp.

References DPRINT, GetID(), CFindPathConfig::LeaveNode(), m_forwardLinks, m_textualName, MAX_RELATIONS, and CFindPathConfig::VisitNode().

Referenced by COMCSNet::FindPathFromA_To_B().

Here is the call graph for this function:

CLinkMap* CSemanticConcept::GetBackwardLinks const RelationType  a_relation  )  [inline]
 

Gets a backward link map for a particular relation type.

Definition at line 168 of file concept.h.

References m_backwardLinks.

Referenced by COMCSNet::p_AnalogousProcessLink().

SemanticID CSemanticConcept::GetID  )  const [inline]
 

Gets the concept ID.

Definition at line 115 of file concept.h.

References m_conceptID, and SemanticID.

Referenced by CPredicateDecoder::DecodePredicateText(), COMCSNet::FindContext(), COMCSNet::FindPathFromA_To_B(), CSemanticLink::FindPathTo(), FindPathTo(), CSemanticLink::SetDest(), CSemanticLink::SetSource(), and CConceptMap::Store().

CLinkMap* CSemanticConcept::GetLinks const RelationType  a_relation  )  [inline]
 

Gets a link map for a particular type of forward relation.

Definition at line 139 of file concept.h.

References m_forwardLinks.

Referenced by COMCSNet::FindAnalogous(), and COMCSNet::FindContext().

std::string CSemanticConcept::GetName  )  const [inline]
 

Gets the concept name.

Definition at line 100 of file concept.h.

References m_textualName.

Referenced by COMCSNet::LookupString(), and COMCSNet::p_AnalogousProcessBackwardLink().

bool CSemanticConcept::Load FILE *  a_fp,
CTextIDMap a_idMap
[inline]
 

Loads the concept from an open file.

Definition at line 38 of file concept.h.

References m_conceptID, m_textualName, SemanticID, and CTextIDMap::Store().

Referenced by CConceptMap::Load().

Here is the call graph for this function:

void CSemanticConcept::p_InitBackwardLinks  )  [inline, private]
 

Initializes the backward links data structure.

Definition at line 248 of file concept.h.

References m_backwardLinks, and MAX_RELATIONS.

Referenced by AddBackwardLink().

void CSemanticConcept::p_InitForwardLinks  )  [inline, private]
 

Initializes the forward links data structure.

Definition at line 237 of file concept.h.

References m_forwardLinks, and MAX_RELATIONS.

Referenced by AddLink().

bool CSemanticConcept::Save FILE *  a_fp  )  [inline]
 

Saves the concept to an open file.

Definition at line 78 of file concept.h.

References m_conceptID, m_textualName, and SemanticID.


Member Data Documentation

CLinkMap** CSemanticConcept::m_backwardLinks [private]
 

Backward links.

Definition at line 268 of file concept.h.

Referenced by AddBackwardLink(), CSemanticConcept(), GetBackwardLinks(), p_InitBackwardLinks(), and ~CSemanticConcept().

SemanticID CSemanticConcept::m_conceptID [private]
 

Numeric ID for this concept.

Definition at line 262 of file concept.h.

Referenced by CSemanticConcept(), GetID(), Load(), and Save().

CLinkMap** CSemanticConcept::m_forwardLinks [private]
 

Forward links.

Definition at line 265 of file concept.h.

Referenced by AddLink(), CSemanticConcept(), FindPathTo(), GetLinks(), p_InitForwardLinks(), and ~CSemanticConcept().

const std::string* CSemanticConcept::m_textualName [private]
 

Textual name for this concept.

Definition at line 259 of file concept.h.

Referenced by CSemanticConcept(), FindPathTo(), GetName(), Load(), and Save().


The documentation for this class was generated from the following files:
Generated on Tue Sep 16 09:45:14 2003 for OMCSNetCPP by doxygen 1.3.3