Login  Register

Re: storing the data once it has been parsed

Posted by Luigi Ballabio on Dec 28, 2012; 1:22pm
URL: http://quantlib.414.s1.nabble.com/storing-the-data-once-it-has-been-parsed-tp13821p13828.html

Why not simply define a struct and use a map to associate a struct
instance to a key?

Luigi

On Wed, Dec 26, 2012 at 7:02 PM, Pavan Shah <[hidden email]> wrote:

> Hi all,
> I am using boost tokenizer to parse the data from a csv file.
> However, once the data has been parsed, I wish to store each line as a
> record.  For example, lets say one line is as follows:
>
> Trade ID, counterparty, currency, tradetype, notional, ..expirydate
> 20            bank A          EUR        Option      100
> 12/26/2012
>
> I want to store this line as a record so that when I want to , I can
> retreive all of these attributes related to a particular trade-id.  Its like
> a lookup table/map but with one key and many mapped values.  I have an
> entire file full of these types of rows.
>
> Is there something in STL or Boost or QuantLib that will allow me to store
> so many attributes that map to one key like a trade-id?
>
> I was thinking about about a multimap.
> any ideas please?
>
> thanks
> Pavan
>
> ------------------------------------------------------------------------------
> LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
> Remotely access PCs and mobile devices and provide instant support
> Improve your efficiency, and focus on delivering more value-add services
> Discover what IT Professionals Know. Rescue delivers
> http://p.sf.net/sfu/logmein_12329d2d
> _______________________________________________
> QuantLib-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/quantlib-users
>

------------------------------------------------------------------------------
Master HTML5, CSS3, ASP.NET, MVC, AJAX, Knockout.js, Web API and
much more. Get web development skills now with LearnDevNow -
350+ hours of step-by-step video tutorials by Microsoft MVPs and experts.
SALE $99.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122812
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users