Dynamixel  2.9.5
RoadNarrows Robotics Dynamixel Package
ReadLineEntry Class Reference

Public Member Functions

 ReadLineEntry ()
 Default constructor.
 
 ReadLineEntry (const string &strRegEx, ReadLineAppGenFunc_T fnAppGen, void *pAppArg)
 Initialization constructor. More...
 
 ReadLineEntry (const char *sRegEx, ReadLineAppGenFunc_T fnAppGen, void *pAppArg)
 Initialization constructor. More...
 
 ReadLineEntry (const ReadLineEntry &src)
 Copy constructor. More...
 
 ~ReadLineEntry ()
 Default destructor.
 
bool IsValid ()
 Check if entry is valid. More...
 
int GetUid ()
 Get the unique id associated with this entry. More...
 

Protected Attributes

int m_nUid
 unique id
 
RegEx m_regex
 applicatin matching regular expression
 
ReadLineAppGenFunc_T m_fnAppGen
 application-specific generator
 
void * m_pAppArg
 application-specific argument
 

Friends

class ReadLine
 

Detailed Description

Definition at line 105 of file dynashell_readline.h.

Constructor & Destructor Documentation

ReadLineEntry::ReadLineEntry ( const string &  strRegEx,
ReadLineAppGenFunc_T  fnAppGen,
void *  pAppArg 
)

Initialization constructor.

Parameters
strRegExRegular expression applied to current readline buffer state.
fnAppGenApplication-specific generator function.
pAppArgOptional application argument generator function.

Definition at line 92 of file dynashell_readline.cxx.

References ReadLine::NOT_REG.

95 {
97  m_regex = strRegEx;
98  m_fnAppGen = fnAppGen;
99  m_pAppArg = pAppArg;
100 }
RegEx m_regex
applicatin matching regular expression
int m_nUid
unique id
ReadLineAppGenFunc_T m_fnAppGen
application-specific generator
static const int NOT_REG
not registered return value
void * m_pAppArg
application-specific argument
ReadLineEntry::ReadLineEntry ( const char *  sRegEx,
ReadLineAppGenFunc_T  fnAppGen,
void *  pAppArg 
)

Initialization constructor.

Parameters
sRegExRegular expression applied to current readline buffer state.
fnAppGenApplication-specific generator function.
pAppArgOptional application argument generator function.

Definition at line 109 of file dynashell_readline.cxx.

References ReadLine::NOT_REG.

112 {
114  m_regex = sRegEx;
115  m_fnAppGen = fnAppGen;
116  m_pAppArg = pAppArg;
117 }
RegEx m_regex
applicatin matching regular expression
int m_nUid
unique id
ReadLineAppGenFunc_T m_fnAppGen
application-specific generator
static const int NOT_REG
not registered return value
void * m_pAppArg
application-specific argument
ReadLineEntry::ReadLineEntry ( const ReadLineEntry src)

Copy constructor.

Parameters
srcReadLineEntry to copy.

Definition at line 124 of file dynashell_readline.cxx.

References m_fnAppGen, m_nUid, m_pAppArg, and m_regex.

125 {
126  m_nUid = src.m_nUid;
127  m_regex = src.m_regex;
128  m_fnAppGen = src.m_fnAppGen;
129  m_pAppArg = src.m_pAppArg;
130 }
RegEx m_regex
applicatin matching regular expression
int m_nUid
unique id
ReadLineAppGenFunc_T m_fnAppGen
application-specific generator
void * m_pAppArg
application-specific argument

Member Function Documentation

int ReadLineEntry::GetUid ( )
inline

Get the unique id associated with this entry.

Returns
Unique id.

Definition at line 137 of file dynashell_readline.h.

138  {
139  return m_nUid;
140  }
int m_nUid
unique id
bool ReadLineEntry::IsValid ( )
inline

Check if entry is valid.

Returns
Returns true or false.

Definition at line 127 of file dynashell_readline.h.

Referenced by ReadLine::RegisterGenerator().

128  {
129  return m_regex.IsValid();
130  }
RegEx m_regex
applicatin matching regular expression
bool IsValid()
Test if in valid state.

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