Design question for a C++ application which reads a binary file (IPM format)

V

Vikas

I am working on an application to be written in C++ which has to read
a binary file and parse it to get the data out of it. The file format
is Integrated Product Message (IPM) which contains message type,
elements and sub elements in it.

Now the elements in the file and their value depends on message type
and one element's value may be dependent on whether some other element
is present and what is its value.

For example there can be following kind of rule that the application
have to enforce:

"A sub element 0005 should be present in element 48 with value 10, 15
or 20 for a message type 1600, if the element 23 value is 700."

I am trying to figure out how to enforce these kinds of rules. I want
to keep the rules independent of the elements and perform the
validation in separate class. I want to keep enforcement of rules
flexible as in future new rules may be added or removed for the
message type and its elements. I would like to get an opinion on the
design of this application from you guys.

Thank you for your replies.

Vikas

P.S. Please let me know if this is not an appropriate group for this
kind of question. I will appreciate if you can point me to the right
group.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,043
Latest member
CannalabsCBDReview

Latest Threads

Top