/*******************************************************************************
** Copyright (c) 1992-2025 MAK Technologies, Inc
** All rights reserved.
*******************************************************************************/
//! \file enumeratedDatatypeNode.h
//! \ingroup omtReader
#pragma once



#include "omtNode.h"

#include <vlutil/vlString.h>

#include <list>
#include <iterator>
#ifdef DtUSE_UTILITIES_NAMESPACE
namespace DtUSE_UTILITIES_NAMESPACE
{
#endif
class DT_DLL_OMTREADER DtEnumerationNode;



class DT_DLL_OMTREADER DtEnumeratedDatatypeNode : public DtOMTNode
{
public:
   static int defaultEnumerationSize;
   
   //! Default Constructor
   DtEnumeratedDatatypeNode();
   
   //! Destructor
   virtual ~DtEnumeratedDatatypeNode();

   //! Copy Constructor
   DtEnumeratedDatatypeNode(const DtEnumeratedDatatypeNode& orig);

   //! Assignment Operator
   DtEnumeratedDatatypeNode& operator=(const DtEnumeratedDatatypeNode& rhs);

   virtual void setDescription(const DtString&);
   virtual const DtString& getDescription() const;
   
   virtual void setRepresentation(const DtString&);
   virtual const DtString& getRepresentation() const;

  virtual void addEnumerationNode(DtEnumerationNode*);

  virtual DtEnumerationNode* getEnumerationNode(const DtString& name);
  virtual DtEnumerationNode* getEnumerationNode(int value);
  virtual std::list<DtEnumerationNode*>::const_iterator getEnumerationNodeList() const;
  virtual std::list<DtEnumerationNode*>::const_iterator getEnumerationNodeEnd() const;
   
  //! The following functions are derivative information from
  //! the information above
  virtual int getExpectedEnumerationSize() const;

   
protected:
    DtString myDescription;
    DtString myRepresentation;
    std::list<DtEnumerationNode*> myEnumerationNodes;
};


#ifdef DtUSE_UTILITIES_NAMESPACE
} // end of namespace DtUSE_UTILITIES_NAMESPACE
#endif
