473,387 Members | 1,578 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

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

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.
Jul 19 '05 #1
0 1675

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: KantKwitDansin1 | last post by:
I have a file "a.dat" containing 10^4 32 bit binary numbers. I need to read in these numbers and deterimine if they are prime. The primality part I will have to figure out later, but I was...
2
by: Matt McGonigle | last post by:
Hi all, Please help me out with this. Perhaps it is a dumb question, but I can't seem to make it work. I am doing a file conversion using an unformatted binary file for input and outputting to...
1
by: young_leaf | last post by:
Hi, What is the most efficient way of making a Binary File Reader, which reads binary file on command of other application. The program: a) Read Binary File b) Create a Table of data based on...
68
by: vim | last post by:
hello everybody Plz tell the differance between binary file and ascii file............... Thanks in advance vim
0
by: Norm Nordic | last post by:
I am using Visual Studio 2005 to develop the application and would like to open a binary file that was saved in a Visual Basic 6 application. The binary file contains one record: a user defined...
0
by: wakeup | last post by:
I need read from my .net application a binary file written with VB6. I can get longs and string written with VB6 with .net BinaryReader class ut how can I read vb6 variants? Do you know how variants...
4
by: Hunk | last post by:
Hi I have a binary file which contains records sorted by Identifiers which are strings. The Identifiers are stored in ascending order. I would have to write a routine to give the record given...
7
by: Ludo | last post by:
Hi, I'm working on an open source project and I have a problem with a binary file. When I read the binary file with the program downloaded from sourceforge, I have no problem. However, I'm unable...
13
by: swetha | last post by:
HI Every1, I have a problem in reading a binary file. Actually i want a C program which reads in the data from a file which is in binary format and i want to update values in it. The file...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.