aboutsummaryrefslogtreecommitdiff
path: root/xsde/cxx/serializer/validator.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'xsde/cxx/serializer/validator.cxx')
-rw-r--r--xsde/cxx/serializer/validator.cxx37
1 files changed, 18 insertions, 19 deletions
diff --git a/xsde/cxx/serializer/validator.cxx b/xsde/cxx/serializer/validator.cxx
index 9403437..af4dfd1 100644
--- a/xsde/cxx/serializer/validator.cxx
+++ b/xsde/cxx/serializer/validator.cxx
@@ -25,10 +25,10 @@ namespace CXX
public:
ValidationContext (SemanticGraph::Schema& root,
SemanticGraph::Path const& path,
- CLI::Options const& options,
+ Serializer::options const& ops,
const WarningSet& disabled_warnings,
Boolean& valid_)
- : Context (std::wcerr, root, path, options, 0, 0, 0),
+ : Context (std::wcerr, root, path, ops, 0, 0, 0),
disabled_warnings_ (disabled_warnings),
disabled_warnings_all_ (false),
valid (valid_),
@@ -157,7 +157,7 @@ namespace CXX
return;
if (e.substitutes_p () &&
- !options.value<CLI::generate_polymorphic> () &&
+ !options.generate_polymorphic () &&
!subst_group_warning_issued)
{
subst_group_warning_issued = true;
@@ -242,7 +242,7 @@ namespace CXX
<< "automatically name them"
<< endl;
- if (!options.value<CLI::show_anonymous> ())
+ if (!options.show_anonymous ())
wcerr << t.file ()
<< ": info: use --show-anonymous option to see these "
<< "types" << endl;
@@ -271,7 +271,7 @@ namespace CXX
{
if (traverse_common (e))
{
- if (options.value<CLI::show_anonymous> ())
+ if (options.show_anonymous ())
{
wcerr << e.file () << ":" << e.line () << ":" << e.column ()
<< ": error: element '" << xpath (e) << "' "
@@ -296,7 +296,7 @@ namespace CXX
{
if (traverse_common (a))
{
- if (options.value<CLI::show_anonymous> ())
+ if (options.show_anonymous ())
{
wcerr << a.file () << ":" << a.line () << ":" << a.column ()
<< ": error: attribute '" << xpath (a) << "' "
@@ -362,16 +362,16 @@ namespace CXX
if (!valid)
return;
- if (options.value<CLI::root_element_first> ())
+ if (options.root_element_first ())
{
if (element_ == 0)
element_ = &e;
}
- else if (options.value<CLI::root_element_last> ())
+ else if (options.root_element_last ())
{
element_ = &e;
}
- else if (String name = options.value<CLI::root_element> ())
+ else if (String name = options.root_element ())
{
if (e.name () == name)
element_ = &e;
@@ -400,18 +400,18 @@ namespace CXX
}
Boolean Validator::
- validate (CLI::Options const& options,
+ validate (options const& ops,
SemanticGraph::Schema& root,
SemanticGraph::Path const& path,
Boolean gen_driver,
const WarningSet& disabled_warnings)
{
Boolean valid (true);
- ValidationContext ctx (root, path, options, disabled_warnings, valid);
+ ValidationContext ctx (root, path, ops, disabled_warnings, valid);
//
//
- NarrowString enc (options.value<CLI::char_encoding> ());
+ NarrowString enc (ops.char_encoding ());
if (enc != "utf8" && enc != "iso8859-1")
{
@@ -422,9 +422,9 @@ namespace CXX
//
//
{
- Boolean ref (options.value<CLI::root_element_first> ());
- Boolean rel (options.value<CLI::root_element_last> ());
- Boolean re (options.value<CLI::root_element> ());
+ Boolean ref (ops.root_element_first ());
+ Boolean rel (ops.root_element_last ());
+ Boolean re (ops.root_element ());
if ((ref && rel) || (ref && re) || (rel && re))
{
@@ -439,8 +439,7 @@ namespace CXX
//
//
- if (options.value<CLI::reuse_style_mixin> () &&
- options.value<CLI::reuse_style_none> ())
+ if (ops.reuse_style_mixin () && ops.reuse_style_none ())
{
wcerr << "error: mutually exclusive options specified: "
<< "--reuse-style-mixin and --reuse-style-none"
@@ -451,8 +450,8 @@ namespace CXX
//
//
- if (options.value<CLI::reuse_style_none> () &&
- options.value<CLI::generate_empty_impl> () &&
+ if (ops.reuse_style_none () &&
+ ops.generate_empty_impl () &&
!ctx.is_disabled ("S002"))
{
wcerr << "warning S002: generating sample implementation without "