Parsing lines in a file

Sean Farrow <[email protected]>
Newsgroups gmane.comp.parsers.spirit.general
Message-ID <HE1PR0501MB257025AA31AC5674869CC4FEC6430@HE1PR0501MB2570.eurprd05.prod.outlook.com>
Hi all,

I have a file that has two kinds of lines:
:function GetTextInRect
:script InsertEmoticon

I have the following structure in which I'd like to parse the information:
struct JawsFunction
{
                wstring Name; //function/script name.
                FunctionType Type;
};

The FunctionType enum is defined as follows:
enum FunctionType
{
                ID_TYPE_FUNCTION, //function.
                ID_TYPE_SCRIPT //script.
};

Using spirit, how do I translate the :script and :function to their enum equivalents,  what is the best way of reading any number of these lines in any order from a file? Finally, how do I parse to the end of the line, excluding the line feed?
Any help appreciated.
Kind regards
Sean.

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot

_______________________________________________
Spirit-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/spirit-general
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.