Path: blob/master/thirdparty/graphite/src/inc/debug.h
9906 views
// SPDX-License-Identifier: MIT OR MPL-2.0 OR LGPL-2.1-or-later OR GPL-2.0-or-later1// Copyright 2011, SIL International, All rights reserved.23// debug.h4//5// Created on: 22 Dec 20116// Author: tim78#pragma once910#if !defined GRAPHITE2_NTRACING1112#include <utility>13#include "inc/json.h"14#include "inc/Position.h"1516namespace graphite217{1819class CharInfo;20class Segment;21class Slot;2223typedef std::pair<const Segment * const, const Slot * const> dslot;24struct objectid25{26char name[16];27objectid(const dslot &) throw();28objectid(const Segment * const p) throw();29};303132json & operator << (json & j, const Position &) throw();33json & operator << (json & j, const Rect &) throw();34json & operator << (json & j, const CharInfo &) throw();35json & operator << (json & j, const dslot &) throw();36json & operator << (json & j, const objectid &) throw();37json & operator << (json & j, const telemetry &) throw();38394041inline42json & operator << (json & j, const Position & p) throw()43{44return j << json::flat << json::array << p.x << p.y << json::close;45}464748inline49json & operator << (json & j, const Rect & p) throw()50{51return j << json::flat << json::array << p.bl.x << p.bl.y << p.tr.x << p.tr.y << json::close;52}535455inline56json & operator << (json & j, const objectid & sid) throw()57{58return j << sid.name;59}606162} // namespace graphite26364#endif //!defined GRAPHITE2_NTRACING65666768