AMLParser Class Reference

This class is a wrapper for the AMLReader class so that AML can be treated on an equal footing with other formats. More...

#include <AMLParser.hpp>

Inherits TranslateCore.

Collaboration diagram for AMLParser:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 AMLParser ()
 Constructor.
UAPNodeXFileToAMLRep (const Str &file_name, UAPNode *uap_root=NULL)
 This is the same as AMLReader::AMLFileToAMLRep.
UAPNodeXFileToXRep (const Str &file_name, UAPNode *uap_root=NULL)
 This is the same as AMLReader::AMLFileToAMLRep.
UAPNodeXRepToAMLRep (UAPNode *x_root, UAPNode *aml_root=NULL)
 This method does nothing.
UAPNodeAMLRepToXFile (UAPNode *aml_root, const Str &file_name="", const Str &out_suffix="", bool one_file=false)
 This is the same as AMLReader::AMLRepToAMLFile.
UAPNodeAMLRepToXRep (UAPNode *aml_root, UAPNode *x_root=NULL)
 This method does nothing.
UAPNodeXRepToXFile (UAPNode *x_root, const Str &file_name="", const Str &out_suffix="", bool one_file=false)
 This is the same as AMLReader::AMLRepToAMLFile.


Detailed Description

This class is a wrapper for the AMLReader class so that AML can be treated on an equal footing with other formats.

Definition at line 35 of file AMLParser.hpp.


Member Function Documentation

UAPNode * AMLParser::AMLRepToXFile ( UAPNode aml_root,
const Str &  file_name = "",
const Str &  out_suffix = "",
bool  one_file = false 
) [virtual]

This is the same as AMLReader::AMLRepToAMLFile.

Parameters:
aml_root May be a <AML_representation> node or a <UAP_root> node.
file_name The root X file to create. If not present or "" then the original file name will be used.
one_file If true then concatinate everything into one file. Default is false.
Returns:
True if everything is OK. False otherwise.

Reimplemented from TranslateCore.

Definition at line 56 of file AMLParser.cpp.

UAPNode * AMLParser::AMLRepToXRep ( UAPNode aml_root,
UAPNode x_root = NULL 
) [virtual]

This method does nothing.

Parameters:
aml_root May be a <AML_representation> node or a <UAP_root> node.
x_root May be a <X_representation> node or a <UAP_root> node, or NULL. If it is a <UAP_root> node then all existing <X_representation> children are deleted. If it is NULL (the default) then, if the aml_root is a <UAP_root> or has a a <UAP_root> parent, a <X_representation> child is created. Otherwise if x_root is NULL a new <X_representation> node is created.
Returns:
X <X_representation> node.

Reimplemented from TranslateCore.

Definition at line 61 of file AMLParser.cpp.

UAPNode * AMLParser::XFileToAMLRep ( const Str &  file_name,
UAPNode uap_root = NULL 
) [virtual]

This is the same as AMLReader::AMLFileToAMLRep.

Parameters:
file_name The root X file to use.
uap_root The root of the UAP tree. If not present then a new tree will be formed with the root called <UAP_Root>,
Returns:
The AML representation subtree root.

Reimplemented from TranslateCore.

Definition at line 38 of file AMLParser.cpp.

UAPNode * AMLParser::XFileToXRep ( const Str &  file_name,
UAPNode uap_root = NULL 
) [virtual]

This is the same as AMLReader::AMLFileToAMLRep.

Parameters:
file_name The root X file to use.
uap_root The root of the subtree (typeically <UAP_Root>)
Returns:
The child of root that is the <_representation>.

Reimplemented from TranslateCore.

Definition at line 45 of file AMLParser.cpp.

UAPNode * AMLParser::XRepToAMLRep ( UAPNode x_root,
UAPNode aml_root = NULL 
) [virtual]

This method does nothing.

Parameters:
x_root May be a <X_representation> node or a <UAP_root> node.
aml_root May be a <AML_representation> node or a <UAP_root> node, or NULL. If it is a <UAP_root> node then all existing <AML_representation> children are deleted. If it is NULL (the default) then, if the x_root is a <UAP_root> or has a a <UAP_root> parent, a <AML_representation> child is created. Otherwise if x_root is NULL a new <AML_representation> node is created.
Returns:
<AML_representation> node.

Reimplemented from TranslateCore.

Definition at line 52 of file AMLParser.cpp.

UAPNode * AMLParser::XRepToXFile ( UAPNode x_root,
const Str &  file_name = "",
const Str &  out_suffix = "",
bool  one_file = false 
) [virtual]

This is the same as AMLReader::AMLRepToAMLFile.

If the argument one_file is set false, then the file names used for each included file are obtained from the href attribute of the <xi:include> node. See the ModifyIncludedFileNames method.

Parameters:
x_root May be a <X_representation> node or a <UAP_root> node.
file_name The root X file to create. If not present or "" then the original file name will be used.
one_file If true then concatinate everything into one file. Default is false.
Returns:
True if everything is OK. False otherwise.

Reimplemented from TranslateCore.

Definition at line 65 of file AMLParser.cpp.


Generated on Fri Feb 12 15:47:57 2010 for Universal Accelerator Parser by  doxygen 1.5.7