Rename BroString to zeek::String

This commit is contained in:
Tim Wojtulewicz 2020-07-02 14:59:24 -07:00
parent a2bc42dd93
commit 736a3f53d4
58 changed files with 346 additions and 339 deletions

View file

@ -11,7 +11,7 @@
// for each of which we store where the substring starts.
//
//
class BroSubstring : public zeek::BroString {
class BroSubstring : public zeek::String {
public:
typedef std::vector<BroSubstring*> Vec;
@ -22,12 +22,12 @@ public:
//
struct BSSAlign {
BSSAlign(const zeek::BroString* string, int index)
BSSAlign(const zeek::String* string, int index)
{ this->string = string; this->index = index; }
// The other string
//
const zeek::BroString* string;
const zeek::String* string;
// Offset in the string that substring
// starts at, counting from 0.
@ -40,10 +40,10 @@ public:
typedef BSSAlignVec::const_iterator BSSAlignVecCIt;
explicit BroSubstring(const std::string& string)
: zeek::BroString(string), _num(), _new(false) { }
: zeek::String(string), _num(), _new(false) { }
explicit BroSubstring(const zeek::BroString& string)
: zeek::BroString(string), _num(), _new(false) { }
explicit BroSubstring(const zeek::String& string)
: zeek::String(string), _num(), _new(false) { }
BroSubstring(const BroSubstring& bst);
@ -56,7 +56,7 @@ public:
//
bool DoesCover(const BroSubstring* bst) const;
void AddAlignment(const zeek::BroString* string, int index);
void AddAlignment(const zeek::String* string, int index);
const BSSAlignVec& GetAlignments() const { return _aligns; }
unsigned int GetNumAlignments() const { return _aligns.size(); }
@ -71,7 +71,7 @@ public:
static zeek::VectorVal* VecToPolicy(Vec* vec);
static Vec* VecFromPolicy(zeek::VectorVal* vec);
static char* VecToString(Vec* vec);
static zeek::BroString::IdxVec* GetOffsetsVec(const Vec* vec,
static zeek::String::IdxVec* GetOffsetsVec(const Vec* vec,
unsigned int index);
private:
@ -148,6 +148,6 @@ struct SWParams {
// input strings where the string occurs. On error, or if no common
// subsequence exists, an empty vector is returned.
//
extern BroSubstring::Vec* smith_waterman(const zeek::BroString* s1,
const zeek::BroString* s2,
extern BroSubstring::Vec* smith_waterman(const zeek::String* s1,
const zeek::String* s2,
SWParams& params);