/******************************************************************
** Copyright (C) 2001, University of Alabama in Huntsville. 
** All rights reserved.
**
** File   : CRelationDefinition.h
**
** Author : David Phillips
**
** Description:
**    This file provides definition for the CRelationDefinition
**    class.
**
** History:
**    24-Nov-2001 : David Phillips
**        Created file.
******************************************************************/

//## begin module%1.4%.codegen_version preserve=yes
//   Read the documentation to learn more about C++ code generator
//   versioning.
//## end module%1.4%.codegen_version

//## begin module%3BD773E900F0.cm preserve=no
//	  %X% %Q% %Z% %W%
//## end module%3BD773E900F0.cm

//## begin module%3BD773E900F0.cp preserve=no
//## end module%3BD773E900F0.cp

//## Module: CRelationDefinition%3BD773E900F0; Pseudo Package specification
//## Source file: C:\Documents and Settings\dphillips.PORTABLE\Desktop\CS650\ConGraT\CGEngine\CRelationDefinition.h

#ifndef CRelationDefinition_h
#define CRelationDefinition_h 1

#pragma warning(disable: 4786)  // Disable debug information warning

//## begin module%3BD773E900F0.additionalIncludes preserve=no
//## end module%3BD773E900F0.additionalIncludes

//## begin module%3BD773E900F0.includes preserve=yes
#include <string>
#include <vector>
//## end module%3BD773E900F0.includes

// ACConstruct
#include "CGEngine\ACConstruct.h"
#include "ClipsInterface\Class.h"
//## begin module%3BD773E900F0.additionalDeclarations preserve=yes
//## end module%3BD773E900F0.additionalDeclarations


//## begin CRelationDefinition%3BD773E900F0.preface preserve=yes
//## end CRelationDefinition%3BD773E900F0.preface

//## Class: CRelationDefinition%3BD773E900F0
//	The CRelationDefinition is used to define the base
//	Relation Type within a CG KnowledgeBase.
//## Category: CGEngine%3BD772CB008A
//## Persistence: Transient
//## Cardinality/Multiplicity: n



class CRelationDefinition : public ACConstruct  //## Inherits: <unnamed>%3BE227DD0184
{
  //## begin CRelationDefinition%3BD773E900F0.initialDeclarations preserve=yes
  //## end CRelationDefinition%3BD773E900F0.initialDeclarations
  public:
	  typedef std::vector<CRelationDefinition*> RelationDefVector;

  public:
    //## Constructors (generated)
      CRelationDefinition(std::string name);

      CRelationDefinition(const CRelationDefinition &right);

    //## Destructor (generated)
      ~CRelationDefinition();

    //## Assignment Operation (generated)
      CRelationDefinition & operator=(const CRelationDefinition &right);

    //## Equality Operations (generated)
      int operator==(const CRelationDefinition &right) const;

      int operator!=(const CRelationDefinition &right) const;


    //## Other Operations (specified)
      //## Operation: Add_Lambda_Element%3BE368B5039D
      //	The Add_Lambda_Element stores the supplied Lambda
      //	expression into the CLIPS engine via the CLIPS_Class Add_
      //	Slot interface.
      void AddLambdaElement (std::string String);

      void AddSuperclass (CRelationDefinition *pSuperclass);

	  std::string GetTypeName ();

      const RelationDefVector* GetSuperclassVector () const;
      const RelationDefVector* GetSubclassVector () const;

	  bool IsPrimitive() const;

	  void Commit();
      void Browse();

  protected:
    // Additional Protected Declarations
      //## begin CRelationDefinition%3BD773E900F0.protected preserve=yes
      //## end CRelationDefinition%3BD773E900F0.protected

  private: //## implementation
    // Data Members for Class Attributes

      RelationDefVector m_superclass_vector;
      RelationDefVector m_subclass_vector;
	  bool m_bPrimitive;

	  std::string m_name;

	  CCLPClass *m_clipClass;
};

//## begin CRelationDefinition%3BD773E900F0.postscript preserve=yes
//## end CRelationDefinition%3BD773E900F0.postscript

// Class CRelationDefinition 

//## Get and Set Operations for Class Attributes (inline)

inline const CRelationDefinition::RelationDefVector* CRelationDefinition::GetSuperclassVector () const
{
  return &m_superclass_vector;
}

inline const CRelationDefinition::RelationDefVector* CRelationDefinition::GetSubclassVector () const
{
  return &m_subclass_vector;
}

inline std::string CRelationDefinition::GetTypeName ()
{
	return m_name;
}

inline bool CRelationDefinition::IsPrimitive() const
{
	return m_bPrimitive;
}


#endif
