Func: Add std::string name accessors, deprecate const char* versions

This commit is contained in:
Arne Welzel 2024-03-02 20:54:45 +01:00
parent bf2ba626b1
commit 89127722ea
2 changed files with 22 additions and 17 deletions

View file

@ -123,8 +123,13 @@ public:
Kind GetKind() const { return kind; }
const char* Name() const { return name.c_str(); }
void SetName(const char* arg_name) { name = arg_name; }
[[deprecated("Remove with v8.1 - use GetName() instead")]]
const char* Name() const {
return name.c_str();
}
const std::string& GetName() const { return name; }
void SetName(const std::string& arg_name) { name = arg_name; }
void Describe(ODesc* d) const override = 0;
virtual void DescribeDebug(ODesc* d, const zeek::Args* args) const;