B
braratine
Hello,
I have to following issue.
A type is declared based on an enum:
"
enum TpAddressPlan {
P_ADDRESS_PLAN_NOT_PRESENT = 0,
P_ADDRESS_PLAN_UNDEFINED = 1,
P_ADDRESS_PLAN_IP = 2,
P_ADDRESS_PLAN_MULTICAST = 3,
P_ADDRESS_PLAN_UNICAST = 4,
P_ADDRESS_PLAN_E164 = 5,
P_ADDRESS_PLAN_AESA = 6,
P_ADDRESS_PLAN_URL = 7,
P_ADDRESS_PLAN_NSAP = 8,
P_ADDRESS_PLAN_SMTP = 9,
P_ADDRESS_PLAN_MSMAIL = 10,
P_ADDRESS_PLAN_X400 = 11,
P_ADDRESS_PLAN_SIP = 12,
P_ADDRESS_PLAN_ANY = 13,
P_ADDRESS_PLAN_MIN = 14
};
typedef enum TpAddressPlan TpAddressPlan;
"
And a function receive an integer corresponding to the enumeration
member that I must convert into the member to fill a structure member
of the type TpAddressPlan:
"
this->msg.CEType_u.msgreq.CERequest_u.qryreq.userID.Plan =
AddressPlan; // [0-14]
"
How can I assign to AddressPlan the enumeration value, starting from
it's integer value: kind of
???AddressPlan = TpAddressPlan (i)???
Thanks for your help!
I have to following issue.
A type is declared based on an enum:
"
enum TpAddressPlan {
P_ADDRESS_PLAN_NOT_PRESENT = 0,
P_ADDRESS_PLAN_UNDEFINED = 1,
P_ADDRESS_PLAN_IP = 2,
P_ADDRESS_PLAN_MULTICAST = 3,
P_ADDRESS_PLAN_UNICAST = 4,
P_ADDRESS_PLAN_E164 = 5,
P_ADDRESS_PLAN_AESA = 6,
P_ADDRESS_PLAN_URL = 7,
P_ADDRESS_PLAN_NSAP = 8,
P_ADDRESS_PLAN_SMTP = 9,
P_ADDRESS_PLAN_MSMAIL = 10,
P_ADDRESS_PLAN_X400 = 11,
P_ADDRESS_PLAN_SIP = 12,
P_ADDRESS_PLAN_ANY = 13,
P_ADDRESS_PLAN_MIN = 14
};
typedef enum TpAddressPlan TpAddressPlan;
"
And a function receive an integer corresponding to the enumeration
member that I must convert into the member to fill a structure member
of the type TpAddressPlan:
"
this->msg.CEType_u.msgreq.CERequest_u.qryreq.userID.Plan =
AddressPlan; // [0-14]
"
How can I assign to AddressPlan the enumeration value, starting from
it's integer value: kind of
???AddressPlan = TpAddressPlan (i)???
Thanks for your help!