// TypeValue.h

#ifndef _TypeValue_H_
#define _TypeValue_H_

#include "Object.h"

class String;

/**
When an attribute takes System.Object type as an argument, the blob keeps
a type code and a value
*/

const jbyte remotesoft_cormd_TypeValue_SERIALIZATION_TYPE_TYPE = 80; // final static jbyte

const jbyte remotesoft_cormd_TypeValue_SERIALIZATION_TYPE_TAGGED_OBJECT = 81; // final static jbyte

const jbyte remotesoft_cormd_TypeValue_SERIALIZATION_TYPE_ENUM = 85; // final static jbyte

// final 
class TypeValue : public Object
{
    
package: 
    /**
    Enum value. A type name and an integer value is kept in the metadata.
    e.g.,
    .custom instance void MyAttribute::.ctor(object) = ( 01 00 55 20 53 79 73 74 65 6D 2E 52 65 66 6C 65   // ..U System.Refle
    63 74 69 6F 6E 2E 54 79 70 65 41 74 74 72 69 62   // ction.TypeAttrib
    75 74 65 73 01 00 00 00 00 00 )                   // utes......
    */
    jbyte typecode;

    jbyte elemtypecode;

    String enumTypename;

    Object* value;

    TypeValue(jbyte typecode, Object* value);

    TypeValue(jbyte typecode, jbyte elemtypecode, Object* value);

    TypeValue(jbyte typecode, String enumTypename, Object* value);


protected:
    virtual Object* clone();
};

#endif // _TypeValue_H_

