EXT :Re: [xsde-users] C1061: Blocks nested too deeply

Holzer, Tony (AS) anthony.holzer at ngc.com
Mon Jun 30 09:48:05 EDT 2014


Boris,
Thanks for the quick reply. What is the easiest way to remove the C++ enum interface? In a quick read on custom parsers, looks like I can also not have a parser created for the XML schema type. 

Tony Holzer
Northrop Grumman Aerospace Systems

-----Original Message-----
From: Boris Kolpackov [mailto:boris at codesynthesis.com] 
Sent: Monday, June 30, 2014 2:55 AM
To: Holzer, Tony (AS)
Cc: xsde-users at codesynthesis.com
Subject: EXT :Re: [xsde-users] C1061: Blocks nested too deeply

Hi Tony,

Holzer, Tony (AS) <anthony.holzer at ngc.com> writes:

> Since the enumeration is so large, it quickly hits the Visual Studio 
> compiler limit of 128 nesting levels.

I assume you still want to have the C++ enum interface (rather than, say, represent it as a string). In this case the easiest way forward would be to provide custom parser implementation that avoids this limitation. On how to provide a custom parser, see:

http://www.codesynthesis.com/projects/xsde/documentation/cxx/hybrid/guide/#6.1

The easiest way to actually implement it would be to copy the generated version and tweak it. One way would be to initialize the enum value  ('v'
variable) to some invalid value, say -1, and then break the if-else chain with a check and a return if 'v' is no longer -1.

The major drawback of this approach is that if the enumeration changes, then you need to remember to update the custom parser code.

Boris



More information about the xsde-users mailing list