mirror of
https://github.com/privacore/open-source-search-engine.git
synced 2025-07-08 01:46:08 -04:00
Remove unused methods
This commit is contained in:
18
Xml.cpp
18
Xml.cpp
@ -21,15 +21,6 @@ Xml::~Xml () {
|
||||
reset();
|
||||
}
|
||||
|
||||
// . for parsing xml conf files
|
||||
bool Xml::getBool ( int32_t n0 , int32_t n1 , char *tagName , bool defaultBool ) {
|
||||
int32_t len;
|
||||
char *s = getTextForXmlTag ( n0 , n1 , tagName , &len , true );
|
||||
if ( s ) return atob ( s , len );
|
||||
// return the default if no non-white-space text
|
||||
return defaultBool;
|
||||
}
|
||||
|
||||
// . for parsing xml conf files
|
||||
int32_t Xml::getLong ( int32_t n0 , int32_t n1 , char *tagName , int32_t defaultLong ) {
|
||||
int32_t len;
|
||||
@ -49,15 +40,6 @@ int64_t Xml::getLongLong ( int32_t n0 , int32_t n1 , char *tagName ,
|
||||
return defaultLongLong;
|
||||
}
|
||||
|
||||
// . for parsing xml conf files
|
||||
float Xml::getFloat (int32_t n0 , int32_t n1 , char *tagName,float defaultFloat){
|
||||
int32_t len;
|
||||
char *s = getTextForXmlTag ( n0 , n1 , tagName , &len , false );
|
||||
if ( s ) return atof2 ( s , len );
|
||||
// return the default if no non-white-space text
|
||||
return defaultFloat;
|
||||
}
|
||||
|
||||
char *Xml::getString ( int32_t n0 , int32_t n1 , char *tagName, int32_t *len ,
|
||||
bool skipLeadingSpaces ) const {
|
||||
char *s = getTextForXmlTag ( n0, n1, tagName, len, skipLeadingSpaces );
|
||||
|
12
Xml.h
12
Xml.h
@ -98,27 +98,23 @@ class Xml {
|
||||
// . gets the value of the text field immediately following the tag
|
||||
// . "tagName" is always compound
|
||||
// . only searches nodes in [n0,n1] node range
|
||||
bool getBool ( int32_t n0 , int32_t n1 , char *tagName ,
|
||||
bool defaultBool = 0 );
|
||||
|
||||
int32_t getLong ( int32_t n0 , int32_t n1 , char *tagName ,
|
||||
int32_t defaultLong = 0 );
|
||||
int64_t getLongLong ( int32_t n0 , int32_t n1 , char *tagName ,
|
||||
int64_t defaultLongLong = 0LL );
|
||||
float getFloat ( int32_t n0 , int32_t n1 , char *tagName ,
|
||||
float defaultFloat = 0.0 );
|
||||
|
||||
char *getString ( int32_t n0 , int32_t n1 , char *tagName , int32_t *len ,
|
||||
bool skipLeadingSpaces = true ) const;
|
||||
// for parsing facebook replies:
|
||||
char *getNode ( char *tagName , int32_t *len ) ;
|
||||
// like above routines but we search all nodes
|
||||
bool getBool ( char *tagName, bool defaultBool = false ) {
|
||||
return getBool(0,m_numNodes,tagName,defaultBool); }
|
||||
|
||||
int32_t getLong ( char *tagName, int32_t defaultLong = 0 ) {
|
||||
return getLong(0,m_numNodes,tagName,defaultLong); }
|
||||
int64_t getLongLong (char *tagName, int64_t defaultLongLong = 0LL){
|
||||
return getLongLong(0,m_numNodes,tagName,defaultLongLong); }
|
||||
float getFloat ( char *tagName, float defaultFloat = 0.0 ) {
|
||||
return getFloat(0,m_numNodes,tagName,defaultFloat); }
|
||||
|
||||
char *getString ( char *tagName ,
|
||||
int32_t *len ,
|
||||
bool skipLeadingSpaces = true ) const {
|
||||
|
Reference in New Issue
Block a user