Ticket #159 (closed defect: worksforme)

Opened 2 years ago

Last modified 2 years ago

Default values in fcds for std::string Fields

Reported by: dirk Assigned to: cneumann
Priority: major Milestone: 2.0 Beta
Component: System Version: 2.0
Keywords: Cc:
Completion:

Description

Currently it's not possible to have default values for std::string Fields in fcds. They are mapped to the following code:

_stField(std::string(This is a string));

I tried adding &quote; to the fcd, but the parser barfed on that.

I see two ways to fix it: hardcode a special case for std::string Fields that adds quotes when producing the code, or make the XML reader accept &quote;.

I'd prefer the former, as it makes writing fcds easier and is more robust/ It just needs to handle empty defaults correctly, but other than that it should be fairly simple to do (I think ;)).

Change History

02/08/07 06:01:51 changed by cneumann

  • status changed from new to closed.
  • resolution set to worksforme.

Please note that the correct entity is " (no "e" at the end). Using that everything works as expected for me.

I admit it makes writing fcds slightly more complicated but IMHO this is really more robust, because if someone wants to use his own FooString fields they don't have to mess with the fcd parser.

02/08/07 08:49:46 changed by dirk

Ack! Thanks for the correction.

I agree to the comment on robustness. We just need to make sure to comment this behavior.