Main Page Namespace List Class Hierarchy Alphabetical List Data Structures File List Namespace Members Data Fields Globals

# ExCFileWriter Class Reference

`#include <ExCFile.h>`

Inheritance diagram for ExCFileWriter:

## Public Methods
| ExCFileWriter ()
| ExCFileWriter (string)
void | setContent (ExCFileData)

## Constructor & Destructor Documentation

ExCFileWriter | ( |  | ) | `[inline]`

| Definition at line 117 of file ExCFile.h.
    00117 : ExCFile () {};

ExCFileWriter | ( | string |  | ) |

| Definition at line 167 of file ExCFile.cpp. References WO.
    00167 : ExCFile (s, WO) {};

## Member Function Documentation

void setContent | ( | ExCFileData |  | ) |

| Definition at line 169 of file ExCFile.cpp. References FILE_BATCH, FILE_COMMAND, FILE_CONSOLE, FILE_INTERFACE, FILE_PARTICULE, FILE_SET, ExCFile::filename, ExCFileDataAction::getAction(), ExCFileDataAction::getCommand(), ExCFileData::getContent(), ExCFile::getOpenMode(), ExCFileData::getType(), and WOA.
    00169                                              {
    00170         ofstream file;
    00171         file.open (filename.data (), getOpenMode (WOA));
    00172         vector<ExCFileDataAction> d = s.getContent();
    00173         vector<ExCFileDataAction>::iterator i = d.begin ();
    00174         string f = "#";
    00175         switch (s.getType ()) {
    00176                 case FILE_BATCH: f += "exec"; break;
    00177                 case FILE_COMMAND: f += "command"; break;
    00178                 case FILE_CONSOLE: f += "console"; break;
    00179                 case FILE_SET: f += "set"; break;
    00180                 case FILE_PARTICULE: f += "particulesystem"; break;
    00181                 case FILE_INTERFACE: f += "interface"; break;
    00182         }
    00183         f += "#";
    00184         file << f << endl;
    00185
    00186         ExCFileDataAction plop;
    00187         while (i != d.end ()) {
    00188                 plop = *i++;
    00189                 file << plop.getAction() << "#" << plop.getCommand() << endl;
    00190         }
    00191         file.close ();
    00192 }

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

- ExCFile.h
- ExCFile.cpp