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.
 
static const chargetDefaultFileExtension (IO_MODE ioMode)
 Get the default file extension Register your own TreeNode type here.
 
static IO_MODE getModeFromExtension (const char *fileName)
 Returns the mode that fits to file's extension (using getDefaultFileExtension);.
 
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)
 

Static Public Attributes

static const charIO_MODE_TOKENS []
 Tokens for IO modes: Add additional IO modes in the .cpp file.
 

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.

References mlrange_cast().

◆ 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.

References mlrange_cast().

◆ 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: