Main Page | Class Hierarchy | Class List | File List | Class Members | File Members | Related Pages

NewSimulatorFileUtil Class Reference

Provides some helper functions for parsing. More...

#include <new_sim_file_util.h>

Inheritance diagram for NewSimulatorFileUtil:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 NewSimulatorFileUtil ()
 Constructor.
 NewSimulatorFileUtil (GScanner *scanner)
 Constructor with Scanner information.
 ~NewSimulatorFileUtil ()
 Destructor.
bool process_textbuffer (NewSimulatorTextBuffer &buffer)
 Parse a textbuffer.
bool process_textbuffer (SaHpiTextBufferT &text)
 Parse a textbuffer.
bool process_entity (SaHpiEntityPathT &path)
 Parse the entity string.
bool process_hexstring (guint max_len, gchar *str, SaHpiUint8T *hexlist)
 Parse a hex string.

Protected Attributes

GScanner * m_scanner
 Holding the scanner pointer.

Detailed Description

Provides some helper functions for parsing.


Member Function Documentation

bool NewSimulatorFileUtil::process_entity SaHpiEntityPathT &  path  ) 
 

Parse the entity string.

Common function to parse entity string.
The scanner should be on token G_TOKEN_LEFT_CURLY and will be afterwards on token G_TOKEN_RIGHT_CURLY.

Parameters:
path address of entity structure
Returns:
success value

bool NewSimulatorFileUtil::process_hexstring guint  max_len,
gchar *  str,
SaHpiUint8T *  hexlist
 

Parse a hex string.

Common function to parse strings filled with hex values

Parameters:
max_len maximal length of list with the hex values
str string with the values
hexlist list to be filled with the values
Returns:
success value

bool NewSimulatorFileUtil::process_textbuffer SaHpiTextBufferT &  text  ) 
 

Parse a textbuffer.

With another method signature

Parameters:
text Address of a SaHpiTextBufferT structure
Returns:
success of parsing

bool NewSimulatorFileUtil::process_textbuffer NewSimulatorTextBuffer buffer  ) 
 

Parse a textbuffer.

A textbuffer is read from the simulation file and the information is stored inside the class NewSimulatorTextBuffer. The scanner should be on token G_TOKEN_LEFT_CURLY and will be afterwards on token G_TOKEN_RIGHT_CURLY.

Input example:
DataType=3
Language=25
DataLength=9
Data="Chassis 1"

Parameters:
buffer Address of a textbuffer which is filled with the following input values
Returns:
success of parsing


The documentation for this class was generated from the following files:
Generated on Mon Apr 26 14:39:29 2010 for New Simulator by  doxygen 1.4.4