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

#ifndef ACConstruct_h
#define ACConstruct_h 1

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

#include <string>
#include <map>

class ACConstruct 
{
  //## begin ACConstruct%3BD773C20071.initialDeclarations preserve=yes
  public:
	class Not_Implemented_Yet {};
  //## end ACConstruct%3BD773C20071.initialDeclarations

  public:
    //## Constructors (generated)
      ACConstruct();

      ACConstruct(const ACConstruct &right);

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

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

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

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


    //## Other Operations (specified)
      //## Operation: Insert%3BD774350009
      //	The Insert method places the current ACConstruct into
      //	another ACConstruct.
      virtual void Insert (ACConstruct* pConstruct);
      virtual void Remove (ACConstruct* pConstruct);

      //## Operation: Validate%3BD77442030A
      //	The Validate method recursively decends the KnowlegeBase
      //	to check for validity within the model.
      bool Validate ();

      //## Operation: Create%3BD7778502A7
      //	The Create method creates an instance of a ACConstruct.
      void Create ();

      //## Operation: Install%3BE229A8030B
      //	The Install method creates CLIPS constructs for the
      //	current ACConstruct.
      void Install ();

      //## Operation: Find%3BE23213016F
      //	The Find method selects the ACConstruct that matches
      //	the supplied unique id.
      static ACConstruct* FindByUid (int nUid);

    // Additional Public Declarations
      //## begin ACConstruct%3BD773C20071.public preserve=yes
      //## end ACConstruct%3BD773C20071.public

      //## Attribute: m_comment%3BE366900163
      const std::string GetComment () const;
      void SetComment (std::string value);

      //## Attribute: m_parent%3BE364190314
      ACConstruct* GetParent ();
      void SetParent (ACConstruct* pParent);

      const int GetUid () const;

  protected:
    // Additional Protected Declarations
      static const int GetNextUid();

	  typedef std::map< int, ACConstruct* > UidMap;
      static UidMap c_mapUid;

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

      ACConstruct *m_pParent;
      int m_nUid;
      std::string m_sComment;

      static int c_nNextUid;
};

// Class ACConstruct 

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

inline ACConstruct* ACConstruct::GetParent ()
{
  return m_pParent;
}

inline void ACConstruct::SetParent (ACConstruct* pParent)
{
  m_pParent = pParent;
}

inline const int ACConstruct::GetUid () const
{
  return m_nUid;
}

inline  void ACConstruct::SetComment (std::string value) 
{
  m_sComment = value;
}

inline const std::string ACConstruct::GetComment () const
{
  return m_sComment;
}

inline const int ACConstruct::GetNextUid ()
{
  return c_nNextUid;
}

#endif // ACConstruct_h
