MeVisLab Toolbox Reference
ml::IOHandler Class Reference

Handles the different possible IO modes. More...

#include <mlIOHandler.h>

Public Types

enum  IO_MODE { IO_MODE_XML , IO_MODE_AUTO , IO_MODE_COUNT }
 Register your parser type here. More...
 

Static Public Member Functions

static TreeNodecreateRootTreeNode (IO_MODE ioMode, TreeNode::ConstructionMode conMode)
 Creates a root node for reading or writing. More...
 
static const char * getDefaultFileExtension (IO_MODE ioMode)
 Get the default file extension Register your own TreeNode type here. More...
 
static IO_MODE getModeFromExtension (const char *fileName)
 Returns the mode that fits to file's extension (using getDefaultFileExtension);. More...
 
static IO_MODE getModeFromContents (const char *fileName)
 Returns the mode that fits to file's contents (only a small part of the file's contents is evaluated) More...
 

Static Public Attributes

static const char * IO_MODE_TOKENS []
 Tokens for IO modes: Add additional IO modes in the .cpp file. More...
 

Detailed Description

Handles the different possible IO modes.

When a new mode is added, it should be registered here. class IOHandler

Definition at line 33 of file mlIOHandler.h.

Member Enumeration Documentation

◆ IO_MODE

Register your parser type here.

Please insert a new type right before IO_MODE_AUTO to minimize confusion with old field values.

Enumerator
IO_MODE_XML 

import/export in XML format

IO_MODE_AUTO 

auto detect format

IO_MODE_COUNT 

counter only

Definition at line 39 of file mlIOHandler.h.

Member Function Documentation

◆ createRootTreeNode()

static TreeNode* ml::IOHandler::createRootTreeNode ( IO_MODE  ioMode,
TreeNode::ConstructionMode  conMode 
)
inlinestatic

Creates a root node for reading or writing.

Returns NULL if the creation failed. Register your own TreeNode type here.

Definition at line 57 of file mlIOHandler.h.

◆ getDefaultFileExtension()

static const char* ml::IOHandler::getDefaultFileExtension ( IO_MODE  ioMode)
inlinestatic

Get the default file extension Register your own TreeNode type here.

Definition at line 76 of file mlIOHandler.h.

◆ getModeFromContents()

static IO_MODE ml::IOHandler::getModeFromContents ( const char *  fileName)
static

Returns the mode that fits to file's contents (only a small part of the file's contents is evaluated)

◆ getModeFromExtension()

static IO_MODE ml::IOHandler::getModeFromExtension ( const char *  fileName)
static

Returns the mode that fits to file's extension (using getDefaultFileExtension);.

Member Data Documentation

◆ IO_MODE_TOKENS

const char* ml::IOHandler::IO_MODE_TOKENS[]
static

Tokens for IO modes: Add additional IO modes in the .cpp file.

Definition at line 53 of file mlIOHandler.h.


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