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

xmlsimplemodel.cpp File Reference

Definitions of XmlSimpleModel class methods. More...

#include "xmlsimplemodel.h"

Go to the source code of this file.

Defines

#define SAFE_CALL_EMITTER(_x_)
 Call SAX emitter in a safe way. More...

#define RESET_BUFFER
 Resets (empties) the input buffer. More...

#define CHANGE_STATE(_s_)
 Change the state of the model. More...

#define RESET_STATE   state = StructuralSymbols::None
 Set the state to None.

#define APPEND_ALL_DATA_LENGTH(_gr_, _data_, _length_, _complete_)
#define APPEND_ALL_DATA(_gr_, _data_, _complete_)
#define APPEND_BUFFER_DATA(_gr_, _buffer_, _nrItems_)
#define FINISH_ELEMENT_START(_elementName_)
 Finish the element start SAX event. More...


Detailed Description

Definitions of XmlSimpleModel class methods.

This file contains definitions of XmlSimpleModel class methods.

Definition in file xmlsimplemodel.cpp.


Define Documentation

#define APPEND_ALL_DATA _gr_,
_data_,
_complete_   
 

Value:

{                                                       \
  CHECK_POINTER(_gr_);                                  \
                                                        \
  if (!_data_)                                          \
    return false;                                       \
                                                        \
  for (int _i_ = 0; _data_[_i_]; _i_++)                 \
    _gr_->append((TerminalValue)_data_[_i_]);           \
                                                        \
  if (_complete_)                                       \
    _gr_->append(StructuralSymbols::EndOfBlock);        \
}
Append the data to the right side of the root rule of the grammar. If complete is TRUE, insert also "end of chunk symbol".
Parameters:
_gr_  Grammar.
_data_  Appended data.
_complete_  Indication if the data are complete.

Definition at line 104 of file xmlsimplemodel.cpp.

#define APPEND_ALL_DATA_LENGTH _gr_,
_data_,
_length_,
_complete_   
 

Value:

{                                                                       \
  CHECK_POINTER(_gr_);                                                  \
                                                                        \
  for (int _i_ = 0; _i_ < _length_; _i_++)                              \
    _gr_->append((TerminalValue)_data_[_i_]);                           \
                                                                        \
  if (_complete_)                                                       \
    _gr_->append(StructuralSymbols::EndOfBlock);                        \
}
Append the data of length length to the right side of the root rule of the grammar. If complete is TRUE, insert also "end of chunk symbol".
Parameters:
_gr_  Grammar.
_data_  Appended data.
_length_  Length of the data.
_complete_  Indication if the data are complete.

Definition at line 85 of file xmlsimplemodel.cpp.

#define APPEND_BUFFER_DATA _gr_,
_buffer_,
_nrItems_   
 

Value:

{                                                       \
  for (size_t _i_ = 0; _i_ < _nrItems_; _i_++)          \
    {                                                   \
      _gr_->append(_buffer_[_i_]);                      \
    }                                                   \
}
Append data from buffer to the right side of the root rule of the grammar.
Parameters:
_gr_  Grammar.
_buffer_  Buffer containing data.
_nrItems_  Number of items in the buffer.

Definition at line 126 of file xmlsimplemodel.cpp.

#define CHANGE_STATE _s_   
 

Value:

{                                                               \
  stateChanged = false;                                         \
  if (state != StructuralSymbols::KnownElement &&               \
      (state == StructuralSymbols::None || state == _s_))       \
  {                                                             \
    state = _s_;                                                \
    stateChanged = true;                                        \
  }                                                             \
}
Change the state of the model.

The state is changed only if current state is None.

Parameters:
_s_  The desired state.

Definition at line 62 of file xmlsimplemodel.cpp.

#define FINISH_ELEMENT_START _elementName_   
 

Finish the element start SAX event.

The event can be only emitted if all of the attributes and their values have been read.

Parameters:
_elementName_  The name of the element.

Definition at line 143 of file xmlsimplemodel.cpp.

Referenced by XmlSimpleModel::receiveData.

#define RESET_BUFFER
 

Value:

{                                       \
  buffer[0] = 0;                        \
  bufferLength = 0;                     \
}
Resets (empties) the input buffer.

Definition at line 48 of file xmlsimplemodel.cpp.

Referenced by XmlSimpleModel::receiveData.

#define SAFE_CALL_EMITTER _x_   
 

Value:

if (saxEmitter)                         \
  saxEmitter->_x_;
Call SAX emitter in a safe way.

The methods of the emitter are called only if the emitter exists.

Parameters:
_x_  The name of the called method of the emitter.

Definition at line 42 of file xmlsimplemodel.cpp.


Generated on Wed Feb 5 10:43:04 2003 for Exalt by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002