Featured post

c# - Usage of Server Side Controls in MVC Frame work -

i using asp.net 4.0 , mvc 2.0 web application. project requiremrnt have use server side control in application not possibl in noraml case. ideally want use adrotator control , datalist control. i saw few samples , references in codepleax mvc controllib howwver found less useful. can tell how utilize theese controls in asp.net application along mvc. note: please provide functionalities related adrotator , datalist controls not equivalent functionalities thanks in advace. mvc pages not use normal .net solution makes use of normal .net components impossible. a normal .net page use event driven solution call different methods service side mvc use actions , view completly different way handle things. also, mvc not use viewstate normal .net controlls require. found article discussing mixing of normal .net , mvc.

c++ - How to save/serialize compiled regular expression (std::regex) to a file? -


i'm using <regex> visal studio 2010. understand when create regex object it's compiled. there no compile method in other languages , libraries thinks that's how work, right?

i need store large amount of compiled regexes in file chunk of memory block , compiled regex.

i can't figure how this. found in pcre possible it's linux library. there windows [version2 it's 3 years old , use more high-level approach (there isn't c++ wrapper in windows version).

so possible use save std:regex or boost::regex (it's same right?) chunk of memory , reuse later?

or there other simple library windows allows this?

edit: great answers. i'll check if sufficient store regex string , if still slow i'll test , compare old pcre library.

i don't think can done without modifying boost library support it.

i don't know how boost regex library implemented, regex libraries compile things binary blob that's interpreted later series of instructions sort of limited virtual machine.

if boost's regex library implemented in way, serializing relatively easy. @ binary blob somehow , dump disk. existence of posix regex api boost library tells me how it's implemented.

otoh, way implement (and not common way) generating abstract syntax tree regex. means individual pieces of regex represented own objects , objects linked larger structure represented whole regex.

if boost way serialization complex.

this not possible c++, wish happened boost compile constant string regular expressions @ compile time template meta-programming. reason not possible isn't possible iterate on contents of string (even constant string) template.


Comments

Popular posts from this blog

c# - Usage of Server Side Controls in MVC Frame work -

cocoa - Nesting arrays into NSDictionary object (Objective-C) -

ios - Very simple iPhone App crashes on UILabel settext -