SML::USERDATA Class Reference

A class which can be used to hang USERDATA off an SML::STRING or SML::SYMBOL. More...

#include <sml/userdata.h>

List of all members.

Public Types

enum  TAG {
  TAG_NONE = 0, TAG_TABLE = 1, TAG_FIELD = 2, TAG_REGEXP = 3,
  TAG_FirstUserTag = 1000, TAG_BIGNUMBER = 0x7FFFFFF
}

Public Member Functions

 USERDATA (TAG tag)
virtual ~USERDATA ()
TAG GetTag () const

Static Public Member Functions

static TAG AllocTag ()

Detailed Description

A class which can be used to hang USERDATA off an SML::STRING or SML::SYMBOL.

To use, you have to derive a class from SML::USERDATA, Create your own ID in the enum below, and make your constructor call the base class constructor, passing in your id.

For MicroImages employees adding derived classes, just use the next available number in the TAG enum. If using TNTsdk, start your numbers at something high like 1024 so there's no chance of conflicting with later additions by MicroImages.


Member Enumeration Documentation

Enumerator:
TAG_NONE 
TAG_TABLE 
TAG_FIELD 
TAG_REGEXP 
TAG_FirstUserTag 

The first tag that AllocTag will return.

TAG_BIGNUMBER 

Make compiler use a long, not a byte.


Constructor & Destructor Documentation

SML::USERDATA::USERDATA ( TAG  tag  )  [inline]
virtual SML::USERDATA::~USERDATA (  )  [inline, virtual]

Member Function Documentation

static TAG SML::USERDATA::AllocTag (  )  [static]

Allocate a tag to use for a user-defined SML::USERDATA Note: You should allocate one and keep it allocated.

unless you need to attach multiple instances of the same type

TAG SML::USERDATA::GetTag (  )  const [inline]

The documentation for this class was generated from the following file:

Generated on Sun Oct 7 21:39:19 2012 for TNTsdk 2012 by  doxygen 1.6.1