remove dbgdefines.h / debug_filter.cpp

This commit is contained in:
Matt Liberty
2020-02-01 16:16:52 -08:00
parent a231984124
commit 09579b5330
6 changed files with 0 additions and 135 deletions

View File

@@ -1,61 +0,0 @@
///////////////////////////////////////////////////////////////////////////////
// BSD 3-Clause License
//
// Copyright (c) 2019, Nefelus Inc
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// * Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// * Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// * Neither the name of the copyright holder nor the names of its
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
// POSSIBILITY OF SUCH DAMAGE.
#pragma once
#include "ads.h"
#define def_dbg
namespace odb {
//
// Class to filter debug() level messages according to a virtual predicate
// function _pred() by applying getFilteredModuleName() as the
// module_name argument
//
class debugMsgFilter
{
public:
explicit debugMsgFilter(const char* module_name);
const char* getFilteredModuleName();
const char* getModuleName();
virtual bool pred() { return false; }
virtual ~debugMsgFilter() {}
protected:
char _module_name[20];
};
} // namespace odb

View File

@@ -36,8 +36,6 @@
#include <stdlib.h>
#include <string.h>
#include "dbgdefines.h"
#include "block.h"
#include "db1.h"
#include "net.h"

View File

@@ -16,7 +16,6 @@
#include "dbBlockSet.h"
#include "dbMap.h"
#include "dbRtTree.h"
#include "dbgdefines.h"
#include "dbCCSegSet.h"
#include "dbSet.h"
using namespace odb;
@@ -56,5 +55,4 @@ using namespace odb;
%include "dbWireGraph.h"
%include "dbBlockSet.h"
%include "dbRtTree.h"
%include "dbgdefines.h"
%include "dbCCSegSet.h"

View File

@@ -16,7 +16,6 @@
#include "dbBlockSet.h"
#include "dbMap.h"
#include "dbRtTree.h"
#include "dbgdefines.h"
#include "dbCCSegSet.h"
#include "dbSet.h"
#include "dbTypes.h"
@@ -57,6 +56,5 @@ using namespace odb;
%include "dbWireGraph.h"
%include "dbBlockSet.h"
%include "dbRtTree.h"
%include "dbgdefines.h"
%include "dbCCSegSet.h"
%include "wOrder.h"

View File

@@ -5,7 +5,6 @@ add_library(zutil
mem.cpp
parse.cpp
graph.cpp
debug_filter.cpp
poly_decomp.cpp
b100.cpp
)

View File

@@ -1,67 +0,0 @@
///////////////////////////////////////////////////////////////////////////////
// BSD 3-Clause License
//
// Copyright (c) 2019, Nefelus Inc
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// * Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// * Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// * Neither the name of the copyright holder nor the names of its
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
// POSSIBILITY OF SUCH DAMAGE.
#include <string.h>
#include "dbgdefines.h"
#include "logger.h"
namespace odb {
//
// Methods for class debugMsgFilter here.
//
//
// Require module name for constructor.
//
debugMsgFilter::debugMsgFilter(const char* module_name)
{
if (!module_name)
return;
if (strlen(module_name) > 19)
error(0, "Module name %s too long!\n", module_name);
strncpy(_module_name, module_name, 19);
}
const char* debugMsgFilter::getFilteredModuleName()
{
return (pred() ? _module_name : "ABRACADABRA");
}
const char* debugMsgFilter::getModuleName()
{
return _module_name;
}
} // namespace odb