1
0
mirror of https://github.com/fwbuilder/fwbuilder synced 2026-03-24 04:07:55 +01:00

see #1964 "rename methods printNamedObjectsForPolicy and printObjectGroups"

This commit is contained in:
Vadim Kurland 2011-01-20 14:39:06 -08:00
parent 34630953cc
commit 7adda5f415
4 changed files with 16 additions and 16 deletions

View File

@ -417,8 +417,8 @@ void NATCompiler_asa8::compile()
*/
add( new PrintClearCommands("Clear ACLs" ));
add( new printNamedObjectsForNAT(
"definitions of named objects", named_objects_manager));
add( new createNamedObjectsForNAT(
"create named objects", named_objects_manager));
add( new printObjectGroups(
"definitions of object groups", named_objects_manager));
add( new PrintRule("generate PIX code" ));

View File

@ -271,7 +271,7 @@ bool printObjectGroups::processNext()
return true;
}
void printNamedObjectsCommon::printObjectsForRE(FWObject *re)
void createNamedObjectsCommon::printObjectsForRE(FWObject *re)
{
if (RuleElement::cast(re)!=NULL && RuleElement::cast(re)->isAny()) return;
@ -289,7 +289,7 @@ void printNamedObjectsCommon::printObjectsForRE(FWObject *re)
* at this time, we have decided to not create named objects for
* everything and use them only in cases where it is inevitable.
*/
void printNamedObjectsForPolicy::printObjectsForRE(FWObject *re)
void createNamedObjectsForPolicy::printObjectsForRE(FWObject *re)
{
if (RuleElement::cast(re)!=NULL && RuleElement::cast(re)->isAny()) return;
@ -309,7 +309,7 @@ void printNamedObjectsForPolicy::printObjectsForRE(FWObject *re)
* See #1962, it looks like ASA 8.3 does not support named objects or
* object-groups in place of port specification in access-list commands.
*/
bool printNamedObjectsForPolicy::processNext()
bool createNamedObjectsForPolicy::processNext()
{
slurp();
if (tmp_queue.size()==0) return false;
@ -334,7 +334,7 @@ bool printNamedObjectsForPolicy::processNext()
}
bool printNamedObjectsForNAT::processNext()
bool createNamedObjectsForNAT::processNext()
{
slurp();
if (tmp_queue.size()==0) return false;

View File

@ -171,34 +171,34 @@ public:
virtual bool processNext();
};
class printNamedObjectsCommon : public BasicRuleProcessor
class createNamedObjectsCommon : public BasicRuleProcessor
{
protected:
virtual void printObjectsForRE(libfwbuilder::FWObject *re);
NamedObjectManager *named_objects_manager;
public:
printNamedObjectsCommon(const std::string &n,
createNamedObjectsCommon(const std::string &n,
NamedObjectManager *_m) : BasicRuleProcessor(n)
{
named_objects_manager = _m;
}
};
class printNamedObjectsForPolicy : public printNamedObjectsCommon
class createNamedObjectsForPolicy : public createNamedObjectsCommon
{
protected:
virtual void printObjectsForRE(libfwbuilder::FWObject *re);
public:
printNamedObjectsForPolicy(const std::string &n,
NamedObjectManager *m) : printNamedObjectsCommon(n, m) {}
createNamedObjectsForPolicy(const std::string &n,
NamedObjectManager *m) : createNamedObjectsCommon(n, m) {}
virtual bool processNext();
};
class printNamedObjectsForNAT : public printNamedObjectsCommon
class createNamedObjectsForNAT : public createNamedObjectsCommon
{
public:
printNamedObjectsForNAT(const std::string &n,
NamedObjectManager *m) : printNamedObjectsCommon(n, m) {}
createNamedObjectsForNAT(const std::string &n,
NamedObjectManager *m) : createNamedObjectsCommon(n, m) {}
virtual bool processNext();
};

View File

@ -656,8 +656,8 @@ void PolicyCompiler_pix::compile()
if (XMLTools::version_compare(vers, "8.3")>=0)
{
add( new printNamedObjectsForPolicy(
"definitions of named objects", named_objects_manager));
add( new createNamedObjectsForPolicy(
"create named objects", named_objects_manager));
}
add( new printObjectGroups(