Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

rt::ProgramLoader Class Reference

Loads a robot from a certain type of files. More...

#include <robbase.h>

Inheritance diagram for rt::ProgramLoader:

Inheritance graph
[legend]
List of all members.

Public Methods

virtual ProgramLoader * create (const lrt::String &filename, const Globals &glob)=0
virtual ~ProgramLoader ()
lrt::StringMap< Program::HeaderField > * getHeaders ()
 returns 0 if error. Checks "Language" version.

lrt::Vector< Bank * > * getBanks ()
 returns 0 if error.

virtual bool canLoad (const lrt::String &filename)=0
virtual lrt::String getFormatName ()=0
 returns a one-line format name, preferrably with extension (if applicable).

lrt::String getFileName ()
 Returns the file name from which the program was / will be loaded. If the returned string is empty, means that this loader does not load from any file.

const ErrorHandler * getErrorHandler ()
void setErrorHandler (const ErrorHandler *handler)

Public Attributes

Program * owner

Protected Types

enum  LoadState { lsError = -1, lsNotLoaded = 0, lsHeadersLoaded = 1, lsLoaded = 2 }

Protected Methods

 ProgramLoader (const Globals &glob, const ErrorHandler *handler, const lrt::String &filename)
virtual LoadReturnType loadHeaders ()=0
virtual LoadReturnType load ()=0
bool isLanguageVersionSupported (const lrt::String &language)
 Checks if the given "RCxxx" RoboCom language version string is supported.


Protected Attributes

LoadState state
lrt::Vector< Bank * > * banks
lrt::StringMap< Program::HeaderField > * headers
const Globals & glob
const ErrorHandler * handler
 error handler for load errors.

lrt::String filename
 robot file name.


Detailed Description

Loads a robot from a certain type of files.


Member Enumeration Documentation

enum rt::ProgramLoader::LoadState [protected]
 

Enumeration values:
lsError  tried to load, but got error.
lsNotLoaded  didn't try to load yet.
lsHeadersLoaded  loaded headers successfully.
lsLoaded  loaded whole file successfully.


The documentation for this class was generated from the following files:
This is the RoboTour API documentation version 0.1 • Copyright (C) by Florian Fischer