// Copyright (C) 2010-2016  MarketFactory, Inc. All Rights Reserved.
//================================================================================
//   This file is auto-generated; DO NOT EDIT!
//================================================================================

#ifndef __MFAPIGEN_SUBSCRIPTIONSTATUS__
#define __MFAPIGEN_SUBSCRIPTIONSTATUS__

#include <iostream>

namespace MFAPI {

struct SubscriptionStatus
{
    enum Type {
    INVALID = 0,
    ENABLED = 1,
    DISABLED = 2,
    ERROR = 3
    };

    static const char* Name;

    static void initializeEnum();
    static void finalizeEnum();

    static bool isValid( unsigned char iv );

    // Convert from an emum to various other things.
    static unsigned char toValue( Type iv );
    static const char* toString( unsigned char iv );
    static unsigned char toIndex( Type );

    // Convert from various other things to an enum.
    static Type fromValue( unsigned char iv );
    static Type fromIndex( unsigned char index );
    static Type fromString( const char* );

private:
    static bool _initialized;
    static const unsigned int _maxValue;
    static const unsigned int _nbValues;

    static const char* _names[4];
    static unsigned char _toIndex[4];
    static Type _fromIndex[4];

};

std::ostream& operator<<( std::ostream& os, SubscriptionStatus::Type en );

} // MFAPI

#endif
// InclKwds: SubscriptionStatus
