1. configre/makefiles changes

a) wxBase compilation/installation/dist works, added wxBase.spec
 b) list of files is include by Makefile.in, not embedded into it
 c) configure runs "subconfigures" for samples/demos/utils
2. wxTokenizer class from Gregory Pietsch


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@5761 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2000-01-31 18:26:16 +00:00
parent 8480b297e7
commit 2224580a41
20 changed files with 1897 additions and 3060 deletions

View File

@@ -2,7 +2,7 @@
// Name: tokenzr.h
// Purpose: String tokenizer
// Author: Guilhem Lavaux
// Modified by:
// Modified by: Gregory Pietsch
// Created: 04/22/98
// RCS-ID: $Id$
// Copyright: (c) Guilhem Lavaux
@@ -13,7 +13,7 @@
#define _WX_TOKENZRH
#ifdef __GNUG__
#pragma interface
#pragma interface "tokenzr.h"
#endif
#include "wx/object.h"
@@ -26,7 +26,7 @@ public:
wxStringTokenizer(const wxString& to_tokenize,
const wxString& delims = " \t\r\n",
bool ret_delim = FALSE);
wxStringTokenizer() { m_retdelims = FALSE;}
wxStringTokenizer() { m_retdelims = FALSE; m_pos = 0; }
virtual ~wxStringTokenizer();
int CountTokens() const;
@@ -36,6 +36,9 @@ public:
wxString GetNextToken() { return NextToken(); };
wxString GetString() const { return m_string; }
// One note about GetString -- it returns the string
// remaining after the previous tokens have been removed,
// not the original string
void SetString(const wxString& to_tokenize,
const wxString& delims = " \t\r\n",
@@ -44,14 +47,18 @@ public:
m_string = to_tokenize;
m_delims = delims;
m_retdelims = ret_delim;
m_pos = 0;
}
protected:
off_t FindDelims(const wxString& str, const wxString& delims) const;
void EatLeadingDelims();
// Here's the desired function. It returns the position
// of the next token in the original string by keeping track
// of everything that's been deleted by GetNextToken.
wxUint32 GetPosition() { return m_pos; }
protected:
wxString m_string, m_delims;
bool m_retdelims;
wxUint32 m_pos; // the position
};
#endif // _WX_TOKENZRH