mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-09-30 11:44:32 +03:00
Refactoring: Create class Collection to hold collection properties
This commit is contained in:
@@ -29,6 +29,7 @@
|
||||
|
||||
#include "modsecurity/transaction/variables.h"
|
||||
#include "modsecurity/transaction/variable.h"
|
||||
#include "modsecurity/transaction/collection.h"
|
||||
|
||||
#ifndef HEADERS_MODSECURITY_TRANSACTION_COLLECTIONS_H_
|
||||
#define HEADERS_MODSECURITY_TRANSACTION_COLLECTIONS_H_
|
||||
@@ -42,11 +43,12 @@ namespace ModSecurity {
|
||||
namespace transaction {
|
||||
|
||||
class Collections :
|
||||
public std::unordered_map<std::string, transaction::Variables *> {
|
||||
public std::unordered_map<std::string, Collection *> {
|
||||
public:
|
||||
Collections();
|
||||
~Collections();
|
||||
|
||||
void init(const std::string& name, const std::string& key);
|
||||
void store(std::string key, std::string value);
|
||||
void storeOrUpdateFirst(const std::string& collectionName,
|
||||
const std::string& variableName,
|
||||
@@ -62,7 +64,6 @@ class Collections :
|
||||
std::list<transaction::Variable *> *l);
|
||||
std::list<transaction::Variable *> *resolve(const std::string& var);
|
||||
|
||||
|
||||
/**
|
||||
* This is a special collection to host the transaction variables.
|
||||
*
|
||||
|
Reference in New Issue
Block a user