//   NOTE: this is a machine generated file--editing not recommended
//
// rfc1155-smi.h - class definitions for ASN.1 module RFC1155-SMI
//
//   This file was generated by snacc on Mon May 25 16:21:56 1998
//   UBC snacc by Mike Sample
//   A couple of enhancements made by IBM European Networking Center

#ifndef _rfc1155_smi_h_
#define _rfc1155_smi_h_


//------------------------------------------------------------------------------
// class declarations:

class IpAddress;
class Counter;
class Gauge;
class TimeTicks;
class Opaque;
class SimpleSyntax;
class NetworkAddress;
class ApplicationSyntax;
class ObjectSyntax;

//------------------------------------------------------------------------------
// class definitions:

/* OBJECT IDENTIFIER */
typedef AsnOid ObjectName;

/* [APPLICATION 0] IMPLICIT OCTET STRING (SIZE (4)) */
class IpAddress: public AsnOcts
{
public:
			IpAddress(): AsnOcts() {}
			IpAddress (const char *str): AsnOcts (str) {}
			IpAddress (const char *str, const size_t len): AsnOcts (str, len) {}
			IpAddress (const AsnOcts &o): AsnOcts (o) {}
  IpAddress		&operator = (const IpAddress &o)	{ ReSet (o); return *this; }
  IpAddress		&operator = (const char *str)	{ ReSet (str); return *this; }
  AsnType		*Clone() const;

  AsnLen		BEnc (BUF_TYPE b);
  void			BDec (BUF_TYPE b, AsnLen &bytesDecoded, ENV_TYPE env);
  int			BEncPdu (BUF_TYPE b, AsnLen &bytesEncoded);
  int			BDecPdu (BUF_TYPE b, AsnLen &bytesDecoded);

};


/* [APPLICATION 1] IMPLICIT INTEGER (0..2147483647) */
class Counter: public AsnInt
{
public:
			Counter(): AsnInt() {}
			Counter (int i): AsnInt (i) {}
  AsnType		*Clone() const;

  AsnLen		BEnc (BUF_TYPE b);
  void			BDec (BUF_TYPE b, AsnLen &bytesDecoded, ENV_TYPE env);
  int			BEncPdu (BUF_TYPE b, AsnLen &bytesEncoded);
  int			BDecPdu (BUF_TYPE b, AsnLen &bytesDecoded);

};


/* [APPLICATION 2] IMPLICIT INTEGER (0..2147483647) */
class Gauge: public AsnInt
{
public:
			Gauge(): AsnInt() {}
			Gauge (int i): AsnInt (i) {}
  AsnType		*Clone() const;

  AsnLen		BEnc (BUF_TYPE b);
  void			BDec (BUF_TYPE b, AsnLen &bytesDecoded, ENV_TYPE env);
  int			BEncPdu (BUF_TYPE b, AsnLen &bytesEncoded);
  int			BDecPdu (BUF_TYPE b, AsnLen &bytesDecoded);

};


/* [APPLICATION 3] IMPLICIT INTEGER (0..2147483647) */
class TimeTicks: public AsnInt
{
public:
			TimeTicks(): AsnInt() {}
			TimeTicks (int i): AsnInt (i) {}
  AsnType		*Clone() const;

  AsnLen		BEnc (BUF_TYPE b);
  void			BDec (BUF_TYPE b, AsnLen &bytesDecoded, ENV_TYPE env);
  int			BEncPdu (BUF_TYPE b, AsnLen &bytesEncoded);
  int			BDecPdu (BUF_TYPE b, AsnLen &bytesDecoded);

};


/* [APPLICATION 4] IMPLICIT OCTET STRING */
class Opaque: public AsnOcts
{
public:
			Opaque(): AsnOcts() {}
			Opaque (const char *str): AsnOcts (str) {}
			Opaque (const char *str, const size_t len): AsnOcts (str, len) {}
			Opaque (const AsnOcts &o): AsnOcts (o) {}
  Opaque		&operator = (const Opaque &o)	{ ReSet (o); return *this; }
  Opaque		&operator = (const char *str)	{ ReSet (str); return *this; }
  AsnType		*Clone() const;

  AsnLen		BEnc (BUF_TYPE b);
  void			BDec (BUF_TYPE b, AsnLen &bytesDecoded, ENV_TYPE env);
  int			BEncPdu (BUF_TYPE b, AsnLen &bytesEncoded);
  int			BDecPdu (BUF_TYPE b, AsnLen &bytesDecoded);

};


class SimpleSyntax: public AsnType
{
public:
  enum ChoiceIdEnum
  {
     numberCid = 0,
     stringCid = 1,
     objectCid = 2,
     emptyCid = 3
  };

  enum ChoiceIdEnum	choiceId;
  union
  {
     AsnInt		*number;
     AsnOcts		*string;
     AsnOid		*object;
     AsnNull		*empty;
  };


			SimpleSyntax();
			SimpleSyntax (const SimpleSyntax &);
			~SimpleSyntax();

  AsnType		*Clone() const;

  SimpleSyntax		&operator = (const SimpleSyntax &);
  AsnLen		BEncContent (BUF_TYPE b);
  void			BDecContent (BUF_TYPE b, AsnTag tag, AsnLen elmtLen, AsnLen &bytesDecoded, ENV_TYPE env);
  AsnLen		BEnc (BUF_TYPE b);
  void			BDec (BUF_TYPE b, AsnLen &bytesDecoded, ENV_TYPE env);
  int			BEncPdu (BUF_TYPE b, AsnLen &bytesEncoded);
  int			BDecPdu (BUF_TYPE b, AsnLen &bytesDecoded);

  void			Print (ostream &os) const;
};


class NetworkAddress: public AsnType
{
public:
  enum ChoiceIdEnum
  {
     internetCid = 0
  };

  enum ChoiceIdEnum	choiceId;
  union
  {
     IpAddress		*internet;
  };


			NetworkAddress();
			NetworkAddress (const NetworkAddress &);
			~NetworkAddress();

  AsnType		*Clone() const;

  NetworkAddress		&operator = (const NetworkAddress &);
  AsnLen		BEncContent (BUF_TYPE b);
  void			BDecContent (BUF_TYPE b, AsnTag tag, AsnLen elmtLen, AsnLen &bytesDecoded, ENV_TYPE env);
  AsnLen		BEnc (BUF_TYPE b);
  void			BDec (BUF_TYPE b, AsnLen &bytesDecoded, ENV_TYPE env);
  int			BEncPdu (BUF_TYPE b, AsnLen &bytesEncoded);
  int			BDecPdu (BUF_TYPE b, AsnLen &bytesDecoded);

  void			Print (ostream &os) const;
};


class ApplicationSyntax: public AsnType
{
public:
  enum ChoiceIdEnum
  {
     addressCid = 0,
     counterCid = 1,
     gaugeCid = 2,
     ticksCid = 3,
     arbitraryCid = 4
  };

  enum ChoiceIdEnum	choiceId;
  union
  {
     NetworkAddress		*address;
     Counter		*counter;
     Gauge		*gauge;
     TimeTicks		*ticks;
     Opaque		*arbitrary;
  };


			ApplicationSyntax();
			ApplicationSyntax (const ApplicationSyntax &);
			~ApplicationSyntax();

  AsnType		*Clone() const;

  ApplicationSyntax		&operator = (const ApplicationSyntax &);
  AsnLen		BEncContent (BUF_TYPE b);
  void			BDecContent (BUF_TYPE b, AsnTag tag, AsnLen elmtLen, AsnLen &bytesDecoded, ENV_TYPE env);
  AsnLen		BEnc (BUF_TYPE b);
  void			BDec (BUF_TYPE b, AsnLen &bytesDecoded, ENV_TYPE env);
  int			BEncPdu (BUF_TYPE b, AsnLen &bytesEncoded);
  int			BDecPdu (BUF_TYPE b, AsnLen &bytesDecoded);

  void			Print (ostream &os) const;
};


class ObjectSyntax: public AsnType
{
public:
  enum ChoiceIdEnum
  {
     simpleCid = 0,
     application_wideCid = 1
  };

  enum ChoiceIdEnum	choiceId;
  union
  {
     SimpleSyntax		*simple;
     ApplicationSyntax		*application_wide;
  };


			ObjectSyntax();
			ObjectSyntax (const ObjectSyntax &);
			~ObjectSyntax();

  AsnType		*Clone() const;

  ObjectSyntax		&operator = (const ObjectSyntax &);
  AsnLen		BEncContent (BUF_TYPE b);
  void			BDecContent (BUF_TYPE b, AsnTag tag, AsnLen elmtLen, AsnLen &bytesDecoded, ENV_TYPE env);
  AsnLen		BEnc (BUF_TYPE b);
  void			BDec (BUF_TYPE b, AsnLen &bytesDecoded, ENV_TYPE env);
  int			BEncPdu (BUF_TYPE b, AsnLen &bytesEncoded);
  int			BDecPdu (BUF_TYPE b, AsnLen &bytesDecoded);

  void			Print (ostream &os) const;
};


//------------------------------------------------------------------------------
// externs for value defs

extern const AsnOid internet;
extern const AsnOid directory;
extern const AsnOid mgmt;
extern const AsnOid experimental;
extern const AsnOid private1;
extern const AsnOid enterprises;
//------------------------------------------------------------------------------

#endif /* conditional include of rfc1155-smi.h */
