# synfig::CanvasParser Class Reference

`#include <loadcanvas.h>`

List of all members.

## Public Member Functions

| CanvasParser ()
CanvasParser & | set_allow_errors (bool x)
CanvasParser & | set_max_warnings (int i)
| Sets the maximum number of warnings before a fatal error is thrown.
int | get_max_warnings ()
| Returns the maximum number of warnings before a fatal_error is thrown.
int | error_count () const
| Returns the number of errors in the last parse.
int | warning_count () const
| Returns the number of warnings in the last parse.
void | set_path (const synfig::String &x)
const synfig::String & | get_path () const
const synfig::String & | get_errors_text () const
const synfig::String & | get_warnings_text () const
Canvas::Handle | parse_from_file_as (const String &filename, const String &as, String &errors)

## Static Public Member Functions

static void | register_canvas_in_map (Canvas::Handle canvas, String as)

## Static Public Attributes

static std::set< String > | loading_

## Detailed Description

Todo:
  writeme

## Constructor & Destructor Documentation

synfig::CanvasParser::CanvasParser | ( |  | ) | `[inline]`

## Member Function Documentation

CanvasParser& synfig::CanvasParser::set_allow_errors | ( | bool | x | ) | `[inline]`

Todo:
  writeme

Referenced by synfig::open_canvas_as().

CanvasParser& synfig::CanvasParser::set_max_warnings | ( | int | i | ) | `[inline]`

Sets the maximum number of warnings before a fatal error is thrown.

int synfig::CanvasParser::get_max_warnings | ( |  | ) | `[inline]`

Returns the maximum number of warnings before a fatal_error is thrown.

int synfig::CanvasParser::error_count | ( |  | ) | const`[inline]`

Returns the number of errors in the last parse.

Referenced by synfig::open_canvas_as().

int synfig::CanvasParser::warning_count | ( |  | ) | const`[inline]`

Returns the number of warnings in the last parse.

void synfig::CanvasParser::set_path | ( | const synfig::String & | x | ) | `[inline]`

const synfig::String& synfig::CanvasParser::get_path | ( |  | ) | const`[inline]`

const synfig::String& synfig::CanvasParser::get_errors_text | ( |  | ) | const`[inline]`

Referenced by synfig::open_canvas_as().

const synfig::String& synfig::CanvasParser::get_warnings_text | ( |  | ) | const`[inline]`

Referenced by synfig::open_canvas_as().

void CanvasParser::register_canvas_in_map | ( | Canvas::Handle | canvas,
|  | String | as |
| ) |  |  | `[static]`

References _canvas_file_name_changed(), _remove_from_open_canvas_map(), and synfig::get_open_canvas_map().

Referenced by parse_from_file_as(), and synfig::Canvas::set_file_name().

Canvas::Handle CanvasParser::parse_from_file_as | ( | const String & | filename,
|  | const String & | as,
|  | String & | errors |
| ) |  |  |

Todo:
  writeme

References _, synfig::error(), synfig::get_open_canvas_map(), and register_canvas_in_map().

Referenced by synfig::open_canvas_as().

## Member Data Documentation

std::set< String > CanvasParser::loading_ `[static]`

Referenced by synfig::open_canvas_as().

The documentation for this class was generated from the following files:

- loadcanvas.h
- loadcanvas.cpp