EMA Cons260 decode Data::BlankEnum

Hi

I am puzzled by the EMA example Cons260,here is the code


while ( fl.forth( searchList ) ) // search for a set of matching fids

{

const FieldEntry& fe = fl.getEntry();


cout << "Name: " << fe.getName() << " Value: ";


if ( fe.getCode() == Data::BlankEnum )

cout << " blank" << endl;

else

switch ( fe.getLoadType() )

{

case DataType::RealEnum:

cout << fe.getReal().getAsDouble() << endl;

break;

case DataType::DateEnum:

cout << (UInt64)fe.getDate().getDay() << " / " << (UInt64)fe.getDate().getMonth() << " / " << (UInt64)fe.getDate().getYear() << endl;

break;

case DataType::TimeEnum:

cout << (UInt64)fe.getTime().getHour() << ":" << (UInt64)fe.getTime().getMinute() << ":" << (UInt64)fe.getTime().getSecond() << ":" << (UInt64)fe.getTime().getMillisecond() << endl;

break;

case DataType::IntEnum:

cout << fe.getInt() << endl;

break;

.....

......


What is Data::BlankEnum? What is the purpose of this line? And what is the cout of RefreshMsg or UpdateMsg which contains the BlankEnum?Is there an example of this type,thanks.

if ( fe.getCode() == Data::BlankEnum )

Tagged:

Best Answer

  • @shenping22975

    Thanks for reaching out to us.

    This is the output of cout of a message that contains blank data.

    1668154514903.png

    All primitive datatype types can be blank. A blank value indicates that no value is currently present and any previously stored or displayed primitive value should be cleared.

    Please feel free to reach out if you have any further questions.