2015-05-04 17:40:56 -07:00
|
|
|
/*
|
|
|
|
* Copyright (C) 2015 The Android Open Source Project
|
|
|
|
*
|
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
* you may not use this file except in compliance with the License.
|
|
|
|
* You may obtain a copy of the License at
|
|
|
|
*
|
|
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
*
|
|
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
* See the License for the specific language governing permissions and
|
|
|
|
* limitations under the License.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef AAPT_DEBUG_H
|
|
|
|
#define AAPT_DEBUG_H
|
|
|
|
|
2015-05-12 20:40:48 -07:00
|
|
|
#include "Resource.h"
|
2015-05-04 17:40:56 -07:00
|
|
|
#include "ResourceTable.h"
|
2016-08-25 12:26:56 -07:00
|
|
|
#include "xml/XmlDom.h"
|
2015-05-04 17:40:56 -07:00
|
|
|
|
2016-01-11 13:10:24 -08:00
|
|
|
// Include for printf-like debugging.
|
|
|
|
#include <iostream>
|
|
|
|
|
2015-05-04 17:40:56 -07:00
|
|
|
namespace aapt {
|
|
|
|
|
2016-02-13 20:26:45 -08:00
|
|
|
struct DebugPrintTableOptions {
|
|
|
|
bool showSources = false;
|
|
|
|
};
|
|
|
|
|
2015-05-04 17:40:56 -07:00
|
|
|
struct Debug {
|
2016-02-13 20:26:45 -08:00
|
|
|
static void printTable(ResourceTable* table, const DebugPrintTableOptions& options = {});
|
2015-08-14 14:26:04 -07:00
|
|
|
static void printStyleGraph(ResourceTable* table,
|
2015-05-12 20:40:48 -07:00
|
|
|
const ResourceName& targetStyle);
|
2016-01-11 13:10:24 -08:00
|
|
|
static void dumpHex(const void* data, size_t len);
|
2016-08-25 12:26:56 -07:00
|
|
|
static void dumpXml(xml::XmlResource* doc);
|
2015-05-04 17:40:56 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace aapt
|
|
|
|
|
|
|
|
#endif // AAPT_DEBUG_H
|