code
stringlengths 3
1.05M
| repo_name
stringlengths 4
116
| path
stringlengths 3
942
| language
stringclasses 30
values | license
stringclasses 15
values | size
int32 3
1.05M
|
---|---|---|---|---|---|
/*
* Copyright (C) 2009-2012 Felipe Contreras
*
* Author: Felipe Contreras <[email protected]>
*
* This file may be used under the terms of the GNU Lesser General Public
* License version 2.1.
*/
#include "gstav_h264enc.h"
#include "gstav_venc.h"
#include "plugin.h"
#include <libavcodec/avcodec.h>
#include <libavutil/opt.h>
#include <gst/tag/tag.h>
#include <stdlib.h>
#include <string.h> /* for memcpy */
#include <stdbool.h>
#include "util.h"
#define GST_CAT_DEFAULT gstav_debug
struct obj {
struct gst_av_venc parent;
};
struct obj_class {
GstElementClass parent_class;
};
#if LIBAVUTIL_VERSION_MAJOR < 52 && !(LIBAVUTIL_VERSION_MAJOR == 51 && LIBAVUTIL_VERSION_MINOR >= 12)
static int av_opt_set(void *obj, const char *name, const char *val, int search_flags)
{
return av_set_string3(obj, name, val, 0, NULL);
}
#endif
static void init_ctx(struct gst_av_venc *base, AVCodecContext *ctx)
{
av_opt_set(ctx->priv_data, "preset", "medium", 0);
av_opt_set(ctx->priv_data, "profile", "baseline", 0);
av_opt_set(ctx->priv_data, "x264opts", "annexb=1", 0);
av_opt_set_int(ctx->priv_data, "aud", 1, 0);
}
static GstCaps *
generate_src_template(void)
{
GstCaps *caps;
GstStructure *struc;
caps = gst_caps_new_empty();
struc = gst_structure_new("video/x-h264",
"stream-format", G_TYPE_STRING, "byte-stream",
"alignment", G_TYPE_STRING, "au",
NULL);
gst_caps_append_structure(caps, struc);
return caps;
}
static GstCaps *
generate_sink_template(void)
{
GstCaps *caps;
caps = gst_caps_new_simple("video/x-raw-yuv",
"format", GST_TYPE_FOURCC, GST_MAKE_FOURCC('I', '4', '2', '0'),
NULL);
return caps;
}
static void
instance_init(GTypeInstance *instance, void *g_class)
{
struct gst_av_venc *venc = (struct gst_av_venc *)instance;
venc->codec_id = CODEC_ID_H264;
venc->init_ctx = init_ctx;
}
static void
base_init(void *g_class)
{
GstElementClass *element_class = g_class;
GstPadTemplate *template;
gst_element_class_set_details_simple(element_class,
"av h264 video encoder",
"Coder/Encoder/Video",
"H.264 encoder wrapper for libavcodec",
"Felipe Contreras");
template = gst_pad_template_new("src", GST_PAD_SRC,
GST_PAD_ALWAYS,
generate_src_template());
gst_element_class_add_pad_template(element_class, template);
template = gst_pad_template_new("sink", GST_PAD_SINK,
GST_PAD_ALWAYS,
generate_sink_template());
gst_element_class_add_pad_template(element_class, template);
}
GType
gst_av_h264enc_get_type(void)
{
static GType type;
if (G_UNLIKELY(type == 0)) {
GTypeInfo type_info = {
.class_size = sizeof(struct obj_class),
.base_init = base_init,
.instance_size = sizeof(struct obj),
.instance_init = instance_init,
};
type = g_type_register_static(GST_AV_VENC_TYPE, "GstAVH264Enc", &type_info, 0);
}
return type;
}
| felipec/gst-av | gstav_h264enc.c | C | lgpl-2.1 | 2,840 |
/****************************************************************************
**
** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation ([email protected])
**
** This file is part of the Qt Mobility Components.
**
** $QT_BEGIN_LICENSE:LGPL$
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
** contained in the Technology Preview License Agreement accompanying
** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, Nokia gives you certain additional
** rights. These rights are described in the Nokia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** If you have questions regarding the use of this file, please contact
** Nokia at [email protected].
**
**
**
**
**
**
**
**
** $QT_END_LICENSE$
**
****************************************************************************/
#include "qvideowidget_p.h"
#include <qmediaobject.h>
#include <qmediaservice.h>
#include <qvideowindowcontrol.h>
#include <qvideowidgetcontrol.h>
#include <qpaintervideosurface_p.h>
#include <qvideorenderercontrol.h>
#include <qvideosurfaceformat.h>
#include <qpainter.h>
#include <qapplication.h>
#include <qevent.h>
#include <qdialog.h>
#include <qboxlayout.h>
#include <qnamespace.h>
using namespace Qt;
QT_BEGIN_NAMESPACE
QVideoWidgetControlBackend::QVideoWidgetControlBackend(
QMediaService *service, QVideoWidgetControl *control, QWidget *widget)
: m_service(service)
, m_widgetControl(control)
{
connect(control, SIGNAL(brightnessChanged(int)), widget, SLOT(_q_brightnessChanged(int)));
connect(control, SIGNAL(contrastChanged(int)), widget, SLOT(_q_contrastChanged(int)));
connect(control, SIGNAL(hueChanged(int)), widget, SLOT(_q_hueChanged(int)));
connect(control, SIGNAL(saturationChanged(int)), widget, SLOT(_q_saturationChanged(int)));
connect(control, SIGNAL(fullScreenChanged(bool)), widget, SLOT(_q_fullScreenChanged(bool)));
QBoxLayout *layout = new QVBoxLayout;
layout->setMargin(0);
layout->setSpacing(0);
#ifdef Q_OS_SYMBIAN
// On some cases the flag is not reset automatically
// This would lead to viewfinder not being visible on Symbian
control->videoWidget()->setAttribute(Qt::WA_WState_ExplicitShowHide, false);
#endif // Q_OS_SYMBIAN
layout->addWidget(control->videoWidget());
widget->setLayout(layout);
}
void QVideoWidgetControlBackend::releaseControl()
{
m_service->releaseControl(m_widgetControl);
}
void QVideoWidgetControlBackend::setBrightness(int brightness)
{
m_widgetControl->setBrightness(brightness);
}
void QVideoWidgetControlBackend::setContrast(int contrast)
{
m_widgetControl->setContrast(contrast);
}
void QVideoWidgetControlBackend::setHue(int hue)
{
m_widgetControl->setHue(hue);
}
void QVideoWidgetControlBackend::setSaturation(int saturation)
{
m_widgetControl->setSaturation(saturation);
}
void QVideoWidgetControlBackend::setFullScreen(bool fullScreen)
{
m_widgetControl->setFullScreen(fullScreen);
}
Qt::AspectRatioMode QVideoWidgetControlBackend::aspectRatioMode() const
{
return m_widgetControl->aspectRatioMode();
}
void QVideoWidgetControlBackend::setAspectRatioMode(Qt::AspectRatioMode mode)
{
m_widgetControl->setAspectRatioMode(mode);
}
QRendererVideoWidgetBackend::QRendererVideoWidgetBackend(
QMediaService *service, QVideoRendererControl *control, QWidget *widget)
: m_service(service)
, m_rendererControl(control)
, m_widget(widget)
, m_surface(new QPainterVideoSurface)
, m_aspectRatioMode(Qt::KeepAspectRatio)
, m_updatePaintDevice(true)
{
connect(this, SIGNAL(brightnessChanged(int)), m_widget, SLOT(_q_brightnessChanged(int)));
connect(this, SIGNAL(contrastChanged(int)), m_widget, SLOT(_q_contrastChanged(int)));
connect(this, SIGNAL(hueChanged(int)), m_widget, SLOT(_q_hueChanged(int)));
connect(this, SIGNAL(saturationChanged(int)), m_widget, SLOT(_q_saturationChanged(int)));
connect(m_surface, SIGNAL(frameChanged()), this, SLOT(frameChanged()));
connect(m_surface, SIGNAL(surfaceFormatChanged(QVideoSurfaceFormat)),
this, SLOT(formatChanged(QVideoSurfaceFormat)));
m_rendererControl->setSurface(m_surface);
}
QRendererVideoWidgetBackend::~QRendererVideoWidgetBackend()
{
delete m_surface;
}
void QRendererVideoWidgetBackend::releaseControl()
{
m_service->releaseControl(m_rendererControl);
}
void QRendererVideoWidgetBackend::clearSurface()
{
m_rendererControl->setSurface(0);
}
void QRendererVideoWidgetBackend::setBrightness(int brightness)
{
m_surface->setBrightness(brightness);
emit brightnessChanged(brightness);
}
void QRendererVideoWidgetBackend::setContrast(int contrast)
{
m_surface->setContrast(contrast);
emit contrastChanged(contrast);
}
void QRendererVideoWidgetBackend::setHue(int hue)
{
m_surface->setHue(hue);
emit hueChanged(hue);
}
void QRendererVideoWidgetBackend::setSaturation(int saturation)
{
m_surface->setSaturation(saturation);
emit saturationChanged(saturation);
}
Qt::AspectRatioMode QRendererVideoWidgetBackend::aspectRatioMode() const
{
return m_aspectRatioMode;
}
void QRendererVideoWidgetBackend::setAspectRatioMode(Qt::AspectRatioMode mode)
{
m_aspectRatioMode = mode;
m_widget->updateGeometry();
}
void QRendererVideoWidgetBackend::setFullScreen(bool)
{
}
QSize QRendererVideoWidgetBackend::sizeHint() const
{
return m_surface->surfaceFormat().sizeHint();
}
void QRendererVideoWidgetBackend::showEvent()
{
}
void QRendererVideoWidgetBackend::hideEvent(QHideEvent *)
{
#if !defined(QT_NO_OPENGL) && !defined(QT_OPENGL_ES_1_CL) && !defined(QT_OPENGL_ES_1)
m_updatePaintDevice = true;
m_surface->setGLContext(0);
#endif
}
void QRendererVideoWidgetBackend::resizeEvent(QResizeEvent *)
{
updateRects();
}
void QRendererVideoWidgetBackend::moveEvent(QMoveEvent *)
{
}
void QRendererVideoWidgetBackend::paintEvent(QPaintEvent *event)
{
QPainter painter(m_widget);
if (m_widget->testAttribute(Qt::WA_OpaquePaintEvent)) {
QRegion borderRegion = event->region();
borderRegion = borderRegion.subtracted(m_boundingRect);
QBrush brush = m_widget->palette().window();
QVector<QRect> rects = borderRegion.rects();
for (QVector<QRect>::iterator it = rects.begin(), end = rects.end(); it != end; ++it) {
painter.fillRect(*it, brush);
}
}
if (m_surface->isActive() && m_boundingRect.intersects(event->rect())) {
m_surface->paint(&painter, m_boundingRect, m_sourceRect);
m_surface->setReady(true);
} else {
#if !defined(QT_NO_OPENGL) && !defined(QT_OPENGL_ES_1_CL) && !defined(QT_OPENGL_ES_1)
if (m_updatePaintDevice && (painter.paintEngine()->type() == QPaintEngine::OpenGL
|| painter.paintEngine()->type() == QPaintEngine::OpenGL2)) {
m_updatePaintDevice = false;
m_surface->setGLContext(const_cast<QGLContext *>(QGLContext::currentContext()));
if (m_surface->supportedShaderTypes() & QPainterVideoSurface::GlslShader) {
m_surface->setShaderType(QPainterVideoSurface::GlslShader);
} else {
m_surface->setShaderType(QPainterVideoSurface::FragmentProgramShader);
}
}
#endif
}
}
void QRendererVideoWidgetBackend::formatChanged(const QVideoSurfaceFormat &format)
{
m_nativeSize = format.sizeHint();
updateRects();
m_widget->updateGeometry();
m_widget->update();
}
void QRendererVideoWidgetBackend::frameChanged()
{
m_widget->update(m_boundingRect);
}
void QRendererVideoWidgetBackend::updateRects()
{
QRect rect = m_widget->rect();
if (m_nativeSize.isEmpty()) {
m_boundingRect = QRect();
} else if (m_aspectRatioMode == Qt::IgnoreAspectRatio) {
m_boundingRect = rect;
m_sourceRect = QRectF(0, 0, 1, 1);
} else if (m_aspectRatioMode == Qt::KeepAspectRatio) {
QSize size = m_nativeSize;
size.scale(rect.size(), Qt::KeepAspectRatio);
m_boundingRect = QRect(0, 0, size.width(), size.height());
m_boundingRect.moveCenter(rect.center());
m_sourceRect = QRectF(0, 0, 1, 1);
} else if (m_aspectRatioMode == Qt::KeepAspectRatioByExpanding) {
m_boundingRect = rect;
QSizeF size = rect.size();
size.scale(m_nativeSize, Qt::KeepAspectRatio);
m_sourceRect = QRectF(
0, 0, size.width() / m_nativeSize.width(), size.height() / m_nativeSize.height());
m_sourceRect.moveCenter(QPointF(0.5, 0.5));
}
}
QWindowVideoWidgetBackend::QWindowVideoWidgetBackend(
QMediaService *service, QVideoWindowControl *control, QWidget *widget)
: m_service(service)
, m_windowControl(control)
, m_widget(widget)
, m_aspectRatioMode(Qt::KeepAspectRatio)
{
connect(control, SIGNAL(brightnessChanged(int)), m_widget, SLOT(_q_brightnessChanged(int)));
connect(control, SIGNAL(contrastChanged(int)), m_widget, SLOT(_q_contrastChanged(int)));
connect(control, SIGNAL(hueChanged(int)), m_widget, SLOT(_q_hueChanged(int)));
connect(control, SIGNAL(saturationChanged(int)), m_widget, SLOT(_q_saturationChanged(int)));
connect(control, SIGNAL(fullScreenChanged(bool)), m_widget, SLOT(_q_fullScreenChanged(bool)));
connect(control, SIGNAL(nativeSizeChanged()), m_widget, SLOT(_q_dimensionsChanged()));
control->setWinId(widget->winId());
}
QWindowVideoWidgetBackend::~QWindowVideoWidgetBackend()
{
}
void QWindowVideoWidgetBackend::releaseControl()
{
m_service->releaseControl(m_windowControl);
}
void QWindowVideoWidgetBackend::setBrightness(int brightness)
{
m_windowControl->setBrightness(brightness);
}
void QWindowVideoWidgetBackend::setContrast(int contrast)
{
m_windowControl->setContrast(contrast);
}
void QWindowVideoWidgetBackend::setHue(int hue)
{
m_windowControl->setHue(hue);
}
void QWindowVideoWidgetBackend::setSaturation(int saturation)
{
m_windowControl->setSaturation(saturation);
}
void QWindowVideoWidgetBackend::setFullScreen(bool fullScreen)
{
m_windowControl->setFullScreen(fullScreen);
}
Qt::AspectRatioMode QWindowVideoWidgetBackend::aspectRatioMode() const
{
return m_windowControl->aspectRatioMode();
}
void QWindowVideoWidgetBackend::setAspectRatioMode(Qt::AspectRatioMode mode)
{
m_windowControl->setAspectRatioMode(mode);
}
QSize QWindowVideoWidgetBackend::sizeHint() const
{
return m_windowControl->nativeSize();
}
void QWindowVideoWidgetBackend::showEvent()
{
m_windowControl->setWinId(m_widget->winId());
m_windowControl->setDisplayRect(m_widget->rect());
#if defined(Q_WS_WIN)
m_widget->setUpdatesEnabled(false);
#endif
}
void QWindowVideoWidgetBackend::hideEvent(QHideEvent *)
{
#if defined(Q_WS_WIN)
m_widget->setUpdatesEnabled(true);
#endif
}
void QWindowVideoWidgetBackend::moveEvent(QMoveEvent *)
{
m_windowControl->setDisplayRect(m_widget->rect());
}
void QWindowVideoWidgetBackend::resizeEvent(QResizeEvent *)
{
m_windowControl->setDisplayRect(m_widget->rect());
}
void QWindowVideoWidgetBackend::paintEvent(QPaintEvent *event)
{
if (m_widget->testAttribute(Qt::WA_OpaquePaintEvent)) {
QPainter painter(m_widget);
painter.fillRect(event->rect(), m_widget->palette().window());
}
m_windowControl->repaint();
event->accept();
}
#if defined(Q_WS_WIN)
bool QWindowVideoWidgetBackend::winEvent(MSG *message, long *)
{
if (message->message == WM_PAINT)
m_windowControl->repaint();
return false;
}
#endif
void QVideoWidgetPrivate::setCurrentControl(QVideoWidgetControlInterface *control)
{
if (currentControl != control) {
currentControl = control;
currentControl->setBrightness(brightness);
currentControl->setContrast(contrast);
currentControl->setHue(hue);
currentControl->setSaturation(saturation);
currentControl->setAspectRatioMode(aspectRatioMode);
}
}
void QVideoWidgetPrivate::clearService()
{
if (service) {
QObject::disconnect(service, SIGNAL(destroyed()), q_func(), SLOT(_q_serviceDestroyed()));
if (widgetBackend) {
QLayout *layout = q_func()->layout();
for (QLayoutItem *item = layout->takeAt(0); item; item = layout->takeAt(0)) {
item->widget()->setParent(0);
delete item;
}
delete layout;
widgetBackend->releaseControl();
delete widgetBackend;
widgetBackend = 0;
} else if (rendererBackend) {
rendererBackend->clearSurface();
rendererBackend->releaseControl();
delete rendererBackend;
rendererBackend = 0;
} else {
windowBackend->releaseControl();
delete windowBackend;
windowBackend = 0;
}
currentBackend = 0;
currentControl = 0;
service = 0;
}
}
bool QVideoWidgetPrivate::createWidgetBackend()
{
if (QMediaControl *control = service->requestControl(QVideoWidgetControl_iid)) {
if (QVideoWidgetControl *widgetControl = qobject_cast<QVideoWidgetControl *>(control)) {
widgetBackend = new QVideoWidgetControlBackend(service, widgetControl, q_func());
setCurrentControl(widgetBackend);
return true;
}
service->releaseControl(control);
}
return false;
}
bool QVideoWidgetPrivate::createWindowBackend()
{
if (QMediaControl *control = service->requestControl(QVideoWindowControl_iid)) {
if (QVideoWindowControl *windowControl = qobject_cast<QVideoWindowControl *>(control)) {
windowBackend = new QWindowVideoWidgetBackend(service, windowControl, q_func());
currentBackend = windowBackend;
setCurrentControl(windowBackend);
return true;
}
service->releaseControl(control);
}
return false;
}
bool QVideoWidgetPrivate::createRendererBackend()
{
if (QMediaControl *control = service->requestControl(QVideoRendererControl_iid)) {
if (QVideoRendererControl *rendererControl = qobject_cast<QVideoRendererControl *>(control)) {
rendererBackend = new QRendererVideoWidgetBackend(service, rendererControl, q_func());
currentBackend = rendererBackend;
setCurrentControl(rendererBackend);
return true;
}
service->releaseControl(control);
}
return false;
}
void QVideoWidgetPrivate::_q_serviceDestroyed()
{
if (widgetBackend)
delete q_func()->layout();
delete widgetBackend;
delete windowBackend;
delete rendererBackend;
widgetBackend = 0;
windowBackend = 0;
rendererBackend = 0;
currentControl = 0;
currentBackend = 0;
service = 0;
}
void QVideoWidgetPrivate::_q_brightnessChanged(int b)
{
if (b != brightness)
emit q_func()->brightnessChanged(brightness = b);
}
void QVideoWidgetPrivate::_q_contrastChanged(int c)
{
if (c != contrast)
emit q_func()->contrastChanged(contrast = c);
}
void QVideoWidgetPrivate::_q_hueChanged(int h)
{
if (h != hue)
emit q_func()->hueChanged(hue = h);
}
void QVideoWidgetPrivate::_q_saturationChanged(int s)
{
if (s != saturation)
emit q_func()->saturationChanged(saturation = s);
}
void QVideoWidgetPrivate::_q_fullScreenChanged(bool fullScreen)
{
if (!fullScreen && q_func()->isFullScreen())
q_func()->showNormal();
}
void QVideoWidgetPrivate::_q_dimensionsChanged()
{
q_func()->updateGeometry();
q_func()->update();
}
/*!
\class QVideoWidget
\brief The QVideoWidget class provides a widget which presents video
produced by a media object.
\ingroup multimedia
\inmodule QtMultimediaKit
\since 1.0
\inmodule QtMultimediaKit
Attaching a QVideoWidget to a QMediaObject allows it to display the
video or image output of that media object. A QVideoWidget is attached
to media object by passing a pointer to the QMediaObject in its
constructor, and detached by destroying the QVideoWidget.
\snippet doc/src/snippets/multimedia-snippets/video.cpp Video widget
\bold {Note}: Only a single display output can be attached to a media
object at one time.
\sa QMediaObject, QMediaPlayer, QGraphicsVideoItem
*/
/*!
Constructs a new video widget.
The \a parent is passed to QWidget.
*/
QVideoWidget::QVideoWidget(QWidget *parent)
: QWidget(parent, 0)
, d_ptr(new QVideoWidgetPrivate)
{
d_ptr->q_ptr = this;
}
/*!
\internal
*/
QVideoWidget::QVideoWidget(QVideoWidgetPrivate &dd, QWidget *parent)
: QWidget(parent, 0)
, d_ptr(&dd)
{
d_ptr->q_ptr = this;
QPalette palette = QWidget::palette();
palette.setColor(QPalette::Background, Qt::black);
setPalette(palette);
}
/*!
Destroys a video widget.
*/
QVideoWidget::~QVideoWidget()
{
d_ptr->clearService();
delete d_ptr;
}
/*!
\property QVideoWidget::mediaObject
\brief the media object which provides the video displayed by a widget.
*/
QMediaObject *QVideoWidget::mediaObject() const
{
return d_func()->mediaObject;
}
/*!
\internal
*/
bool QVideoWidget::setMediaObject(QMediaObject *object)
{
Q_D(QVideoWidget);
if (object == d->mediaObject)
return true;
d->clearService();
d->mediaObject = object;
if (d->mediaObject)
d->service = d->mediaObject->service();
if (d->service) {
if (d->createWidgetBackend()) {
// Nothing to do here.
} else if ((!window() || !window()->testAttribute(Qt::WA_DontShowOnScreen))
&& d->createWindowBackend()) {
if (isVisible())
d->windowBackend->showEvent();
} else if (d->createRendererBackend()) {
if (isVisible())
d->rendererBackend->showEvent();
} else {
d->service = 0;
d->mediaObject = 0;
return false;
}
connect(d->service, SIGNAL(destroyed()), SLOT(_q_serviceDestroyed()));
} else {
d->mediaObject = 0;
return false;
}
return true;
}
/*!
\property QVideoWidget::aspectRatioMode
\brief how video is scaled with respect to its aspect ratio.
*/
Qt::AspectRatioMode QVideoWidget::aspectRatioMode() const
{
return d_func()->aspectRatioMode;
}
void QVideoWidget::setAspectRatioMode(Qt::AspectRatioMode mode)
{
Q_D(QVideoWidget);
if (d->currentControl) {
d->currentControl->setAspectRatioMode(mode);
d->aspectRatioMode = d->currentControl->aspectRatioMode();
} else {
d->aspectRatioMode = mode;
}
}
/*!
\property QVideoWidget::fullScreen
\brief whether video display is confined to a window or is fullScreen.
*/
void QVideoWidget::setFullScreen(bool fullScreen)
{
Q_D(QVideoWidget);
if (fullScreen) {
Qt::WindowFlags flags = windowFlags();
d->nonFullScreenFlags = flags & (Qt::Window | Qt::SubWindow);
flags |= Qt::Window;
flags &= ~Qt::SubWindow;
setWindowFlags(flags);
showFullScreen();
} else {
showNormal();
}
}
/*!
\fn QVideoWidget::fullScreenChanged(bool fullScreen)
Signals that the \a fullScreen mode of a video widget has changed.
\sa fullScreen
*/
/*!
\property QVideoWidget::brightness
\brief an adjustment to the brightness of displayed video.
Valid brightness values range between -100 and 100, the default is 0.
*/
int QVideoWidget::brightness() const
{
return d_func()->brightness;
}
void QVideoWidget::setBrightness(int brightness)
{
Q_D(QVideoWidget);
int boundedBrightness = qBound(-100, brightness, 100);
if (d->currentControl)
d->currentControl->setBrightness(boundedBrightness);
else if (d->brightness != boundedBrightness)
emit brightnessChanged(d->brightness = boundedBrightness);
}
/*!
\fn QVideoWidget::brightnessChanged(int brightness)
Signals that a video widgets's \a brightness adjustment has changed.
\sa brightness
*/
/*!
\property QVideoWidget::contrast
\brief an adjustment to the contrast of displayed video.
Valid contrast values range between -100 and 100, the default is 0.
*/
int QVideoWidget::contrast() const
{
return d_func()->contrast;
}
void QVideoWidget::setContrast(int contrast)
{
Q_D(QVideoWidget);
int boundedContrast = qBound(-100, contrast, 100);
if (d->currentControl)
d->currentControl->setContrast(boundedContrast);
else if (d->contrast != boundedContrast)
emit contrastChanged(d->contrast = boundedContrast);
}
/*!
\fn QVideoWidget::contrastChanged(int contrast)
Signals that a video widgets's \a contrast adjustment has changed.
\sa contrast
*/
/*!
\property QVideoWidget::hue
\brief an adjustment to the hue of displayed video.
Valid hue values range between -100 and 100, the default is 0.
*/
int QVideoWidget::hue() const
{
return d_func()->hue;
}
void QVideoWidget::setHue(int hue)
{
Q_D(QVideoWidget);
int boundedHue = qBound(-100, hue, 100);
if (d->currentControl)
d->currentControl->setHue(boundedHue);
else if (d->hue != boundedHue)
emit hueChanged(d->hue = boundedHue);
}
/*!
\fn QVideoWidget::hueChanged(int hue)
Signals that a video widgets's \a hue has changed.
\sa hue
*/
/*!
\property QVideoWidget::saturation
\brief an adjustment to the saturation of displayed video.
Valid saturation values range between -100 and 100, the default is 0.
*/
int QVideoWidget::saturation() const
{
return d_func()->saturation;
}
void QVideoWidget::setSaturation(int saturation)
{
Q_D(QVideoWidget);
int boundedSaturation = qBound(-100, saturation, 100);
if (d->currentControl)
d->currentControl->setSaturation(boundedSaturation);
else if (d->saturation != boundedSaturation)
emit saturationChanged(d->saturation = boundedSaturation);
}
/*!
\fn QVideoWidget::saturationChanged(int saturation)
Signals that a video widgets's \a saturation has changed.
\sa saturation
*/
/*!
Returns the size hint for the current back end,
if there is one, or else the size hint from QWidget.
*/
QSize QVideoWidget::sizeHint() const
{
Q_D(const QVideoWidget);
if (d->currentBackend)
return d->currentBackend->sizeHint();
else
return QWidget::sizeHint();
}
/*!
Current event \a event.
Returns the value of the baseclass QWidget::event(QEvent *event) function.
*/
bool QVideoWidget::event(QEvent *event)
{
Q_D(QVideoWidget);
if (event->type() == QEvent::WindowStateChange) {
Qt::WindowFlags flags = windowFlags();
if (windowState() & Qt::WindowFullScreen) {
if (d->currentControl)
d->currentControl->setFullScreen(true);
if (!d->wasFullScreen)
emit fullScreenChanged(d->wasFullScreen = true);
} else {
if (d->currentControl)
d->currentControl->setFullScreen(false);
if (d->wasFullScreen) {
flags &= ~(Qt::Window | Qt::SubWindow); //clear the flags...
flags |= d->nonFullScreenFlags; //then we reset the flags (window and subwindow)
setWindowFlags(flags);
emit fullScreenChanged(d->wasFullScreen = false);
}
}
}
return QWidget::event(event);
}
/*!
Handles the show \a event.
*/
void QVideoWidget::showEvent(QShowEvent *event)
{
Q_D(QVideoWidget);
QWidget::showEvent(event);
// The window backend won't work for re-directed windows so use the renderer backend instead.
if (d->windowBackend && window()->testAttribute(Qt::WA_DontShowOnScreen)) {
d->windowBackend->releaseControl();
delete d->windowBackend;
d->windowBackend = 0;
d->createRendererBackend();
}
if (d->currentBackend)
d->currentBackend->showEvent();
}
/*!
Handles the hide \a event.
*/
void QVideoWidget::hideEvent(QHideEvent *event)
{
Q_D(QVideoWidget);
if (d->currentBackend)
d->currentBackend->hideEvent(event);
QWidget::hideEvent(event);
}
/*!
Handles the resize \a event.
*/
void QVideoWidget::resizeEvent(QResizeEvent *event)
{
Q_D(QVideoWidget);
QWidget::resizeEvent(event);
if (d->currentBackend)
d->currentBackend->resizeEvent(event);
}
/*!
Handles the move \a event.
*/
void QVideoWidget::moveEvent(QMoveEvent *event)
{
Q_D(QVideoWidget);
if (d->currentBackend)
d->currentBackend->moveEvent(event);
}
/*!
Handles the paint \a event.
*/
void QVideoWidget::paintEvent(QPaintEvent *event)
{
Q_D(QVideoWidget);
if (d->currentBackend) {
d->currentBackend->paintEvent(event);
} else if (testAttribute(Qt::WA_OpaquePaintEvent)) {
QPainter painter(this);
painter.fillRect(event->rect(), palette().window());
}
}
#if defined(Q_WS_WIN)
/*!
\reimp
\internal
*/
bool QVideoWidget::winEvent(MSG *message, long *result)
{
return d_func()->windowBackend && d_func()->windowBackend->winEvent(message, result)
? true
: QWidget::winEvent(message, result);
}
#endif
#include "moc_qvideowidget.cpp"
#include "moc_qvideowidget_p.cpp"
QT_END_NAMESPACE
| KDE/android-qt-mobility | src/multimedia/qvideowidget.cpp | C++ | lgpl-2.1 | 26,102 |
/*
* Copyright (C) 2014 Red Hat, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the licence, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, see <http://www.gnu.org/licenses/>.
*
* Author: Matthew Barnes <[email protected]>
*/
#ifndef __GDAV_SUPPORTED_CALENDAR_COMPONENT_SET_PROPERTY_H__
#define __GDAV_SUPPORTED_CALENDAR_COMPONENT_SET_PROPERTY_H__
#include <libgdav/gdav-property.h>
/* Standard GObject macros */
#define GDAV_TYPE_SUPPORTED_CALENDAR_COMPONENT_SET_PROPERTY \
(gdav_supported_calendar_component_set_property_get_type ())
#define GDAV_SUPPORTED_CALENDAR_COMPONENT_SET_PROPERTY(obj) \
(G_TYPE_CHECK_INSTANCE_CAST \
((obj), GDAV_TYPE_SUPPORTED_CALENDAR_COMPONENT_SET_PROPERTY, GDavSupportedCalendarComponentSetProperty))
#define GDAV_IS_SUPPORTED_CALENDAR_COMPONENT_SET_PROPERTY(obj) \
(G_TYPE_CHECK_INSTANCE_TYPE \
((obj), GDAV_TYPE_SUPPORTED_CALENDAR_COMPONENT_SET_PROPERTY))
G_BEGIN_DECLS
typedef struct _GDavSupportedCalendarComponentSetProperty GDavSupportedCalendarComponentSetProperty;
typedef struct _GDavSupportedCalendarComponentSetPropertyClass GDavSupportedCalendarComponentSetPropertyClass;
typedef struct _GDavSupportedCalendarComponentSetPropertyPrivate GDavSupportedCalendarComponentSetPropertyPrivate;
struct _GDavSupportedCalendarComponentSetProperty {
GDavProperty parent;
GDavSupportedCalendarComponentSetPropertyPrivate *priv;
};
struct _GDavSupportedCalendarComponentSetPropertyClass {
GDavPropertyClass parent_class;
};
GType gdav_supported_calendar_component_set_property_get_type
(void) G_GNUC_CONST;
G_END_DECLS
#endif /* __GDAV_SUPPORTED_CALENDAR_COMPONENT_SET_PROPERTY_H__ */
| mbarnes/libgdav | libgdav/gdav-supported-calendar-component-set-property.h | C | lgpl-2.1 | 2,179 |
/* GStreamer
* Copyright (C) <1999> Erik Walthinsen <[email protected]>
* Copyright (C) <2003> David Schleef <[email protected]>
* Copyright (C) <2010> Sebastian Dröge <[email protected]>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
/*
* This file was (probably) generated from gstvideobalance.c,
* gstvideobalance.c,v 1.7 2003/11/08 02:48:59 dschleef Exp
*/
/**
* SECTION:element-videobalance
*
* Adjusts brightness, contrast, hue, saturation on a video stream.
*
* <refsect2>
* <title>Example launch line</title>
* |[
* gst-launch videotestsrc ! videobalance saturation=0.0 ! ffmpegcolorspace ! ximagesink
* ]| This pipeline converts the image to black and white by setting the
* saturation to 0.0.
* </refsect2>
*
* Last reviewed on 2010-04-18 (0.10.22)
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "gstvideobalance.h"
#include <string.h>
#include <math.h>
#include <gst/controller/gstcontroller.h>
#include <gst/interfaces/colorbalance.h>
#ifndef M_PI
#define M_PI 3.14159265358979323846
#endif
#ifdef WIN32
#define rint(x) (floor((x)+0.5))
#endif
GST_DEBUG_CATEGORY_STATIC (videobalance_debug);
#define GST_CAT_DEFAULT videobalance_debug
/* GstVideoBalance properties */
#define DEFAULT_PROP_CONTRAST 1.0
#define DEFAULT_PROP_BRIGHTNESS 0.0
#define DEFAULT_PROP_HUE 0.0
#define DEFAULT_PROP_SATURATION 1.0
enum
{
PROP_0,
PROP_CONTRAST,
PROP_BRIGHTNESS,
PROP_HUE,
PROP_SATURATION
};
static GstStaticPadTemplate gst_video_balance_src_template =
GST_STATIC_PAD_TEMPLATE ("src",
GST_PAD_SRC,
GST_PAD_ALWAYS,
GST_STATIC_CAPS (GST_VIDEO_CAPS_YUV ("AYUV") ";"
GST_VIDEO_CAPS_ARGB ";" GST_VIDEO_CAPS_BGRA ";"
GST_VIDEO_CAPS_ABGR ";" GST_VIDEO_CAPS_RGBA ";"
GST_VIDEO_CAPS_YUV ("Y444") ";"
GST_VIDEO_CAPS_xRGB ";" GST_VIDEO_CAPS_RGBx ";"
GST_VIDEO_CAPS_xBGR ";" GST_VIDEO_CAPS_BGRx ";"
GST_VIDEO_CAPS_RGB ";" GST_VIDEO_CAPS_BGR ";"
GST_VIDEO_CAPS_YUV ("Y42B") ";"
GST_VIDEO_CAPS_YUV ("YUY2") ";"
GST_VIDEO_CAPS_YUV ("UYVY") ";"
GST_VIDEO_CAPS_YUV ("YVYU") ";"
GST_VIDEO_CAPS_YUV ("I420") ";"
GST_VIDEO_CAPS_YUV ("YV12") ";"
GST_VIDEO_CAPS_YUV ("IYUV") ";" GST_VIDEO_CAPS_YUV ("Y41B")
)
);
static GstStaticPadTemplate gst_video_balance_sink_template =
GST_STATIC_PAD_TEMPLATE ("sink",
GST_PAD_SINK,
GST_PAD_ALWAYS,
GST_STATIC_CAPS (GST_VIDEO_CAPS_YUV ("AYUV") ";"
GST_VIDEO_CAPS_ARGB ";" GST_VIDEO_CAPS_BGRA ";"
GST_VIDEO_CAPS_ABGR ";" GST_VIDEO_CAPS_RGBA ";"
GST_VIDEO_CAPS_YUV ("Y444") ";"
GST_VIDEO_CAPS_xRGB ";" GST_VIDEO_CAPS_RGBx ";"
GST_VIDEO_CAPS_xBGR ";" GST_VIDEO_CAPS_BGRx ";"
GST_VIDEO_CAPS_RGB ";" GST_VIDEO_CAPS_BGR ";"
GST_VIDEO_CAPS_YUV ("Y42B") ";"
GST_VIDEO_CAPS_YUV ("YUY2") ";"
GST_VIDEO_CAPS_YUV ("UYVY") ";"
GST_VIDEO_CAPS_YUV ("YVYU") ";"
GST_VIDEO_CAPS_YUV ("I420") ";"
GST_VIDEO_CAPS_YUV ("YV12") ";"
GST_VIDEO_CAPS_YUV ("IYUV") ";" GST_VIDEO_CAPS_YUV ("Y41B")
)
);
static void gst_video_balance_colorbalance_init (GstColorBalanceClass * iface);
static void gst_video_balance_interface_init (GstImplementsInterfaceClass *
klass);
static void gst_video_balance_set_property (GObject * object, guint prop_id,
const GValue * value, GParamSpec * pspec);
static void gst_video_balance_get_property (GObject * object, guint prop_id,
GValue * value, GParamSpec * pspec);
static void
_do_init (GType video_balance_type)
{
static const GInterfaceInfo iface_info = {
(GInterfaceInitFunc) gst_video_balance_interface_init,
NULL,
NULL,
};
static const GInterfaceInfo colorbalance_info = {
(GInterfaceInitFunc) gst_video_balance_colorbalance_init,
NULL,
NULL,
};
g_type_add_interface_static (video_balance_type,
GST_TYPE_IMPLEMENTS_INTERFACE, &iface_info);
g_type_add_interface_static (video_balance_type, GST_TYPE_COLOR_BALANCE,
&colorbalance_info);
}
GST_BOILERPLATE_FULL (GstVideoBalance, gst_video_balance, GstVideoFilter,
GST_TYPE_VIDEO_FILTER, _do_init);
/*
* look-up tables (LUT).
*/
static void
gst_video_balance_update_tables (GstVideoBalance * vb)
{
gint i, j;
gdouble y, u, v, hue_cos, hue_sin;
/* Y */
for (i = 0; i < 256; i++) {
y = 16 + ((i - 16) * vb->contrast + vb->brightness * 255);
if (y < 0)
y = 0;
else if (y > 255)
y = 255;
vb->tabley[i] = rint (y);
}
hue_cos = cos (M_PI * vb->hue);
hue_sin = sin (M_PI * vb->hue);
/* U/V lookup tables are 2D, since we need both U/V for each table
* separately. */
for (i = -128; i < 128; i++) {
for (j = -128; j < 128; j++) {
u = 128 + ((i * hue_cos + j * hue_sin) * vb->saturation);
v = 128 + ((-i * hue_sin + j * hue_cos) * vb->saturation);
if (u < 0)
u = 0;
else if (u > 255)
u = 255;
if (v < 0)
v = 0;
else if (v > 255)
v = 255;
vb->tableu[i + 128][j + 128] = rint (u);
vb->tablev[i + 128][j + 128] = rint (v);
}
}
}
static gboolean
gst_video_balance_is_passthrough (GstVideoBalance * videobalance)
{
return videobalance->contrast == 1.0 &&
videobalance->brightness == 0.0 &&
videobalance->hue == 0.0 && videobalance->saturation == 1.0;
}
static void
gst_video_balance_update_properties (GstVideoBalance * videobalance)
{
gboolean passthrough = gst_video_balance_is_passthrough (videobalance);
GstBaseTransform *base = GST_BASE_TRANSFORM (videobalance);
base->passthrough = passthrough;
if (!passthrough)
gst_video_balance_update_tables (videobalance);
}
static void
gst_video_balance_planar_yuv (GstVideoBalance * videobalance, guint8 * data)
{
gint x, y;
guint8 *ydata;
guint8 *udata, *vdata;
gint ystride, ustride, vstride;
GstVideoFormat format;
gint width, height;
gint width2, height2;
guint8 *tabley = videobalance->tabley;
guint8 **tableu = videobalance->tableu;
guint8 **tablev = videobalance->tablev;
format = videobalance->format;
width = videobalance->width;
height = videobalance->height;
ydata =
data + gst_video_format_get_component_offset (format, 0, width, height);
ystride = gst_video_format_get_row_stride (format, 0, width);
for (y = 0; y < height; y++) {
guint8 *yptr;
yptr = ydata + y * ystride;
for (x = 0; x < width; x++) {
*ydata = tabley[*ydata];
ydata++;
}
}
width2 = gst_video_format_get_component_width (format, 1, width);
height2 = gst_video_format_get_component_height (format, 1, height);
udata =
data + gst_video_format_get_component_offset (format, 1, width, height);
vdata =
data + gst_video_format_get_component_offset (format, 2, width, height);
ustride = gst_video_format_get_row_stride (format, 1, width);
vstride = gst_video_format_get_row_stride (format, 1, width);
for (y = 0; y < height2; y++) {
guint8 *uptr, *vptr;
guint8 u1, v1;
uptr = udata + y * ustride;
vptr = vdata + y * vstride;
for (x = 0; x < width2; x++) {
u1 = *uptr;
v1 = *vptr;
*uptr++ = tableu[u1][v1];
*vptr++ = tablev[u1][v1];
}
}
}
static void
gst_video_balance_packed_yuv (GstVideoBalance * videobalance, guint8 * data)
{
gint x, y;
guint8 *ydata;
guint8 *udata, *vdata;
gint ystride, ustride, vstride;
gint yoff, uoff, voff;
GstVideoFormat format;
gint width, height;
gint width2, height2;
guint8 *tabley = videobalance->tabley;
guint8 **tableu = videobalance->tableu;
guint8 **tablev = videobalance->tablev;
format = videobalance->format;
width = videobalance->width;
height = videobalance->height;
ydata =
data + gst_video_format_get_component_offset (format, 0, width, height);
ystride = gst_video_format_get_row_stride (format, 0, width);
yoff = gst_video_format_get_pixel_stride (format, 0);
for (y = 0; y < height; y++) {
guint8 *yptr;
yptr = ydata + y * ystride;
for (x = 0; x < width; x++) {
*ydata = tabley[*ydata];
ydata += yoff;
}
}
width2 = gst_video_format_get_component_width (format, 1, width);
height2 = gst_video_format_get_component_height (format, 1, height);
udata =
data + gst_video_format_get_component_offset (format, 1, width, height);
vdata =
data + gst_video_format_get_component_offset (format, 2, width, height);
ustride = gst_video_format_get_row_stride (format, 1, width);
vstride = gst_video_format_get_row_stride (format, 1, width);
uoff = gst_video_format_get_pixel_stride (format, 1);
voff = gst_video_format_get_pixel_stride (format, 2);
for (y = 0; y < height2; y++) {
guint8 *uptr, *vptr;
guint8 u1, v1;
uptr = udata + y * ustride;
vptr = vdata + y * vstride;
for (x = 0; x < width2; x++) {
u1 = *uptr;
v1 = *vptr;
*uptr = tableu[u1][v1];
*vptr = tablev[u1][v1];
uptr += uoff;
vptr += voff;
}
}
}
static const int cog_ycbcr_to_rgb_matrix_8bit_sdtv[] = {
298, 0, 409, -57068,
298, -100, -208, 34707,
298, 516, 0, -70870,
};
static const gint cog_rgb_to_ycbcr_matrix_8bit_sdtv[] = {
66, 129, 25, 4096,
-38, -74, 112, 32768,
112, -94, -18, 32768,
};
#define APPLY_MATRIX(m,o,v1,v2,v3) ((m[o*4] * v1 + m[o*4+1] * v2 + m[o*4+2] * v3 + m[o*4+3]) >> 8)
static void
gst_video_balance_packed_rgb (GstVideoBalance * videobalance, guint8 * data)
{
gint i, j, height;
gint width, row_stride, row_wrap;
gint pixel_stride;
gint offsets[3];
gint r, g, b;
gint y, u, v;
gint u_tmp, v_tmp;
guint8 *tabley = videobalance->tabley;
guint8 **tableu = videobalance->tableu;
guint8 **tablev = videobalance->tablev;
offsets[0] = gst_video_format_get_component_offset (videobalance->format, 0,
videobalance->width, videobalance->height);
offsets[1] = gst_video_format_get_component_offset (videobalance->format, 1,
videobalance->width, videobalance->height);
offsets[2] = gst_video_format_get_component_offset (videobalance->format, 2,
videobalance->width, videobalance->height);
width =
gst_video_format_get_component_width (videobalance->format, 0,
videobalance->width);
height =
gst_video_format_get_component_height (videobalance->format, 0,
videobalance->height);
row_stride =
gst_video_format_get_row_stride (videobalance->format, 0,
videobalance->width);
pixel_stride = gst_video_format_get_pixel_stride (videobalance->format, 0);
row_wrap = row_stride - pixel_stride * width;
for (i = 0; i < height; i++) {
for (j = 0; j < width; j++) {
r = data[offsets[0]];
g = data[offsets[1]];
b = data[offsets[2]];
y = APPLY_MATRIX (cog_rgb_to_ycbcr_matrix_8bit_sdtv, 0, r, g, b);
u_tmp = APPLY_MATRIX (cog_rgb_to_ycbcr_matrix_8bit_sdtv, 1, r, g, b);
v_tmp = APPLY_MATRIX (cog_rgb_to_ycbcr_matrix_8bit_sdtv, 2, r, g, b);
y = CLAMP (y, 0, 255);
u_tmp = CLAMP (u_tmp, 0, 255);
v_tmp = CLAMP (v_tmp, 0, 255);
y = tabley[y];
u = tableu[u_tmp][v_tmp];
v = tablev[u_tmp][v_tmp];
r = APPLY_MATRIX (cog_ycbcr_to_rgb_matrix_8bit_sdtv, 0, y, u, v);
g = APPLY_MATRIX (cog_ycbcr_to_rgb_matrix_8bit_sdtv, 1, y, u, v);
b = APPLY_MATRIX (cog_ycbcr_to_rgb_matrix_8bit_sdtv, 2, y, u, v);
data[offsets[0]] = CLAMP (r, 0, 255);
data[offsets[1]] = CLAMP (g, 0, 255);
data[offsets[2]] = CLAMP (b, 0, 255);
data += pixel_stride;
}
data += row_wrap;
}
}
/* get notified of caps and plug in the correct process function */
static gboolean
gst_video_balance_set_caps (GstBaseTransform * base, GstCaps * incaps,
GstCaps * outcaps)
{
GstVideoBalance *videobalance = GST_VIDEO_BALANCE (base);
GST_DEBUG_OBJECT (videobalance,
"in %" GST_PTR_FORMAT " out %" GST_PTR_FORMAT, incaps, outcaps);
videobalance->process = NULL;
if (!gst_video_format_parse_caps (incaps, &videobalance->format,
&videobalance->width, &videobalance->height))
goto invalid_caps;
videobalance->size =
gst_video_format_get_size (videobalance->format, videobalance->width,
videobalance->height);
switch (videobalance->format) {
case GST_VIDEO_FORMAT_I420:
case GST_VIDEO_FORMAT_YV12:
case GST_VIDEO_FORMAT_Y41B:
case GST_VIDEO_FORMAT_Y42B:
case GST_VIDEO_FORMAT_Y444:
videobalance->process = gst_video_balance_planar_yuv;
break;
case GST_VIDEO_FORMAT_YUY2:
case GST_VIDEO_FORMAT_UYVY:
case GST_VIDEO_FORMAT_AYUV:
case GST_VIDEO_FORMAT_YVYU:
videobalance->process = gst_video_balance_packed_yuv;
break;
case GST_VIDEO_FORMAT_ARGB:
case GST_VIDEO_FORMAT_ABGR:
case GST_VIDEO_FORMAT_RGBA:
case GST_VIDEO_FORMAT_BGRA:
case GST_VIDEO_FORMAT_xRGB:
case GST_VIDEO_FORMAT_xBGR:
case GST_VIDEO_FORMAT_RGBx:
case GST_VIDEO_FORMAT_BGRx:
case GST_VIDEO_FORMAT_RGB:
case GST_VIDEO_FORMAT_BGR:
videobalance->process = gst_video_balance_packed_rgb;
break;
default:
break;
}
return videobalance->process != NULL;
invalid_caps:
GST_ERROR_OBJECT (videobalance, "Invalid caps: %" GST_PTR_FORMAT, incaps);
return FALSE;
}
static void
gst_video_balance_before_transform (GstBaseTransform * base, GstBuffer * buf)
{
GstVideoBalance *balance = GST_VIDEO_BALANCE (base);
GstClockTime timestamp, stream_time;
timestamp = GST_BUFFER_TIMESTAMP (buf);
stream_time =
gst_segment_to_stream_time (&base->segment, GST_FORMAT_TIME, timestamp);
GST_DEBUG_OBJECT (balance, "sync to %" GST_TIME_FORMAT,
GST_TIME_ARGS (timestamp));
if (GST_CLOCK_TIME_IS_VALID (stream_time))
gst_object_sync_values (G_OBJECT (balance), stream_time);
}
static GstFlowReturn
gst_video_balance_transform_ip (GstBaseTransform * base, GstBuffer * outbuf)
{
GstVideoBalance *videobalance = GST_VIDEO_BALANCE (base);
guint8 *data;
guint size;
if (!videobalance->process)
goto not_negotiated;
/* if no change is needed, we are done */
if (base->passthrough)
goto done;
data = GST_BUFFER_DATA (outbuf);
size = GST_BUFFER_SIZE (outbuf);
if (size != videobalance->size)
goto wrong_size;
GST_OBJECT_LOCK (videobalance);
videobalance->process (videobalance, data);
GST_OBJECT_UNLOCK (videobalance);
done:
return GST_FLOW_OK;
/* ERRORS */
wrong_size:
{
GST_ELEMENT_ERROR (videobalance, STREAM, FORMAT,
(NULL), ("Invalid buffer size %d, expected %d", size,
videobalance->size));
return GST_FLOW_ERROR;
}
not_negotiated:
GST_ERROR_OBJECT (videobalance, "Not negotiated yet");
return GST_FLOW_NOT_NEGOTIATED;
}
static void
gst_video_balance_base_init (gpointer g_class)
{
GstElementClass *element_class = GST_ELEMENT_CLASS (g_class);
gst_element_class_set_details_simple (element_class, "Video balance",
"Filter/Effect/Video",
"Adjusts brightness, contrast, hue, saturation on a video stream",
"David Schleef <[email protected]>");
gst_element_class_add_pad_template (element_class,
gst_static_pad_template_get (&gst_video_balance_sink_template));
gst_element_class_add_pad_template (element_class,
gst_static_pad_template_get (&gst_video_balance_src_template));
}
static void
gst_video_balance_finalize (GObject * object)
{
GList *channels = NULL;
GstVideoBalance *balance = GST_VIDEO_BALANCE (object);
g_free (balance->tableu[0]);
channels = balance->channels;
while (channels) {
GstColorBalanceChannel *channel = channels->data;
g_object_unref (channel);
channels->data = NULL;
channels = g_list_next (channels);
}
if (balance->channels)
g_list_free (balance->channels);
G_OBJECT_CLASS (parent_class)->finalize (object);
}
static void
gst_video_balance_class_init (GstVideoBalanceClass * klass)
{
GObjectClass *gobject_class = (GObjectClass *) klass;
GstBaseTransformClass *trans_class = (GstBaseTransformClass *) klass;
GST_DEBUG_CATEGORY_INIT (videobalance_debug, "videobalance", 0,
"videobalance");
gobject_class->finalize = gst_video_balance_finalize;
gobject_class->set_property = gst_video_balance_set_property;
gobject_class->get_property = gst_video_balance_get_property;
g_object_class_install_property (gobject_class, PROP_CONTRAST,
g_param_spec_double ("contrast", "Contrast", "contrast",
0.0, 2.0, DEFAULT_PROP_CONTRAST,
GST_PARAM_CONTROLLABLE | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, PROP_BRIGHTNESS,
g_param_spec_double ("brightness", "Brightness", "brightness", -1.0, 1.0,
DEFAULT_PROP_BRIGHTNESS,
GST_PARAM_CONTROLLABLE | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, PROP_HUE,
g_param_spec_double ("hue", "Hue", "hue", -1.0, 1.0, DEFAULT_PROP_HUE,
GST_PARAM_CONTROLLABLE | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, PROP_SATURATION,
g_param_spec_double ("saturation", "Saturation", "saturation", 0.0, 2.0,
DEFAULT_PROP_SATURATION,
GST_PARAM_CONTROLLABLE | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
trans_class->set_caps = GST_DEBUG_FUNCPTR (gst_video_balance_set_caps);
trans_class->transform_ip =
GST_DEBUG_FUNCPTR (gst_video_balance_transform_ip);
trans_class->before_transform =
GST_DEBUG_FUNCPTR (gst_video_balance_before_transform);
}
static void
gst_video_balance_init (GstVideoBalance * videobalance,
GstVideoBalanceClass * klass)
{
const gchar *channels[4] = { "HUE", "SATURATION",
"BRIGHTNESS", "CONTRAST"
};
gint i;
/* Initialize propertiews */
videobalance->contrast = DEFAULT_PROP_CONTRAST;
videobalance->brightness = DEFAULT_PROP_BRIGHTNESS;
videobalance->hue = DEFAULT_PROP_HUE;
videobalance->saturation = DEFAULT_PROP_SATURATION;
videobalance->tableu[0] = g_new (guint8, 256 * 256 * 2);
for (i = 0; i < 256; i++) {
videobalance->tableu[i] =
videobalance->tableu[0] + i * 256 * sizeof (guint8);
videobalance->tablev[i] =
videobalance->tableu[0] + 256 * 256 * sizeof (guint8) +
i * 256 * sizeof (guint8);
}
gst_video_balance_update_properties (videobalance);
/* Generate the channels list */
for (i = 0; i < G_N_ELEMENTS (channels); i++) {
GstColorBalanceChannel *channel;
channel = g_object_new (GST_TYPE_COLOR_BALANCE_CHANNEL, NULL);
channel->label = g_strdup (channels[i]);
channel->min_value = -1000;
channel->max_value = 1000;
videobalance->channels = g_list_append (videobalance->channels, channel);
}
}
static gboolean
gst_video_balance_interface_supported (GstImplementsInterface * iface,
GType type)
{
g_assert (type == GST_TYPE_COLOR_BALANCE);
return TRUE;
}
static void
gst_video_balance_interface_init (GstImplementsInterfaceClass * klass)
{
klass->supported = gst_video_balance_interface_supported;
}
static const GList *
gst_video_balance_colorbalance_list_channels (GstColorBalance * balance)
{
GstVideoBalance *videobalance = GST_VIDEO_BALANCE (balance);
g_return_val_if_fail (videobalance != NULL, NULL);
g_return_val_if_fail (GST_IS_VIDEO_BALANCE (videobalance), NULL);
return videobalance->channels;
}
static void
gst_video_balance_colorbalance_set_value (GstColorBalance * balance,
GstColorBalanceChannel * channel, gint value)
{
GstVideoBalance *vb = GST_VIDEO_BALANCE (balance);
gdouble new_val;
gboolean changed;
g_return_if_fail (vb != NULL);
g_return_if_fail (GST_IS_VIDEO_BALANCE (vb));
g_return_if_fail (GST_IS_VIDEO_FILTER (vb));
g_return_if_fail (channel->label != NULL);
GST_BASE_TRANSFORM_LOCK (vb);
GST_OBJECT_LOCK (vb);
if (!g_ascii_strcasecmp (channel->label, "HUE")) {
new_val = (value + 1000.0) * 2.0 / 2000.0 - 1.0;
changed = new_val != vb->hue;
vb->hue = new_val;
} else if (!g_ascii_strcasecmp (channel->label, "SATURATION")) {
new_val = (value + 1000.0) * 2.0 / 2000.0;
changed = new_val != vb->saturation;
vb->saturation = new_val;
} else if (!g_ascii_strcasecmp (channel->label, "BRIGHTNESS")) {
new_val = (value + 1000.0) * 2.0 / 2000.0 - 1.0;
changed = new_val != vb->brightness;
vb->brightness = new_val;
} else if (!g_ascii_strcasecmp (channel->label, "CONTRAST")) {
new_val = (value + 1000.0) * 2.0 / 2000.0;
changed = new_val != vb->contrast;
vb->contrast = new_val;
}
gst_video_balance_update_properties (vb);
GST_OBJECT_UNLOCK (vb);
GST_BASE_TRANSFORM_UNLOCK (vb);
gst_color_balance_value_changed (balance, channel,
gst_color_balance_get_value (balance, channel));
}
static gint
gst_video_balance_colorbalance_get_value (GstColorBalance * balance,
GstColorBalanceChannel * channel)
{
GstVideoBalance *vb = GST_VIDEO_BALANCE (balance);
gint value = 0;
g_return_val_if_fail (vb != NULL, 0);
g_return_val_if_fail (GST_IS_VIDEO_BALANCE (vb), 0);
g_return_val_if_fail (channel->label != NULL, 0);
if (!g_ascii_strcasecmp (channel->label, "HUE")) {
value = (vb->hue + 1) * 2000.0 / 2.0 - 1000.0;
} else if (!g_ascii_strcasecmp (channel->label, "SATURATION")) {
value = vb->saturation * 2000.0 / 2.0 - 1000.0;
} else if (!g_ascii_strcasecmp (channel->label, "BRIGHTNESS")) {
value = (vb->brightness + 1) * 2000.0 / 2.0 - 1000.0;
} else if (!g_ascii_strcasecmp (channel->label, "CONTRAST")) {
value = vb->contrast * 2000.0 / 2.0 - 1000.0;
}
return value;
}
static void
gst_video_balance_colorbalance_init (GstColorBalanceClass * iface)
{
GST_COLOR_BALANCE_TYPE (iface) = GST_COLOR_BALANCE_SOFTWARE;
iface->list_channels = gst_video_balance_colorbalance_list_channels;
iface->set_value = gst_video_balance_colorbalance_set_value;
iface->get_value = gst_video_balance_colorbalance_get_value;
}
static GstColorBalanceChannel *
gst_video_balance_find_channel (GstVideoBalance * balance, const gchar * label)
{
GList *l;
for (l = balance->channels; l; l = l->next) {
GstColorBalanceChannel *channel = l->data;
if (g_ascii_strcasecmp (channel->label, label) == 0)
return channel;
}
return NULL;
}
static void
gst_video_balance_set_property (GObject * object, guint prop_id,
const GValue * value, GParamSpec * pspec)
{
GstVideoBalance *balance = GST_VIDEO_BALANCE (object);
gdouble d;
const gchar *label = NULL;
GST_BASE_TRANSFORM_LOCK (balance);
GST_OBJECT_LOCK (balance);
switch (prop_id) {
case PROP_CONTRAST:
d = g_value_get_double (value);
GST_DEBUG_OBJECT (balance, "Changing contrast from %lf to %lf",
balance->contrast, d);
if (d != balance->contrast)
label = "CONTRAST";
balance->contrast = d;
break;
case PROP_BRIGHTNESS:
d = g_value_get_double (value);
GST_DEBUG_OBJECT (balance, "Changing brightness from %lf to %lf",
balance->brightness, d);
if (d != balance->brightness)
label = "BRIGHTNESS";
balance->brightness = d;
break;
case PROP_HUE:
d = g_value_get_double (value);
GST_DEBUG_OBJECT (balance, "Changing hue from %lf to %lf", balance->hue,
d);
if (d != balance->hue)
label = "HUE";
balance->hue = d;
break;
case PROP_SATURATION:
d = g_value_get_double (value);
GST_DEBUG_OBJECT (balance, "Changing saturation from %lf to %lf",
balance->saturation, d);
if (d != balance->saturation)
label = "SATURATION";
balance->saturation = d;
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
}
gst_video_balance_update_properties (balance);
GST_OBJECT_UNLOCK (balance);
GST_BASE_TRANSFORM_UNLOCK (balance);
if (label) {
GstColorBalanceChannel *channel =
gst_video_balance_find_channel (balance, label);
gst_color_balance_value_changed (GST_COLOR_BALANCE (balance), channel,
gst_color_balance_get_value (GST_COLOR_BALANCE (balance), channel));
}
}
static void
gst_video_balance_get_property (GObject * object, guint prop_id, GValue * value,
GParamSpec * pspec)
{
GstVideoBalance *balance = GST_VIDEO_BALANCE (object);
switch (prop_id) {
case PROP_CONTRAST:
g_value_set_double (value, balance->contrast);
break;
case PROP_BRIGHTNESS:
g_value_set_double (value, balance->brightness);
break;
case PROP_HUE:
g_value_set_double (value, balance->hue);
break;
case PROP_SATURATION:
g_value_set_double (value, balance->saturation);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
}
}
| jahrome/gst-plugins-good | gst/videofilter/gstvideobalance.c | C | lgpl-2.1 | 25,489 |
#include "rendertarget.h"
#include <system/engine.h>
#include <renderer/renderer.h>
#include <renderer/forms.h>
using namespace CGE;
RenderTarget* RenderTarget::mCurrTarget = NULL;
void RenderTarget::drawFullscreen(bool transform){
Renderer* rend = Engine::instance()->getRenderer();
if (transform){
rend->ortho(1, 1);
rend->resetModelView();
}
rend->enableDepthTest(false);
CGE::Forms& forms = *CGE::Engine::instance()->getForms();
forms.activateQuad();
rend->enableTexturing(true);
rend->setColor(1, 1, 1, 1);
if (transform){
if (rend->getRenderType() != DirectX){
rend->switchMatrixStack(CGE::MatTexture);
rend->resetModelView();
rend->scale(1, -1, 1);
}
}
for (unsigned i = 0; i < getNumTextures(); ++i){
getTexture(i)->activate(i);
}
forms.drawQuad(Vec2f(), Vec2f(1, 1));
if (transform){
if (rend->getRenderType() != DirectX){
rend->resetModelView();
rend->switchMatrixStack(CGE::Modelview);
}
}
}
| captain-mayhem/captainsengine | Engine/renderer/rendertarget.cpp | C++ | lgpl-2.1 | 994 |
/* Static5 is engaged with type BIGINT and ggd(vec) */
#include "lie.h"
#ifdef __STDC__
static entry gcd(entry x,entry y);
static entry abs_minimum(vector* v_vec);
static boolean equal_elements(vector* v_vec);
#endif
static bigint* bin_from_int(i) intcel* i;
{ entry k = i->intval; freemem(i); return entry2bigint(k); }
static intcel* int_from_bin(b) bigint* b;
{ entry k = bigint2entry(b); freemem(b); return mkintcel(k); }
static object
vid_factor_bin(b) object
b;
{
return (object) Factor((bigint *) b);
}
/* Transform a vector into a matrix with the same components as the vector,
when read by rows */
static object mat_matvec_vec_int(object v,object nrows_object)
{
index size=v->v.ncomp, nrows, ncols=nrows_object->i.intval;
if (ncols<=0) error("Number of columns should be positive.\n");
if (size%ncols!=0)
error ("Number of columns should divide size of vector.\n");
{ matrix* m=mkmatrix(nrows=size/ncols,ncols); index i,j,k=0;
for (i=0; i<nrows; ++i)
for (j=0; j<ncols; ++j)
m->elm[i][j]=v->v.compon[k++]; /* |k==ncols*i+j| before increment */
return (object) m;
}
}
static entry gcd(x,y) entry x,y;
{
/* Requirement 0<x <= y */
entry r = x;
if (y==0) return 0;
while (r) {
x = y % r;
y = r;
r = x;
/* x <= y */
}
return y;
}
static entry abs_minimum(vector* v_vec)
/* return minimal absoulte value of nonzero array elements,
or 0 when all elements are 0. */
{
index i; boolean is_zero=true;
index n = v_vec->ncomp;
entry* v = v_vec->compon;
index minimum=0;
for (i=0; i<n; ++i) if (v[i]!=0)
if (is_zero) { is_zero=false; minimum=labs(v[i]); }
else { entry c = labs(v[i]); if (c<minimum) minimum = c; }
return minimum;
}
static boolean equal_elements(v_vec) vector* v_vec;
/* Do all nonzero elements have the same absolute value? */
{
index i, first = 0;
index n = v_vec->ncomp;
entry* v = v_vec->compon;
/* Omit prefixed 0 */
while (first < n && v[first]==0) first++;
if (first == n) return true; /* All zero */
i = first + 1;
while (i < n && (v[i]== 0 || labs(v[first]) == labs(v[i]))) i++;
if (i == n) return true;
return false;
}
object int_gcd_vec(v_vec)
vector *v_vec;
{
entry r = abs_minimum(v_vec);
entry *v;
index i;
index n = v_vec->ncomp;
if (isshared(v_vec)) v_vec = copyvector(v_vec);
v = v_vec->compon;
while (!equal_elements(v_vec)) {
for (i=0;i<n;i++)
v[i] = gcd(r, v[i]);
r = abs_minimum(v_vec);
}
return (object) mkintcel(r);
}
Symbrec static5[] =
{
C1("$bigint", (fobject)bin_from_int, BIGINT, INTEGER)
C1("$intbig", (fobject)int_from_bin, INTEGER, BIGINT)
C1("factor", vid_factor_bin, VOID, BIGINT)
C2("mat_vec", mat_matvec_vec_int,MATRIX,VECTOR,INTEGER)
C1("gcd",int_gcd_vec, INTEGER, VECTOR)
};
int nstatic5 = array_size(static5);
#ifdef __STDC__
# define P(s) s
#else
# define P(s) ()
#endif
bigint* (*int2bin) P((intcel*)) = bin_from_int;
intcel* (*bin2int) P((bigint*)) = int_from_bin;
| garetxe/lie-singlets | static/static5.c | C | lgpl-2.1 | 3,038 |
/*************** <auto-copyright.pl BEGIN do not edit this line> **************
*
* VR Juggler is (C) Copyright 1998-2007 by Iowa State University
*
* Original Authors:
* Allen Bierbaum, Christopher Just,
* Patrick Hartling, Kevin Meinert,
* Carolina Cruz-Neira, Albert Baker
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*
*************** <auto-copyright.pl END do not edit this line> ***************/
#ifndef _VRJ_DRAW_MANAGER_H_
#define _VRJ_DRAW_MANAGER_H_
#include <vrj/vrjConfig.h>
#include <iostream>
#include <jccl/RTRC/ConfigElementHandler.h>
#include <vrj/Display/DisplayPtr.h>
namespace vrj
{
class DisplayManager;
class App;
/** \class DrawManager DrawManager.h vrj/Draw/DrawManager.h
*
* Abstract base class for API-specific Draw Manager.
*
* Concrete classes are resonsible for all rendering.
*
* @date 9-7-97
*/
class VJ_CLASS_API DrawManager : public jccl::ConfigElementHandler
{
public:
DrawManager()
: mDisplayManager(NULL)
{
/* Do nothing. */ ;
}
virtual ~DrawManager()
{
/* Do nothing. */ ;
}
/**
* Function to initialy config API-specific stuff.
* Takes a jccl::Configuration and extracts API-specific stuff.
*/
//**//virtual void configInitial(jccl::Configuration* cfg) = 0;
/// Enable a frame to be drawn
virtual void draw() = 0;
/**
* Blocks until the end of the frame.
* @post The frame has been drawn.
*/
virtual void sync() = 0;
/**
* Sets the application with which the Draw Manager will interact.
*
* @note The member variable is not in the base class because its "real"
* type is only known in the derived classes.
*/
virtual void setApp(App* app) = 0;
/**
* Initializes the drawing API (if not already running).
*
* @note If the draw manager should be an active object, start the process
* here.
*/
virtual void initAPI() = 0;
/** Callback when display is added to Display Manager. */
virtual void addDisplay(DisplayPtr disp) = 0;
/** Callback when display is removed to Display Manager. */
virtual void removeDisplay(DisplayPtr disp) = 0;
/**
* Shuts down the drawing API.
*
* @note If it was an active object, kill process here.
*/
virtual void closeAPI() = 0;
/** Setter for Display Manager variable. */
void setDisplayManager(DisplayManager* dispMgr);
DisplayManager* getDisplayManager();
friend VJ_API(std::ostream&) operator<<(std::ostream& out,
DrawManager& drawMgr);
virtual void outStream(std::ostream& out)
{
out << "vrj::DrawManager: outstream\n"; // Set a default
}
protected:
DisplayManager* mDisplayManager; /**< The display manager dealing with */
};
} // End of vrj namespace
#endif
| rpavlik/vrjuggler-2.2-debs | modules/vrjuggler/vrj/Draw/DrawManager.h | C | lgpl-2.1 | 3,524 |
--TEST--
Test node order of EncryptedData children.
--DESCRIPTION--
Makes sure that the child elements of EncryptedData appear in
the correct order.
--FILE--
<?php
require($_SERVER['DOCUMENT_ROOT'] . '/../xmlseclibs.php');
$dom = new DOMDocument();
$dom->load($_SERVER['DOCUMENT_ROOT'] . '/basic-doc.xml');
$objKey = new XMLSecurityKey(XMLSecurityKey::AES256_CBC);
$objKey->generateSessionKey();
$siteKey = new XMLSecurityKey(XMLSecurityKey::RSA_OAEP_MGF1P, array('type'=>'public'));
$siteKey->loadKey($_SERVER['DOCUMENT_ROOT'] . '/mycert.pem', TRUE, TRUE);
$enc = new XMLSecEnc();
$enc->setNode($dom->documentElement);
$enc->encryptKey($siteKey, $objKey);
$enc->type = XMLSecEnc::Content;
$encNode = $enc->encryptNode($objKey);
$nodeOrder = array(
'EncryptionMethod',
'KeyInfo',
'CipherData',
'EncryptionProperties',
);
$prevNode = 0;
for ($node = $encNode->firstChild; $node !== NULL; $node = $node->nextSibling) {
if (! ($node instanceof DOMElement)) {
/* Skip comment and text nodes. */
continue;
}
$name = $node->localName;
$cIndex = array_search($name, $nodeOrder, TRUE);
if ($cIndex === FALSE) {
die("Unknown node: $name");
}
if ($cIndex >= $prevNode) {
/* In correct order. */
$prevNode = $cIndex;
continue;
}
$prevName = $nodeOrder[$prevNode];
die("Incorrect order: $name must appear before $prevName");
}
echo("OK\n");
?>
--EXPECTF--
OK
| oeru/simplesamlphp | vendor/robrichards/xmlseclibs/tests/encrypteddata-node-order.phpt | PHP | lgpl-2.1 | 1,386 |
/*
* CrocoPat is a tool for relational programming.
* This file is part of CrocoPat.
*
* Copyright (C) 2002-2008 Dirk Beyer
*
* CrocoPat is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* CrocoPat is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with CrocoPat; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* Please find the GNU Lesser General Public License in file
* License_LGPL.txt or at http://www.gnu.org/licenses/lgpl.txt
*
* Author:
* Dirk Beyer ([email protected])
* Simon Fraser University
*
* With contributions of: Andreas Noack, Michael Vogel
*/
#ifndef _relStrExpr_h
#define _relStrExpr_h
#include "relString.h"
#include "relNumExpr.h"
#include <string>
#include <sstream>
/// Global variables for interpreter.
extern map<string, relDataType*> gVariables;
/// Cmd line arg handling for the interpreter.
extern char** gArgv;
extern int gArgc;
/// Global function.
extern string double2string(double pNum);
//////////////////////////////////////////////////////////////////////////////
class relStrExpr : public relObject
{
public:
virtual relString
interpret(bddSymTab* pSymTab) = 0;
};
//////////////////////////////////////////////////////////////////////////////
class relStrExprVar : public relStrExpr
{
private:
string* mVar;
public:
relStrExprVar(string* pVar)
: mVar(pVar)
{}
~relStrExprVar()
{
delete mVar;
}
virtual relString
interpret(bddSymTab* pSymTab)
{
// Fetch result.
map<string, relDataType*>::const_iterator lVarIt = gVariables.find(*mVar);
assert(lVarIt != gVariables.end()); // Must be declared.
assert(lVarIt->second != NULL);
relString* lResult = dynamic_cast<relString*>(lVarIt->second);
assert(lResult != NULL); // Must be a STRING variable.
return *lResult;
}
};
//////////////////////////////////////////////////////////////////////////////
class relStrExprConst : public relStrExpr
{
private:
string* mVal;
public:
relStrExprConst(string* pVal)
: mVal(pVal)
{}
~relStrExprConst()
{
delete mVal;
}
virtual relString
interpret(bddSymTab* pSymTab)
{
return relString(*mVal);
}
};
//////////////////////////////////////////////////////////////////////////////
class relStrExprBinOp : public relStrExpr
{
public:
typedef enum {CONCAT} relStrOP;
private:
relStrExpr* mExpr1;
relStrOP mOp;
relStrExpr* mExpr2;
public:
relStrExprBinOp( relStrExpr* pExpr1,
relStrOP pOp,
relStrExpr* pExpr2)
: mExpr1(pExpr1),
mOp(pOp),
mExpr2(pExpr2)
{}
~relStrExprBinOp()
{
delete mExpr1;
delete mExpr2;
}
virtual relString
interpret(bddSymTab* pSymTab)
{
relString lExpr1 = mExpr1->interpret(pSymTab);
relString lExpr2 = mExpr2->interpret(pSymTab);
relString result("");
if (mOp == CONCAT) result.setValue(lExpr1.getValue() + lExpr2.getValue());
else {
cerr << "Internal error: Unknown operator in relStrExprBinOp::interpret." << endl;
abort();
}
return result;
}
};
//////////////////////////////////////////////////////////////////////////////
class relStrExprElem : public relStrExpr
{
private:
relExpression* mExpr;
public:
relStrExprElem(relExpression* pExpr)
: mExpr(pExpr)
{}
~relStrExprElem();
virtual relString
interpret(bddSymTab* pSymTab);
};
//////////////////////////////////////////////////////////////////////////////
class relStrExprNum : public relStrExpr
{
private:
relNumExpr* mExpr;
public:
relStrExprNum(relNumExpr* pExpr)
: mExpr(pExpr)
{}
~relStrExprNum()
{
delete mExpr;
}
virtual relString
interpret(bddSymTab* pSymTab)
{
return relString(double2string(mExpr->interpret(pSymTab).getValue()));
}
};
//////////////////////////////////////////////////////////////////////////////
class relStrCmdArg : public relStrExpr
{
private:
relNumExpr* mExpr;
public:
relStrCmdArg(relNumExpr* pExpr)
: mExpr(pExpr)
{}
~relStrCmdArg()
{
delete mExpr;
}
virtual relString
interpret(bddSymTab* pSymTab)
{
int lPos = (int) mExpr->interpret(pSymTab).getValue();
if (lPos >= 0 && lPos < gArgc) {
return relString(string(gArgv[lPos]));
} else {
cerr << "Error: Missing command line argument '$" << lPos << "'."
<< endl;
exit(EXIT_FAILURE);
}
}
};
#endif
| hotpeperoncino/crocopat | src/relStrExpr.h | C | lgpl-2.1 | 5,003 |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>tinymce.util.Dispatcher tests</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<link rel="stylesheet" href="http://code.jquery.com/qunit/qunit-git.css" type="text/css" />
<script src="http://code.jquery.com/qunit/qunit-git.js"></script>
<script src="qunit/connector.js"></script>
<script type="text/javascript" src="qunit/runner.js"></script>
<script type="text/javascript" src="js/utils.js"></script>
<script type="text/javascript" src="js/tiny_mce_loader.js"></script>
<script>
module("tinymce.util.Dispatcher");
(function() {
var Dispatcher = tinymce.util.Dispatcher;
test('dispatcher', 5, function() {
var ev, v, f;
ev = new Dispatcher();
ev.add(function(a, b, c) {
v = a + b + c;
});
ev.dispatch(1, 2, 3);
equal(v, 6);
ev = new Dispatcher();
v = 0;
f = ev.add(function(a, b, c) {
v = a + b + c;
});
ev.remove(f);
ev.dispatch(1, 2, 3);
equal(v, 0);
ev = new Dispatcher({test : 1});
v = 0;
f = ev.add(function(a, b, c) {
v = a + b + c + this.test;
});
ev.dispatch(1, 2, 3);
equal(v, 7);
ev = new Dispatcher();
v = 0;
f = ev.add(function(a, b, c) {
v = a + b + c + this.test;
}, {test : 1});
ev.dispatch(1, 2, 3);
equal(v, 7);
ev = new Dispatcher();
v = '';
f = ev.add(function(a, b, c) {
v += 'b';
}, {test : 1});
f = ev.addToTop(function(a, b, c) {
v += 'a';
}, {test : 1});
ev.dispatch();
equal(v, 'ab');
});
})();
</script>
</head>
<body>
<h1 id="qunit-header">tinymce.util.Dispatcher tests</h1>
<h2 id="qunit-banner"></h2>
<div id="qunit-testrunner-toolbar"></div>
<h2 id="qunit-userAgent"></h2>
<ol id="qunit-tests"></ol>
<div id="content"></div>
</body>
</html>
| Itachicz11/tinymce | tests/tinymce.util.Dispatcher.html | HTML | lgpl-2.1 | 1,929 |
////////////////////////////////////////////////////////////////
//
// Copyright (C) 2007 The Broad Institute and Affymetrix, Inc.
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License (version 2) as
// published by the Free Software Foundation.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program;if not, write to the
//
// Free Software Foundation, Inc.,
// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
////////////////////////////////////////////////////////////////
//
#include "birdseed-dev/IntensitiesParser.h"
//
#include "broadutil/BroadException.h"
#include "broadutil/BroadUtil.h"
#include "broadutil/FileUtil.h"
//
#include <cerrno>
#include <cstdio>
using namespace std;
using namespace birdseed::dev;
IntensitiesParser::~IntensitiesParser()
{
if (fp != NULL) {
fclose(fp);
}
}
IntensitiesParser::IntensitiesParser(const std::string& path, bool calculateCorrectionFactor):
dataPath(path),
fp(fopen(path.c_str(), "r")),
correctionFactor(0.0),
header(),
snpName(),
intensities()
{
if (fp == NULL) {
throw BroadException("Could not open file", __FILE__, __LINE__, path.c_str(), errno);
}
header = readHeader(fp, "probeset_id\t");
if (calculateCorrectionFactor) {
long dataStartOffset = ftell(fp);
if (dataStartOffset == -1) {
throw BroadException("ftell error", __FILE__, __LINE__, path.c_str(), errno);
}
double total = 0.0;
size_t numIntensities = 0;
while (true) {
// Skip over SNP name
snpName = readWord(fp);
if (snpName.empty()) {
break;
}
double val;
while (readDouble(fp, &val)) {
total += val;
++numIntensities;
}
}
correctionFactor = total/numIntensities;
if (fseek(fp, dataStartOffset, SEEK_SET) == -1) {
throw BroadException("fseek error", __FILE__, __LINE__, path.c_str(), errno);
}
}
}
bool IntensitiesParser::advanceSNP()
{
// Skip over first SNP name
string snpNameA = readWord(fp);
if (snpNameA.empty()) {
snpName = "";
intensities.reset(NULL);
return false;
}
if (!endswith(snpNameA.c_str(), "-A")) {
std::stringstream strm;
strm << "Did not find -A suffix for SNP name: " << snpNameA << ".";
throw BroadException(strm.str().c_str(), __FILE__, __LINE__, dataPath.c_str());
}
snpName = snpNameA.substr(0, snpNameA.size() - 2);
vector<double> aValues;
double val;
while (readDouble(fp, &val)) {
aValues.push_back(val);
}
// Skip over next SNP name
string snpNameB = readWord(fp);
if (!endswith(snpNameB.c_str(), "-B")) {
std::stringstream strm;
strm << "Did not find -B suffix for SNP name: " << snpNameB << ".";
throw BroadException(strm.str().c_str(), __FILE__, __LINE__, dataPath.c_str());
}
if (snpName != snpNameB.substr(0, snpNameB.size() - 2)) {
std::stringstream strm;
strm << "B intensities do not have same SNP name as A. SNP-A: " << snpNameA << "; SNP-B: " << snpNameB << " .";
throw BroadException(strm.str().c_str(), __FILE__, __LINE__, dataPath.c_str());
}
intensities.reset(new IntensityMatrix(aValues.size()));
// Syntactic sugar
IntensityMatrix &intensitiesRef = *(intensities.get());
for (size_t i = 0; i < aValues.size(); ++i) {
intensitiesRef[i][0] = aValues[i];
if (!readDouble(fp, &val)) {
throw BroadException("Number of B values is less than number of A values", __FILE__, __LINE__, dataPath.c_str());
}
intensitiesRef[i][1] = val;
}
return true;
}
/******************************************************************/
/**************************[END OF IntensitiesParser.cpp]*************************/
/******************************************************************/
/* Emacs configuration
* Local Variables:
* mode: C++
* tab-width:4
* End:
*/
| einon/affymetrix-power-tools | sdk/birdseed-dev/IntensitiesParser.cpp | C++ | lgpl-2.1 | 4,466 |
class TmsFakeIn < ActiveRecord::Base
set_table_name "tms_fake_in"
end
# == Schema Information
#
# Table name: tms_fake_in
#
# id :integer(10) not null, primary key
# message :text not null
# created_at :datetime
# priority :integer(10) default(0), not null
#
| jfoxGRT/jboss_upgrade | standalone/deployments/custserv-web/src/main/webapp/WEB-INF/app/models/tms_fake_in.rb | Ruby | lgpl-2.1 | 299 |
/* $Id: model_in.h,v 1.27 2004/10/25 11:37:40 aspert Exp $ */
/*
*
* Copyright (C) 2001-2004 EPFL (Swiss Federal Institute of Technology,
* Lausanne) This program is free software; you can redistribute it
* and/or modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2 of
* the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA.
*
* In addition, as a special exception, EPFL gives permission to link
* the code of this program with the Qt non-commercial edition library
* (or with modified versions of Qt non-commercial edition that use the
* same license as Qt non-commercial edition), and distribute linked
* combinations including the two. You must obey the GNU General
* Public License in all respects for all of the code used other than
* Qt non-commercial edition. If you modify this file, you may extend
* this exception to your version of the file, but you are not
* obligated to do so. If you do not wish to do so, delete this
* exception statement from your version.
*
* Authors : Nicolas Aspert, Diego Santa-Cruz and Davy Jacquet
*
* Web site : http://mesh.epfl.ch
*
* Reference :
* "MESH : Measuring Errors between Surfaces using the Hausdorff distance"
* in Proceedings of IEEE Intl. Conf. on Multimedia and Expo (ICME) 2002,
* vol. I, pp. 705-708, available on http://mesh.epfl.ch
*
*/
/*
* Functions to read 3D model data from files
*
* Author: Diego Santa Cruz
*
* N. Aspert is guilty for all the cruft to read gzipped files + Inventor +
* SMF and PLY parsers.
*
* Currently supported file formats:
*
* - Raw ascii:
* Reads vertices, faces, vertex normals and face normals.
*
* - VRML 2 (aka VRML97):
* Only the IndexedFaceSet nodes are read. All transformations are
* ignored. DEF/USE and PROTO tags are not parsed. Vertices, faces,
* vertex normals and face normals are read. Due to lack of support in
* 'struct model' for indexed vertex normals, they are converted to
* non-indexed ones by taking the last appearing normal for each vertex
* (i.e. if multiple normals exist for a vertex only the last one is
* considered). Likewise for indexed face normals.
*
* - Inventor 2:
* Only the Coordinate3-point and IndexedFaceSet-coordIndex fields
* are read. Normals and everything else is (hopefully) silently
* ignored.
*
* - SMF :
* Only the vertices and triangular faces are read (which should be
* sufficient to read the output of QSlim for instance). Every
* other field (normals, transforms, colors, begin/end, etc.) is
* ignored.
*
* - Ply :
* Only the vertices and triangular faces are read. The 'property'
* fields are *not* read (only those describing vertex coordinates
* and face indices are considered, others are skipped). Binary
* PLY should be OK. However, changing the 'binary_big_endian'
* into a 'binary_big_endian' (or the contrary) in the header can
* improve things sometimes, especially if you converted your
* ASCII file into a binary one using 'ply2binary'...
*
*/
#ifndef _MODEL_IN_PROTO
#define _MODEL_IN_PROTO
/* --------------------------------------------------------------------------*
* External includes *
* --------------------------------------------------------------------------*/
#include <3dmodel.h>
/*
* 'zlib' is not part of the Window$ platforms. Comment out this to use zlib
* under Windows (It *does* work ! I saw it on my PC !).
*/
#ifdef WIN32
# define DONT_USE_ZLIB
#endif
#ifndef DONT_USE_ZLIB
# include <zlib.h>
#endif
#ifdef __cplusplus
# define BEGIN_DECL extern "C" {
# define END_DECL }
#else
# define BEGIN_DECL
# define END_DECL
#endif
BEGIN_DECL
#undef BEGIN_DECL
/* --------------------------------------------------------------------------
BUFFERED FILE DATA STRUCTURE
-------------------------------------------------------------------------- */
struct file_data {
#ifdef DONT_USE_ZLIB
FILE *f;
#else
gzFile f;
#endif
unsigned char *block; /* data block */
int size; /* size of the block */
int nbytes; /* actual number of valid bytes in block */
int pos; /* current position in block */
int is_binary; /* flag for binary data */
int eof_reached;
};
/* --------------------------------------------------------------------------
FILE FORMATS
-------------------------------------------------------------------------- */
#define MESH_FF_AUTO 0 /* Autodetect file format */
#define MESH_FF_RAW 1 /* Raw (ascii and binary) */
#define MESH_FF_VRML 2 /* VRML 2 utf8 (a.k.a. VRML97) */
#define MESH_FF_IV 3 /* Inventor 2 ascii */
#define MESH_FF_PLY 4 /* Ply ascii */
#define MESH_FF_SMF 5 /* SMF format (from QSlim) */
#define MESH_FF_OFF 6 /* OFF format (from geomview) */
/* --------------------------------------------------------------------------
ERROR CODES (always negative)
-------------------------------------------------------------------------- */
#define MESH_NO_MEM -1 /* not enough memory */
#define MESH_CORRUPTED -2 /* corrupted file or I/O error */
#define MESH_MODEL_ERR -3 /* error in model */
#define MESH_NOT_TRIAG -4 /* not a triangular mesh */
#define MESH_BAD_FF -5 /* not a recognized file format */
#define MESH_BAD_FNAME -6 /* Could not open file name */
/* --------------------------------------------------------------------------
PARAMETERS FOR FF READERS
-------------------------------------------------------------------------- */
/* Maximum allowed word length */
#define MAX_WORD_LEN 60
/* Default initial number of elements for an array */
#define SZ_INIT_DEF 16384
/* Maximum number of elements by which an array is grown */
#define SZ_MAX_INCR 16384
/* Characters that are considered whitespace in VRML */
#define VRML_WS_CHARS " \t,\n\r"
/* Characters that start a comment in VRML */
#define VRML_COMM_ST_CHARS "#"
/* Characters that start a quoted string in VRML */
#define VRML_STR_ST_CHARS "\""
/* Characters that are whitespace, or that start a comment in VRML */
#define VRML_WSCOMM_CHARS VRML_WS_CHARS VRML_COMM_ST_CHARS
/* Characters that are whitespace, or that start a comment or string in VRML */
#define VRML_WSCOMMSTR_CHARS VRML_WS_CHARS VRML_COMM_ST_CHARS VRML_STR_ST_CHARS
/* -------------------------------------------------------------------------
EXTERNAL FUNCTIONS
------------------------------------------------------------------------- */
/*
* common part - make the [un]getc function point to the custom
* versions that read from a buffer
*/
# undef getc
# define getc buf_getc
# undef ungetc
# define ungetc buf_ungetc
/* These two macros aliased to 'getc' and 'ungetc' in
* 'model_in.h'. They behave (or at least should behave) identically
* to glibc's 'getc' and 'ungetc', except that they read from a buffer
* in memory instead of reading from a file. 'buf_getc' is able to
* refill the buffer if there is no data left to be read in the block
*/
#ifndef buf_getc
#define buf_getc(stream) \
(((stream)->nbytes > 0 && (stream)->pos < (stream)->nbytes)? \
((int)(stream)->block[((stream)->pos)++]):buf_getc_func(stream))
#endif
#ifndef buf_ungetc
#define buf_ungetc(c, stream) \
(((c) != EOF && (stream)->pos > 0) ? \
((stream)->block[--((stream)->pos)]):EOF)
#endif
/*
* Adapt all calls to the situation. If we use zlib, use the gz* functions.
* If not, use the f* ones.
*/
#ifdef DONT_USE_ZLIB
# undef loc_fopen
# define loc_fopen fopen
# undef loc_fclose
# define loc_fclose fclose
# undef loc_fread
# define loc_fread fread
# undef loc_feof
# define loc_feof feof
# undef loc_getc
# define loc_getc fgetc
# undef loc_ferror
# define loc_ferror ferror
#else
# undef loc_fopen
# define loc_fopen gzopen
# undef loc_fclose
# define loc_fclose gzclose
# undef loc_fread /* why the $%^ are they using different args ??? */
# define loc_fread(ptr, size, nemb, stream) gzread(stream, ptr, (nemb)*(size))
# undef loc_feof
# define loc_feof gzeof
# undef loc_getc
# define loc_getc gzgetc
# undef loc_ferror
#define loc_ferror gz_ferror
#endif
/* Low-level functions used by model readers - see model_in.c for
* details. Although they are exported, they should only be used in
* the model_in*.c files */
int buf_getc_func(struct file_data*);
int int_scanf(struct file_data*, int*);
int float_scanf(struct file_data*, float*);
int string_scanf(struct file_data*, char*);
int buf_fscanf_1arg(struct file_data*, const char*, void*);
void* grow_array(void*, size_t, int*, int);
int skip_ws_comm(struct file_data*);
int skip_ws_comm_str(struct file_data*);
int find_chars(struct file_data*, const char*);
int find_string(struct file_data*, const char*);
size_t bin_read(void *, size_t, size_t, struct file_data*);
/* File format reader functions - should be accessed only through
* read_[f]model. See the model_in*.c files for more details about
* their behaviour (esp. wrt. error handling and/or [un]implemented
* features of each file format) */
int read_raw_tmesh(struct model**, struct file_data*);
int read_smf_tmesh(struct model**, struct file_data*);
int read_ply_tmesh(struct model**, struct file_data*);
int read_vrml_tmesh(struct model**, struct file_data*, int);
int read_iv_tmesh(struct model**, struct file_data*);
int read_off_tmesh(struct model**, struct file_data*);
/* Reads the 3D triangular mesh models from the input '*data' stream, in the
* file format specified by 'fformat'. The model meshes are returned in the
* new '*models_ref' array (allocate via malloc). If succesful it returns the
* number of meshes read or the negative error code (MESH_CORRUPTED,
* MESH_NOT_TRIAG, etc.). If an error occurs '*models_ref' is not modified. If
* 'fformat' is MESH_FF_AUTO the file format is autodetected. If 'concat' is
* non-zero only one mesh is returned, which is the concatenation of the the
* ones read. */
int read_model(struct model **models_ref, struct file_data *data,
int fformat, int concat);
/* Reads the 3D triangular mesh models from the input file '*fname' file, in
* the file format specified by 'fformat'. The model meshes are returned in
* the new '*models_ref' array (allocated via malloc). It returns the number
* of meshes read, if succesful, or the negative error code (MESH_CORRUPTED,
* MESH_NOT_TRIAG, etc.) otherwise. If an error occurs opening the file
* MESH_BAD_FNAME is returned (the detailed error is given in errno). If an
* error occurs '*models_ref' is not modified. If 'fformat' is MESH_FF_AUTO
* the file format is autodetected. If 'concat' is non-zero only one mesh is
* returned, which is the concatenation of the the ones read. */
int read_fmodel(struct model **models_ref, const char *fname,
int fformat, int concat);
END_DECL
#undef END_DECL
#endif /* _MODEL_IN_PROTO */
| kctan0805/vdpm | share/mesh/Mesh-1.13/lib3d/include/model_in.h | C | lgpl-2.1 | 11,529 |
// Copyright (c) 2008 Roberto Raggi <[email protected]>
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
//
// W A R N I N G
// -------------
//
// This file is automatically generated.
// Changes will be lost.
//
#include "AST.h"
#include "ASTMatcher.h"
using namespace CPlusPlus;
bool ObjCSelectorArgumentAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (ObjCSelectorArgumentAST *_other = pattern->asObjCSelectorArgument())
return matcher->match(this, _other);
return false;
}
bool ObjCSelectorAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (ObjCSelectorAST *_other = pattern->asObjCSelector())
return matcher->match(this, _other);
return false;
}
bool SimpleSpecifierAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (SimpleSpecifierAST *_other = pattern->asSimpleSpecifier())
return matcher->match(this, _other);
return false;
}
bool AttributeSpecifierAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (AttributeSpecifierAST *_other = pattern->asAttributeSpecifier())
return matcher->match(this, _other);
return false;
}
bool AttributeAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (AttributeAST *_other = pattern->asAttribute())
return matcher->match(this, _other);
return false;
}
bool TypeofSpecifierAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (TypeofSpecifierAST *_other = pattern->asTypeofSpecifier())
return matcher->match(this, _other);
return false;
}
bool DeclaratorAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (DeclaratorAST *_other = pattern->asDeclarator())
return matcher->match(this, _other);
return false;
}
bool SimpleDeclarationAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (SimpleDeclarationAST *_other = pattern->asSimpleDeclaration())
return matcher->match(this, _other);
return false;
}
bool EmptyDeclarationAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (EmptyDeclarationAST *_other = pattern->asEmptyDeclaration())
return matcher->match(this, _other);
return false;
}
bool AccessDeclarationAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (AccessDeclarationAST *_other = pattern->asAccessDeclaration())
return matcher->match(this, _other);
return false;
}
bool QtObjectTagAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (QtObjectTagAST *_other = pattern->asQtObjectTag())
return matcher->match(this, _other);
return false;
}
bool QtPrivateSlotAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (QtPrivateSlotAST *_other = pattern->asQtPrivateSlot())
return matcher->match(this, _other);
return false;
}
bool QtPropertyDeclarationItemAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (QtPropertyDeclarationItemAST *_other = pattern->asQtPropertyDeclarationItem())
return matcher->match(this, _other);
return false;
}
bool QtPropertyDeclarationAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (QtPropertyDeclarationAST *_other = pattern->asQtPropertyDeclaration())
return matcher->match(this, _other);
return false;
}
bool QtEnumDeclarationAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (QtEnumDeclarationAST *_other = pattern->asQtEnumDeclaration())
return matcher->match(this, _other);
return false;
}
bool QtFlagsDeclarationAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (QtFlagsDeclarationAST *_other = pattern->asQtFlagsDeclaration())
return matcher->match(this, _other);
return false;
}
bool QtInterfaceNameAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (QtInterfaceNameAST *_other = pattern->asQtInterfaceName())
return matcher->match(this, _other);
return false;
}
bool QtInterfacesDeclarationAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (QtInterfacesDeclarationAST *_other = pattern->asQtInterfacesDeclaration())
return matcher->match(this, _other);
return false;
}
bool AsmDefinitionAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (AsmDefinitionAST *_other = pattern->asAsmDefinition())
return matcher->match(this, _other);
return false;
}
bool BaseSpecifierAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (BaseSpecifierAST *_other = pattern->asBaseSpecifier())
return matcher->match(this, _other);
return false;
}
bool IdExpressionAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (IdExpressionAST *_other = pattern->asIdExpression())
return matcher->match(this, _other);
return false;
}
bool CompoundExpressionAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (CompoundExpressionAST *_other = pattern->asCompoundExpression())
return matcher->match(this, _other);
return false;
}
bool CompoundLiteralAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (CompoundLiteralAST *_other = pattern->asCompoundLiteral())
return matcher->match(this, _other);
return false;
}
bool QtMethodAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (QtMethodAST *_other = pattern->asQtMethod())
return matcher->match(this, _other);
return false;
}
bool QtMemberDeclarationAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (QtMemberDeclarationAST *_other = pattern->asQtMemberDeclaration())
return matcher->match(this, _other);
return false;
}
bool BinaryExpressionAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (BinaryExpressionAST *_other = pattern->asBinaryExpression())
return matcher->match(this, _other);
return false;
}
bool CastExpressionAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (CastExpressionAST *_other = pattern->asCastExpression())
return matcher->match(this, _other);
return false;
}
bool ClassSpecifierAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (ClassSpecifierAST *_other = pattern->asClassSpecifier())
return matcher->match(this, _other);
return false;
}
bool CaseStatementAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (CaseStatementAST *_other = pattern->asCaseStatement())
return matcher->match(this, _other);
return false;
}
bool CompoundStatementAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (CompoundStatementAST *_other = pattern->asCompoundStatement())
return matcher->match(this, _other);
return false;
}
bool ConditionAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (ConditionAST *_other = pattern->asCondition())
return matcher->match(this, _other);
return false;
}
bool ConditionalExpressionAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (ConditionalExpressionAST *_other = pattern->asConditionalExpression())
return matcher->match(this, _other);
return false;
}
bool CppCastExpressionAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (CppCastExpressionAST *_other = pattern->asCppCastExpression())
return matcher->match(this, _other);
return false;
}
bool CtorInitializerAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (CtorInitializerAST *_other = pattern->asCtorInitializer())
return matcher->match(this, _other);
return false;
}
bool DeclarationStatementAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (DeclarationStatementAST *_other = pattern->asDeclarationStatement())
return matcher->match(this, _other);
return false;
}
bool DeclaratorIdAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (DeclaratorIdAST *_other = pattern->asDeclaratorId())
return matcher->match(this, _other);
return false;
}
bool NestedDeclaratorAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (NestedDeclaratorAST *_other = pattern->asNestedDeclarator())
return matcher->match(this, _other);
return false;
}
bool FunctionDeclaratorAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (FunctionDeclaratorAST *_other = pattern->asFunctionDeclarator())
return matcher->match(this, _other);
return false;
}
bool ArrayDeclaratorAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (ArrayDeclaratorAST *_other = pattern->asArrayDeclarator())
return matcher->match(this, _other);
return false;
}
bool DeleteExpressionAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (DeleteExpressionAST *_other = pattern->asDeleteExpression())
return matcher->match(this, _other);
return false;
}
bool DoStatementAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (DoStatementAST *_other = pattern->asDoStatement())
return matcher->match(this, _other);
return false;
}
bool NamedTypeSpecifierAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (NamedTypeSpecifierAST *_other = pattern->asNamedTypeSpecifier())
return matcher->match(this, _other);
return false;
}
bool ElaboratedTypeSpecifierAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (ElaboratedTypeSpecifierAST *_other = pattern->asElaboratedTypeSpecifier())
return matcher->match(this, _other);
return false;
}
bool EnumSpecifierAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (EnumSpecifierAST *_other = pattern->asEnumSpecifier())
return matcher->match(this, _other);
return false;
}
bool EnumeratorAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (EnumeratorAST *_other = pattern->asEnumerator())
return matcher->match(this, _other);
return false;
}
bool ExceptionDeclarationAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (ExceptionDeclarationAST *_other = pattern->asExceptionDeclaration())
return matcher->match(this, _other);
return false;
}
bool ExceptionSpecificationAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (ExceptionSpecificationAST *_other = pattern->asExceptionSpecification())
return matcher->match(this, _other);
return false;
}
bool ExpressionOrDeclarationStatementAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (ExpressionOrDeclarationStatementAST *_other = pattern->asExpressionOrDeclarationStatement())
return matcher->match(this, _other);
return false;
}
bool ExpressionStatementAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (ExpressionStatementAST *_other = pattern->asExpressionStatement())
return matcher->match(this, _other);
return false;
}
bool FunctionDefinitionAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (FunctionDefinitionAST *_other = pattern->asFunctionDefinition())
return matcher->match(this, _other);
return false;
}
bool ForeachStatementAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (ForeachStatementAST *_other = pattern->asForeachStatement())
return matcher->match(this, _other);
return false;
}
bool ForStatementAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (ForStatementAST *_other = pattern->asForStatement())
return matcher->match(this, _other);
return false;
}
bool IfStatementAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (IfStatementAST *_other = pattern->asIfStatement())
return matcher->match(this, _other);
return false;
}
bool ArrayInitializerAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (ArrayInitializerAST *_other = pattern->asArrayInitializer())
return matcher->match(this, _other);
return false;
}
bool LabeledStatementAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (LabeledStatementAST *_other = pattern->asLabeledStatement())
return matcher->match(this, _other);
return false;
}
bool LinkageBodyAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (LinkageBodyAST *_other = pattern->asLinkageBody())
return matcher->match(this, _other);
return false;
}
bool LinkageSpecificationAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (LinkageSpecificationAST *_other = pattern->asLinkageSpecification())
return matcher->match(this, _other);
return false;
}
bool MemInitializerAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (MemInitializerAST *_other = pattern->asMemInitializer())
return matcher->match(this, _other);
return false;
}
bool NestedNameSpecifierAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (NestedNameSpecifierAST *_other = pattern->asNestedNameSpecifier())
return matcher->match(this, _other);
return false;
}
bool QualifiedNameAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (QualifiedNameAST *_other = pattern->asQualifiedName())
return matcher->match(this, _other);
return false;
}
bool OperatorFunctionIdAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (OperatorFunctionIdAST *_other = pattern->asOperatorFunctionId())
return matcher->match(this, _other);
return false;
}
bool ConversionFunctionIdAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (ConversionFunctionIdAST *_other = pattern->asConversionFunctionId())
return matcher->match(this, _other);
return false;
}
bool SimpleNameAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (SimpleNameAST *_other = pattern->asSimpleName())
return matcher->match(this, _other);
return false;
}
bool DestructorNameAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (DestructorNameAST *_other = pattern->asDestructorName())
return matcher->match(this, _other);
return false;
}
bool TemplateIdAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (TemplateIdAST *_other = pattern->asTemplateId())
return matcher->match(this, _other);
return false;
}
bool NamespaceAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (NamespaceAST *_other = pattern->asNamespace())
return matcher->match(this, _other);
return false;
}
bool NamespaceAliasDefinitionAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (NamespaceAliasDefinitionAST *_other = pattern->asNamespaceAliasDefinition())
return matcher->match(this, _other);
return false;
}
bool NewPlacementAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (NewPlacementAST *_other = pattern->asNewPlacement())
return matcher->match(this, _other);
return false;
}
bool NewArrayDeclaratorAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (NewArrayDeclaratorAST *_other = pattern->asNewArrayDeclarator())
return matcher->match(this, _other);
return false;
}
bool NewExpressionAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (NewExpressionAST *_other = pattern->asNewExpression())
return matcher->match(this, _other);
return false;
}
bool NewInitializerAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (NewInitializerAST *_other = pattern->asNewInitializer())
return matcher->match(this, _other);
return false;
}
bool NewTypeIdAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (NewTypeIdAST *_other = pattern->asNewTypeId())
return matcher->match(this, _other);
return false;
}
bool OperatorAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (OperatorAST *_other = pattern->asOperator())
return matcher->match(this, _other);
return false;
}
bool ParameterDeclarationAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (ParameterDeclarationAST *_other = pattern->asParameterDeclaration())
return matcher->match(this, _other);
return false;
}
bool ParameterDeclarationClauseAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (ParameterDeclarationClauseAST *_other = pattern->asParameterDeclarationClause())
return matcher->match(this, _other);
return false;
}
bool CallAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (CallAST *_other = pattern->asCall())
return matcher->match(this, _other);
return false;
}
bool ArrayAccessAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (ArrayAccessAST *_other = pattern->asArrayAccess())
return matcher->match(this, _other);
return false;
}
bool PostIncrDecrAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (PostIncrDecrAST *_other = pattern->asPostIncrDecr())
return matcher->match(this, _other);
return false;
}
bool MemberAccessAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (MemberAccessAST *_other = pattern->asMemberAccess())
return matcher->match(this, _other);
return false;
}
bool TypeidExpressionAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (TypeidExpressionAST *_other = pattern->asTypeidExpression())
return matcher->match(this, _other);
return false;
}
bool TypenameCallExpressionAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (TypenameCallExpressionAST *_other = pattern->asTypenameCallExpression())
return matcher->match(this, _other);
return false;
}
bool TypeConstructorCallAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (TypeConstructorCallAST *_other = pattern->asTypeConstructorCall())
return matcher->match(this, _other);
return false;
}
bool PointerToMemberAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (PointerToMemberAST *_other = pattern->asPointerToMember())
return matcher->match(this, _other);
return false;
}
bool PointerAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (PointerAST *_other = pattern->asPointer())
return matcher->match(this, _other);
return false;
}
bool ReferenceAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (ReferenceAST *_other = pattern->asReference())
return matcher->match(this, _other);
return false;
}
bool BreakStatementAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (BreakStatementAST *_other = pattern->asBreakStatement())
return matcher->match(this, _other);
return false;
}
bool ContinueStatementAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (ContinueStatementAST *_other = pattern->asContinueStatement())
return matcher->match(this, _other);
return false;
}
bool GotoStatementAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (GotoStatementAST *_other = pattern->asGotoStatement())
return matcher->match(this, _other);
return false;
}
bool ReturnStatementAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (ReturnStatementAST *_other = pattern->asReturnStatement())
return matcher->match(this, _other);
return false;
}
bool SizeofExpressionAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (SizeofExpressionAST *_other = pattern->asSizeofExpression())
return matcher->match(this, _other);
return false;
}
bool PointerLiteralAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (PointerLiteralAST *_other = pattern->asPointerLiteral())
return matcher->match(this, _other);
return false;
}
bool NumericLiteralAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (NumericLiteralAST *_other = pattern->asNumericLiteral())
return matcher->match(this, _other);
return false;
}
bool BoolLiteralAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (BoolLiteralAST *_other = pattern->asBoolLiteral())
return matcher->match(this, _other);
return false;
}
bool ThisExpressionAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (ThisExpressionAST *_other = pattern->asThisExpression())
return matcher->match(this, _other);
return false;
}
bool NestedExpressionAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (NestedExpressionAST *_other = pattern->asNestedExpression())
return matcher->match(this, _other);
return false;
}
bool StringLiteralAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (StringLiteralAST *_other = pattern->asStringLiteral())
return matcher->match(this, _other);
return false;
}
bool SwitchStatementAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (SwitchStatementAST *_other = pattern->asSwitchStatement())
return matcher->match(this, _other);
return false;
}
bool TemplateDeclarationAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (TemplateDeclarationAST *_other = pattern->asTemplateDeclaration())
return matcher->match(this, _other);
return false;
}
bool ThrowExpressionAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (ThrowExpressionAST *_other = pattern->asThrowExpression())
return matcher->match(this, _other);
return false;
}
bool TranslationUnitAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (TranslationUnitAST *_other = pattern->asTranslationUnit())
return matcher->match(this, _other);
return false;
}
bool TryBlockStatementAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (TryBlockStatementAST *_other = pattern->asTryBlockStatement())
return matcher->match(this, _other);
return false;
}
bool CatchClauseAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (CatchClauseAST *_other = pattern->asCatchClause())
return matcher->match(this, _other);
return false;
}
bool TypeIdAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (TypeIdAST *_other = pattern->asTypeId())
return matcher->match(this, _other);
return false;
}
bool TypenameTypeParameterAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (TypenameTypeParameterAST *_other = pattern->asTypenameTypeParameter())
return matcher->match(this, _other);
return false;
}
bool TemplateTypeParameterAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (TemplateTypeParameterAST *_other = pattern->asTemplateTypeParameter())
return matcher->match(this, _other);
return false;
}
bool UnaryExpressionAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (UnaryExpressionAST *_other = pattern->asUnaryExpression())
return matcher->match(this, _other);
return false;
}
bool UsingAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (UsingAST *_other = pattern->asUsing())
return matcher->match(this, _other);
return false;
}
bool UsingDirectiveAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (UsingDirectiveAST *_other = pattern->asUsingDirective())
return matcher->match(this, _other);
return false;
}
bool WhileStatementAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (WhileStatementAST *_other = pattern->asWhileStatement())
return matcher->match(this, _other);
return false;
}
bool ObjCClassForwardDeclarationAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (ObjCClassForwardDeclarationAST *_other = pattern->asObjCClassForwardDeclaration())
return matcher->match(this, _other);
return false;
}
bool ObjCClassDeclarationAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (ObjCClassDeclarationAST *_other = pattern->asObjCClassDeclaration())
return matcher->match(this, _other);
return false;
}
bool ObjCProtocolForwardDeclarationAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (ObjCProtocolForwardDeclarationAST *_other = pattern->asObjCProtocolForwardDeclaration())
return matcher->match(this, _other);
return false;
}
bool ObjCProtocolDeclarationAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (ObjCProtocolDeclarationAST *_other = pattern->asObjCProtocolDeclaration())
return matcher->match(this, _other);
return false;
}
bool ObjCProtocolRefsAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (ObjCProtocolRefsAST *_other = pattern->asObjCProtocolRefs())
return matcher->match(this, _other);
return false;
}
bool ObjCMessageArgumentAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (ObjCMessageArgumentAST *_other = pattern->asObjCMessageArgument())
return matcher->match(this, _other);
return false;
}
bool ObjCMessageExpressionAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (ObjCMessageExpressionAST *_other = pattern->asObjCMessageExpression())
return matcher->match(this, _other);
return false;
}
bool ObjCProtocolExpressionAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (ObjCProtocolExpressionAST *_other = pattern->asObjCProtocolExpression())
return matcher->match(this, _other);
return false;
}
bool ObjCTypeNameAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (ObjCTypeNameAST *_other = pattern->asObjCTypeName())
return matcher->match(this, _other);
return false;
}
bool ObjCEncodeExpressionAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (ObjCEncodeExpressionAST *_other = pattern->asObjCEncodeExpression())
return matcher->match(this, _other);
return false;
}
bool ObjCSelectorExpressionAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (ObjCSelectorExpressionAST *_other = pattern->asObjCSelectorExpression())
return matcher->match(this, _other);
return false;
}
bool ObjCInstanceVariablesDeclarationAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (ObjCInstanceVariablesDeclarationAST *_other = pattern->asObjCInstanceVariablesDeclaration())
return matcher->match(this, _other);
return false;
}
bool ObjCVisibilityDeclarationAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (ObjCVisibilityDeclarationAST *_other = pattern->asObjCVisibilityDeclaration())
return matcher->match(this, _other);
return false;
}
bool ObjCPropertyAttributeAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (ObjCPropertyAttributeAST *_other = pattern->asObjCPropertyAttribute())
return matcher->match(this, _other);
return false;
}
bool ObjCPropertyDeclarationAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (ObjCPropertyDeclarationAST *_other = pattern->asObjCPropertyDeclaration())
return matcher->match(this, _other);
return false;
}
bool ObjCMessageArgumentDeclarationAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (ObjCMessageArgumentDeclarationAST *_other = pattern->asObjCMessageArgumentDeclaration())
return matcher->match(this, _other);
return false;
}
bool ObjCMethodPrototypeAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (ObjCMethodPrototypeAST *_other = pattern->asObjCMethodPrototype())
return matcher->match(this, _other);
return false;
}
bool ObjCMethodDeclarationAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (ObjCMethodDeclarationAST *_other = pattern->asObjCMethodDeclaration())
return matcher->match(this, _other);
return false;
}
bool ObjCSynthesizedPropertyAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (ObjCSynthesizedPropertyAST *_other = pattern->asObjCSynthesizedProperty())
return matcher->match(this, _other);
return false;
}
bool ObjCSynthesizedPropertiesDeclarationAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (ObjCSynthesizedPropertiesDeclarationAST *_other = pattern->asObjCSynthesizedPropertiesDeclaration())
return matcher->match(this, _other);
return false;
}
bool ObjCDynamicPropertiesDeclarationAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (ObjCDynamicPropertiesDeclarationAST *_other = pattern->asObjCDynamicPropertiesDeclaration())
return matcher->match(this, _other);
return false;
}
bool ObjCFastEnumerationAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (ObjCFastEnumerationAST *_other = pattern->asObjCFastEnumeration())
return matcher->match(this, _other);
return false;
}
bool ObjCSynchronizedStatementAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (ObjCSynchronizedStatementAST *_other = pattern->asObjCSynchronizedStatement())
return matcher->match(this, _other);
return false;
}
bool LambdaExpressionAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (LambdaExpressionAST *_other = pattern->asLambdaExpression())
return matcher->match(this, _other);
return false;
}
bool LambdaIntroducerAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (LambdaIntroducerAST *_other = pattern->asLambdaIntroducer())
return matcher->match(this, _other);
return false;
}
bool LambdaCaptureAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (LambdaCaptureAST *_other = pattern->asLambdaCapture())
return matcher->match(this, _other);
return false;
}
bool CaptureAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (CaptureAST *_other = pattern->asCapture())
return matcher->match(this, _other);
return false;
}
bool LambdaDeclaratorAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (LambdaDeclaratorAST *_other = pattern->asLambdaDeclarator())
return matcher->match(this, _other);
return false;
}
bool TrailingReturnTypeAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (TrailingReturnTypeAST *_other = pattern->asTrailingReturnType())
return matcher->match(this, _other);
return false;
}
bool BracedInitializerAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (BracedInitializerAST *_other = pattern->asBracedInitializer())
return matcher->match(this, _other);
return false;
}
| bakaiadam/collaborative_qt_creator | src/libs/3rdparty/cplusplus/ASTMatch0.cpp | C++ | lgpl-2.1 | 30,168 |
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Qt 4.6: textprogressbar.cpp Example File (network/downloadmanager/textprogressbar.cpp)</title>
<link href="classic.css" rel="stylesheet" type="text/css" />
</head>
<body>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td align="left" valign="top" width="32"><a href="http://qt.nokia.com/"><img src="images/qt-logo.png" align="left" border="0" /></a></td>
<td width="1"> </td><td class="postheader" valign="center"><a href="index.html"><font color="#004faf">Home</font></a> · <a href="classes.html"><font color="#004faf">All Classes</font></a> · <a href="functions.html"><font color="#004faf">All Functions</font></a> · <a href="overviews.html"><font color="#004faf">Overviews</font></a></td></tr></table><h1 class="title">textprogressbar.cpp Example File<br /><span class="small-subtitle">network/downloadmanager/textprogressbar.cpp</span>
</h1>
<pre><span class="comment"> /****************************************************************************
**
** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation ([email protected])
**
** This file is part of the examples of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial Usage
** Licensees holding valid Qt Commercial licenses may use this file in
** accordance with the Qt Commercial License Agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and Nokia.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, Nokia gives you certain additional
** rights. These rights are described in the Nokia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 3.0 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
** packaging of this file. Please review the following information to
** ensure the GNU General Public License version 3.0 requirements will be
** met: http://www.gnu.org/copyleft/gpl.html.
**
** If you have questions regarding the use of this file, please contact
** Nokia at [email protected].
** $QT_END_LICENSE$
**
****************************************************************************/</span>
#include "textprogressbar.h"
#include <QByteArray>
#include <stdio.h>
TextProgressBar::TextProgressBar()
: value(0), maximum(-1), iteration(0)
{
}
void TextProgressBar::clear()
{
printf("\n");
fflush(stdout);
iteration = 0;
value = 0;
maximum = -1;
}
void TextProgressBar::update()
{
++iteration;
if (maximum > 0) {
<span class="comment">// we know the maximum</span>
<span class="comment">// draw a progress bar</span>
int percent = value * 100 / maximum;
int hashes = percent / 2;
QByteArray progressbar(hashes, '#');
if (percent % 2)
progressbar += '>';
printf("\r[%-50s] %3d%% %s ",
progressbar.constData(),
percent,
qPrintable(message));
} else {
<span class="comment">// we don't know the maximum, so we can't draw a progress bar</span>
int center = (iteration % 48) + 1; <span class="comment">// 50 spaces, minus 2</span>
QByteArray before(qMax(center - 2, 0), ' ');
QByteArray after(qMin(center + 2, 50), ' ');
printf("\r[%s###%s] %s ",
before.constData(), after.constData(), qPrintable(message));
}
}
void TextProgressBar::setMessage(const QString &m)
{
message = m;
}
void TextProgressBar::setStatus(qint64 val, qint64 max)
{
value = val;
maximum = max;
}</pre>
<p /><address><hr /><div align="center">
<table width="100%" cellspacing="0" border="0"><tr class="address">
<td width="40%" align="left">Copyright © 2010 Nokia Corporation and/or its subsidiary(-ies)</td>
<td width="20%" align="center"><a href="trademarks.html">Trademarks</a></td>
<td width="40%" align="right"><div align="right">Qt 4.6.2</div></td>
</tr></table></div></address></body>
</html>
| kobolabs/qt-everywhere-opensource-src-4.6.2 | doc/html/network-downloadmanager-textprogressbar-cpp.html | HTML | lgpl-2.1 | 5,083 |
//
// YTS.c
//
// $Author: why $
// $Date: 2005/09/20 23:42:51 $
//
// Copyright (C) 2004 why the lucky stiff
//
// Well, this is the Yaml Testing Suite in the form of a plain C
// API. Basically, this is as good as C integration gets for Syck.
// You've got to have a symbol table around. From there, you can
// query your data.
//
#include "system.h"
#include "syck.h"
#include "CuTest.h"
#include "debug.h"
/* YAML test node structures */
#define T_STR 10
#define T_SEQ 20
#define T_MAP 30
#define T_END 40
#define ILEN 2
struct test_node {
int type;
char *tag;
char *key;
struct test_node *value;
};
struct test_node end_node = { T_END };
/*
* Assertion which compares a YAML document with an
* equivalent set of test_node structs.
*/
SYMID
syck_copy_handler(p, n)
SyckParser *p;
SyckNode *n;
{
int i = 0;
struct test_node *tn = S_ALLOC_N( struct test_node, 1 );
switch ( n->kind )
{
case syck_str_kind:
tn->type = T_STR;
tn->key = syck_strndup( n->data.str->ptr, n->data.str->len );
tn->value = 0;
break;
case syck_seq_kind:
{
struct test_node *val;
struct test_node *seq = S_ALLOC_N( struct test_node, n->data.list->idx + 1 );
tn->type = T_SEQ;
tn->key = 0;
for ( i = 0; i < n->data.list->idx; i++ )
{
SYMID oid = syck_seq_read( n, i );
syck_lookup_sym( p, oid, (char **)&val );
seq[i] = val[0];
}
seq[n->data.list->idx] = end_node;
tn->value = seq;
}
break;
case syck_map_kind:
{
struct test_node *val;
struct test_node *map = S_ALLOC_N( struct test_node, ( n->data.pairs->idx * 2 ) + 1 );
tn->type = T_MAP;
tn->key = 0;
for ( i = 0; i < n->data.pairs->idx; i++ )
{
SYMID oid = syck_map_read( n, map_key, i );
syck_lookup_sym( p, oid, (char **)&val );
map[i * 2] = val[0];
oid = syck_map_read( n, map_value, i );
syck_lookup_sym( p, oid, (char **)&val );
map[(i * 2) + 1] = val[0];
}
map[n->data.pairs->idx * 2] = end_node;
tn->value = map;
}
break;
}
tn->tag = 0;
if ( n->type_id != NULL ) {
tn->tag = syck_strndup( n->type_id, strlen( n->type_id ) );
}
return syck_add_sym( p, (char *) tn );
}
int
syck_free_copies( char *key, struct test_node *tn, char *arg )
{
if ( tn != NULL ) {
switch ( tn->type ) {
case T_STR:
S_FREE( tn->key );
break;
case T_SEQ:
case T_MAP:
S_FREE( tn->value );
break;
}
if ( tn->tag != NULL ) S_FREE( tn->tag );
S_FREE( tn );
}
tn = NULL;
return ST_CONTINUE;
}
void CuStreamCompareX( CuTest* tc, struct test_node *s1, struct test_node *s2 ) {
int i = 0;
while ( 1 ) {
CuAssertIntEquals( tc, s1[i].type, s2[i].type );
if ( s1[i].type == T_END ) return;
if ( s1[i].tag != 0 && s2[i].tag != 0 ) CuAssertStrEquals( tc, s1[i].tag, s2[i].tag );
switch ( s1[i].type ) {
case T_STR:
CuAssertStrEquals( tc, s1[i].key, s2[i].key );
break;
case T_SEQ:
case T_MAP:
CuStreamCompareX( tc, s1[i].value, s2[i].value );
break;
}
i++;
}
}
void CuStreamCompare( CuTest* tc, char *yaml, struct test_node *stream ) {
int doc_ct = 0;
struct test_node *ystream = S_ALLOC_N( struct test_node, doc_ct + 1 );
/* Set up parser */
SyckParser *parser = syck_new_parser();
syck_parser_str_auto( parser, yaml, NULL );
syck_parser_handler( parser, syck_copy_handler );
syck_parser_error_handler( parser, NULL );
syck_parser_implicit_typing( parser, 1 );
syck_parser_taguri_expansion( parser, 1 );
/* Parse all streams */
while ( 1 )
{
struct test_node *ydoc;
SYMID oid = syck_parse( parser );
if ( parser->eof == 1 ) break;
/* Add document to stream */
syck_lookup_sym( parser, oid, (char **)&ydoc );
ystream[doc_ct] = ydoc[0];
doc_ct++;
S_REALLOC_N( ystream, struct test_node, doc_ct + 1 );
}
ystream[doc_ct] = end_node;
/* Traverse the struct and the symbol table side-by-side */
/* DEBUG: y( stream, 0 ); y( ystream, 0 ); */
CuStreamCompareX( tc, stream, ystream );
/* Free the node tables and the parser */
S_FREE( ystream );
if ( parser->syms != NULL )
st_foreach( parser->syms, (void *)syck_free_copies, 0 );
syck_free_parser( parser );
}
/*
* Setup for testing N->Y->N.
*/
void
test_output_handler( emitter, str, len )
SyckEmitter *emitter;
char *str;
long len;
{
CuString *dest = (CuString *)emitter->bonus;
CuStringAppendLen( dest, str, len );
}
SYMID
build_symbol_table( SyckEmitter *emitter, struct test_node *node ) {
switch ( node->type ) {
case T_SEQ:
case T_MAP:
{
int i = 0;
while ( node->value[i].type != T_END ) {
build_symbol_table( emitter, &node->value[i] );
i++;
}
}
return syck_emitter_mark_node( emitter, (st_data_t)node );
default: break;
}
return 0;
}
void
test_emitter_handler( SyckEmitter *emitter, st_data_t data ) {
struct test_node *node = (struct test_node *)data;
switch ( node->type ) {
case T_STR:
syck_emit_scalar( emitter, node->tag, scalar_none, 0, 0, 0, node->key, strlen( node->key ) );
break;
case T_SEQ:
{
int i = 0;
syck_emit_seq( emitter, node->tag, seq_none );
while ( node->value[i].type != T_END ) {
syck_emit_item( emitter, (st_data_t)&node->value[i] );
i++;
}
syck_emit_end( emitter );
}
break;
case T_MAP:
{
int i = 0;
syck_emit_map( emitter, node->tag, map_none );
while ( node->value[i].type != T_END ) {
syck_emit_item( emitter, (st_data_t)&node->value[i] );
i++;
}
syck_emit_end( emitter );
}
break;
}
}
void CuRoundTrip( CuTest* tc, struct test_node *stream ) {
int i = 0;
CuString *cs = CuStringNew();
SyckEmitter *emitter = syck_new_emitter();
/* Calculate anchors and tags */
build_symbol_table( emitter, stream );
/* Build the stream */
syck_output_handler( emitter, test_output_handler );
syck_emitter_handler( emitter, test_emitter_handler );
emitter->bonus = cs;
while ( stream[i].type != T_END )
{
syck_emit( emitter, (st_data_t)&stream[i] );
syck_emitter_flush( emitter, 0 );
i++;
}
/* Reload the stream and compare */
/* printf( "-- output for %s --\n%s\n--- end of output --\n", tc->name, cs->buffer ); */
CuStreamCompare( tc, cs->buffer, stream );
CuStringFree( cs );
syck_free_emitter( emitter );
}
/*
* ACTUAL TESTS FOR THE YAML TESTING SUITE BEGIN HERE
* (EVERYTHING PREVIOUS WAS SET UP FOR THE TESTS)
*/
/*
* Example : Trailing tab in plains
*/
void
YtsFoldedScalars_7( CuTest *tc )
{
struct test_node map[] = {
{ T_STR, 0, "a" },
{ T_STR, 0, "b" },
end_node
};
struct test_node stream[] = {
{ T_MAP, 0, 0, map },
end_node
};
CuStreamCompare( tc,
/* YAML document */
"a: b\t \n"
,
/* C structure of validations */
stream
);
CuRoundTrip( tc, stream );
}
/*
* Example : Empty Sequence
*/
void
YtsNullsAndEmpties_0( CuTest *tc )
{
struct test_node seq[] = {
end_node
};
struct test_node map[] = {
{ T_STR, 0, "empty" },
{ T_SEQ, 0, 0, seq },
end_node
};
struct test_node stream[] = {
{ T_MAP, 0, 0, map },
end_node
};
CuStreamCompare( tc,
/* YAML document */
"empty: [] \n"
,
/* C structure of validations */
stream
);
CuRoundTrip( tc, stream );
}
/*
* Example : Empty Mapping
*/
void
YtsNullsAndEmpties_1( CuTest *tc )
{
struct test_node map2[] = {
end_node
};
struct test_node map1[] = {
{ T_STR, 0, "empty" },
{ T_MAP, 0, 0, map2 },
end_node
};
struct test_node stream[] = {
{ T_MAP, 0, 0, map1 },
end_node
};
CuStreamCompare( tc,
/* YAML document */
"empty: {} \n"
,
/* C structure of validations */
stream
);
CuRoundTrip( tc, stream );
}
/*
* Example : Empty Sequence as Entire Document
*/
void
YtsNullsAndEmpties_2( CuTest *tc )
{
struct test_node seq[] = {
end_node
};
struct test_node stream[] = {
{ T_SEQ, 0, 0, seq },
end_node
};
CuStreamCompare( tc,
/* YAML document */
"--- [] \n"
,
/* C structure of validations */
stream
);
CuRoundTrip( tc, stream );
}
/*
* Example : Empty Mapping as Entire Document
*/
void
YtsNullsAndEmpties_3( CuTest *tc )
{
struct test_node map[] = {
end_node
};
struct test_node stream[] = {
{ T_MAP, 0, 0, map },
end_node
};
CuStreamCompare( tc,
/* YAML document */
"--- {} \n"
,
/* C structure of validations */
stream
);
CuRoundTrip( tc, stream );
}
/*
* Example : Null as Document
*/
void
YtsNullsAndEmpties_4( CuTest *tc )
{
struct test_node stream[] = {
{ T_STR, 0, "~" },
end_node
};
CuStreamCompare( tc,
/* YAML document */
"--- ~ \n"
,
/* C structure of validations */
stream
);
CuRoundTrip( tc, stream );
}
/*
* Example : Empty String
*/
void
YtsNullsAndEmpties_5( CuTest *tc )
{
struct test_node stream[] = {
{ T_STR, 0, "" },
end_node
};
CuStreamCompare( tc,
/* YAML document */
"--- '' \n"
,
/* C structure of validations */
stream
);
CuRoundTrip( tc, stream );
}
/*
* Example 2.1: Sequence of scalars
*/
void
YtsSpecificationExamples_0( CuTest *tc )
{
struct test_node seq[] = {
{ T_STR, 0, "Mark McGwire" },
{ T_STR, 0, "Sammy Sosa" },
{ T_STR, 0, "Ken Griffey" },
end_node
};
struct test_node stream[] = {
{ T_SEQ, 0, 0, seq },
end_node
};
CuStreamCompare( tc,
/* YAML document */
"- Mark McGwire \n"
"- Sammy Sosa \n"
"- Ken Griffey \n"
,
/* C structure of validations */
stream
);
CuRoundTrip( tc, stream );
}
/*
* Example 2.2: Mapping of scalars to scalars
*/
void
YtsSpecificationExamples_1( CuTest *tc )
{
struct test_node map[] = {
{ T_STR, 0, "hr" },
{ T_STR, 0, "65" },
{ T_STR, 0, "avg" },
{ T_STR, 0, "0.278" },
{ T_STR, 0, "rbi" },
{ T_STR, 0, "147" },
end_node
};
struct test_node stream[] = {
{ T_MAP, 0, 0, map },
end_node
};
CuStreamCompare( tc,
/* YAML document */
"hr: 65 \n"
"avg: 0.278 \n"
"rbi: 147 \n"
,
/* C structure of validations */
stream
);
CuRoundTrip( tc, stream );
}
/*
* Example 2.3: Mapping of scalars to sequences
*/
void
YtsSpecificationExamples_2( CuTest *tc )
{
struct test_node seq1[] = {
{ T_STR, 0, "Boston Red Sox" },
{ T_STR, 0, "Detroit Tigers" },
{ T_STR, 0, "New York Yankees" },
end_node
};
struct test_node seq2[] = {
{ T_STR, 0, "New York Mets" },
{ T_STR, 0, "Chicago Cubs" },
{ T_STR, 0, "Atlanta Braves" },
end_node
};
struct test_node map[] = {
{ T_STR, 0, "american" },
{ T_SEQ, 0, 0, seq1 },
{ T_STR, 0, "national" },
{ T_SEQ, 0, 0, seq2 },
end_node
};
struct test_node stream[] = {
{ T_MAP, 0, 0, map },
end_node
};
CuStreamCompare( tc,
/* YAML document */
"american: \n"
" - Boston Red Sox \n"
" - Detroit Tigers \n"
" - New York Yankees \n"
"national: \n"
" - New York Mets \n"
" - Chicago Cubs \n"
" - Atlanta Braves \n"
,
/* C structure of validations */
stream
);
CuRoundTrip( tc, stream );
}
/*
* Example 2.4: Sequence of mappings
*/
void
YtsSpecificationExamples_3( CuTest *tc )
{
struct test_node map1[] = {
{ T_STR, 0, "name" },
{ T_STR, 0, "Mark McGwire" },
{ T_STR, 0, "hr" },
{ T_STR, 0, "65" },
{ T_STR, 0, "avg" },
{ T_STR, 0, "0.278" },
end_node
};
struct test_node map2[] = {
{ T_STR, 0, "name" },
{ T_STR, 0, "Sammy Sosa" },
{ T_STR, 0, "hr" },
{ T_STR, 0, "63" },
{ T_STR, 0, "avg" },
{ T_STR, 0, "0.288" },
end_node
};
struct test_node seq[] = {
{ T_MAP, 0, 0, map1 },
{ T_MAP, 0, 0, map2 },
end_node
};
struct test_node stream[] = {
{ T_SEQ, 0, 0, seq },
end_node
};
CuStreamCompare( tc,
/* YAML document */
"- \n"
" name: Mark McGwire \n"
" hr: 65 \n"
" avg: 0.278 \n"
"- \n"
" name: Sammy Sosa \n"
" hr: 63 \n"
" avg: 0.288 \n"
,
/* C structure of validations */
stream
);
CuRoundTrip( tc, stream );
}
/*
* Example legacy_A5: Legacy A5
*/
void
YtsSpecificationExamples_4( CuTest *tc )
{
struct test_node seq1[] = {
{ T_STR, 0, "New York Yankees" },
{ T_STR, 0, "Atlanta Braves" },
end_node
};
struct test_node seq2[] = {
{ T_STR, 0, "2001-07-02" },
{ T_STR, 0, "2001-08-12" },
{ T_STR, 0, "2001-08-14" },
end_node
};
struct test_node seq3[] = {
{ T_STR, 0, "Detroit Tigers" },
{ T_STR, 0, "Chicago Cubs" },
end_node
};
struct test_node seq4[] = {
{ T_STR, 0, "2001-07-23" },
end_node
};
struct test_node map[] = {
{ T_SEQ, 0, 0, seq1 },
{ T_SEQ, 0, 0, seq2 },
{ T_SEQ, 0, 0, seq3 },
{ T_SEQ, 0, 0, seq4 },
end_node
};
struct test_node stream[] = {
{ T_MAP, 0, 0, map },
end_node
};
CuStreamCompare( tc,
/* YAML document */
"? \n"
" - New York Yankees \n"
" - Atlanta Braves \n"
": \n"
" - 2001-07-02 \n"
" - 2001-08-12 \n"
" - 2001-08-14 \n"
"? \n"
" - Detroit Tigers \n"
" - Chicago Cubs \n"
": \n"
" - 2001-07-23 \n"
,
/* C structure of validations */
stream
);
CuRoundTrip( tc, stream );
}
/*
* Example 2.5: Sequence of sequences
*/
void
YtsSpecificationExamples_5( CuTest *tc )
{
struct test_node seq1[] = {
{ T_STR, 0, "name" },
{ T_STR, 0, "hr" },
{ T_STR, 0, "avg" },
end_node
};
struct test_node seq2[] = {
{ T_STR, 0, "Mark McGwire" },
{ T_STR, 0, "65" },
{ T_STR, 0, "0.278" },
end_node
};
struct test_node seq3[] = {
{ T_STR, 0, "Sammy Sosa" },
{ T_STR, 0, "63" },
{ T_STR, 0, "0.288" },
end_node
};
struct test_node seq[] = {
{ T_SEQ, 0, 0, seq1 },
{ T_SEQ, 0, 0, seq2 },
{ T_SEQ, 0, 0, seq3 },
end_node
};
struct test_node stream[] = {
{ T_SEQ, 0, 0, seq },
end_node
};
CuStreamCompare( tc,
/* YAML document */
"- [ name , hr , avg ] \n"
"- [ Mark McGwire , 65 , 0.278 ] \n"
"- [ Sammy Sosa , 63 , 0.288 ] \n"
,
/* C structure of validations */
stream
);
CuRoundTrip( tc, stream );
}
/*
* Example 2.6: Mapping of mappings
*/
void
YtsSpecificationExamples_6( CuTest *tc )
{
struct test_node map1[] = {
{ T_STR, 0, "hr" },
{ T_STR, 0, "65" },
{ T_STR, 0, "avg" },
{ T_STR, 0, "0.278" },
end_node
};
struct test_node map2[] = {
{ T_STR, 0, "hr" },
{ T_STR, 0, "63" },
{ T_STR, 0, "avg" },
{ T_STR, 0, "0.288" },
end_node
};
struct test_node map[] = {
{ T_STR, 0, "Mark McGwire" },
{ T_MAP, 0, 0, map1 },
{ T_STR, 0, "Sammy Sosa" },
{ T_MAP, 0, 0, map2 },
end_node
};
struct test_node stream[] = {
{ T_MAP, 0, 0, map },
end_node
};
CuStreamCompare( tc,
/* YAML document */
"Mark McGwire: {hr: 65, avg: 0.278}\n"
"Sammy Sosa: {\n"
" hr: 63,\n"
" avg: 0.288\n"
" }\n"
,
/* C structure of validations */
stream
);
CuRoundTrip( tc, stream );
}
/*
* Example 2.7: Two documents in a stream each with a leading comment
*/
void
YtsSpecificationExamples_7( CuTest *tc )
{
struct test_node seq1[] = {
{ T_STR, 0, "Mark McGwire" },
{ T_STR, 0, "Sammy Sosa" },
{ T_STR, 0, "Ken Griffey" },
end_node
};
struct test_node seq2[] = {
{ T_STR, 0, "Chicago Cubs" },
{ T_STR, 0, "St Louis Cardinals" },
end_node
};
struct test_node stream[] = {
{ T_SEQ, 0, 0, seq1 },
{ T_SEQ, 0, 0, seq2 },
end_node
};
CuStreamCompare( tc,
/* YAML document */
"# Ranking of 1998 home runs\n"
"---\n"
"- Mark McGwire\n"
"- Sammy Sosa\n"
"- Ken Griffey\n"
"\n"
"# Team ranking\n"
"---\n"
"- Chicago Cubs\n"
"- St Louis Cardinals\n"
,
/* C structure of validations */
stream
);
CuRoundTrip( tc, stream );
}
/*
* Example 2.8: Play by play feed from a game
*/
void
YtsSpecificationExamples_8( CuTest *tc )
{
struct test_node map1[] = {
{ T_STR, 0, "time" },
{ T_STR, 0, "20:03:20" },
{ T_STR, 0, "player" },
{ T_STR, 0, "Sammy Sosa" },
{ T_STR, 0, "action" },
{ T_STR, 0, "strike (miss)" },
end_node
};
struct test_node map2[] = {
{ T_STR, 0, "time" },
{ T_STR, 0, "20:03:47" },
{ T_STR, 0, "player" },
{ T_STR, 0, "Sammy Sosa" },
{ T_STR, 0, "action" },
{ T_STR, 0, "grand slam" },
end_node
};
struct test_node stream[] = {
{ T_MAP, 0, 0, map1 },
{ T_MAP, 0, 0, map2 },
end_node
};
CuStreamCompare( tc,
/* YAML document */
"---\n"
"time: 20:03:20\n"
"player: Sammy Sosa\n"
"action: strike (miss)\n"
"...\n"
"---\n"
"time: 20:03:47\n"
"player: Sammy Sosa\n"
"action: grand slam\n"
"...\n"
,
/* C structure of validations */
stream
);
CuRoundTrip( tc, stream );
}
/*
* Example 2.9: Single document with two comments
*/
void
YtsSpecificationExamples_9( CuTest *tc )
{
struct test_node seq1[] = {
{ T_STR, 0, "Mark McGwire" },
{ T_STR, 0, "Sammy Sosa" },
end_node
};
struct test_node seq2[] = {
{ T_STR, 0, "Sammy Sosa" },
{ T_STR, 0, "Ken Griffey" },
end_node
};
struct test_node map[] = {
{ T_STR, 0, "hr" },
{ T_SEQ, 0, 0, seq1 },
{ T_STR, 0, "rbi" },
{ T_SEQ, 0, 0, seq2 },
end_node
};
struct test_node stream[] = {
{ T_MAP, 0, 0, map },
end_node
};
CuStreamCompare( tc,
/* YAML document */
"hr: # 1998 hr ranking \n"
" - Mark McGwire \n"
" - Sammy Sosa \n"
"rbi: \n"
" # 1998 rbi ranking \n"
" - Sammy Sosa \n"
" - Ken Griffey \n"
,
/* C structure of validations */
stream
);
CuRoundTrip( tc, stream );
}
/*
* Example 2.1: Node for Sammy Sosa appears twice in this document
*/
void
YtsSpecificationExamples_10( CuTest *tc )
{
struct test_node seq1[] = {
{ T_STR, 0, "Mark McGwire" },
{ T_STR, 0, "Sammy Sosa" },
end_node
};
struct test_node seq2[] = {
{ T_STR, 0, "Sammy Sosa" },
{ T_STR, 0, "Ken Griffey" },
end_node
};
struct test_node map[] = {
{ T_STR, 0, "hr" },
{ T_SEQ, 0, 0, seq1 },
{ T_STR, 0, "rbi" },
{ T_SEQ, 0, 0, seq2 },
end_node
};
struct test_node stream[] = {
{ T_MAP, 0, 0, map },
end_node
};
CuStreamCompare( tc,
/* YAML document */
"---\n"
"hr: \n"
" - Mark McGwire \n"
" # Following node labeled SS \n"
" - &SS Sammy Sosa \n"
"rbi: \n"
" - *SS # Subsequent occurance \n"
" - Ken Griffey \n"
,
/* C structure of validations */
stream
);
CuRoundTrip( tc, stream );
}
/*
* Example 2.11: Mapping between sequences
*/
void
YtsSpecificationExamples_11( CuTest *tc )
{
struct test_node seq1[] = {
{ T_STR, 0, "New York Yankees" },
{ T_STR, 0, "Atlanta Braves" },
end_node
};
struct test_node seq2[] = {
{ T_STR, 0, "2001-07-02" },
{ T_STR, 0, "2001-08-12" },
{ T_STR, 0, "2001-08-14" },
end_node
};
struct test_node seq3[] = {
{ T_STR, 0, "Detroit Tigers" },
{ T_STR, 0, "Chicago Cubs" },
end_node
};
struct test_node seq4[] = {
{ T_STR, 0, "2001-07-23" },
end_node
};
struct test_node map[] = {
{ T_SEQ, 0, 0, seq3 },
{ T_SEQ, 0, 0, seq4 },
{ T_SEQ, 0, 0, seq1 },
{ T_SEQ, 0, 0, seq2 },
end_node
};
struct test_node stream[] = {
{ T_MAP, 0, 0, map },
end_node
};
CuStreamCompare( tc,
/* YAML document */
"? # PLAY SCHEDULE \n"
" - Detroit Tigers \n"
" - Chicago Cubs \n"
": \n"
" - 2001-07-23 \n"
"\n"
"? [ New York Yankees, \n"
" Atlanta Braves ] \n"
": [ 2001-07-02, 2001-08-12, \n"
" 2001-08-14 ] \n"
,
/* C structure of validations */
stream
);
CuRoundTrip( tc, stream );
}
/*
* Example 2.12: Sequence key shortcut
*/
void
YtsSpecificationExamples_12( CuTest *tc )
{
struct test_node map1[] = {
{ T_STR, 0, "item" },
{ T_STR, 0, "Super Hoop" },
{ T_STR, 0, "quantity" },
{ T_STR, 0, "1" },
end_node
};
struct test_node map2[] = {
{ T_STR, 0, "item" },
{ T_STR, 0, "Basketball" },
{ T_STR, 0, "quantity" },
{ T_STR, 0, "4" },
end_node
};
struct test_node map3[] = {
{ T_STR, 0, "item" },
{ T_STR, 0, "Big Shoes" },
{ T_STR, 0, "quantity" },
{ T_STR, 0, "1" },
end_node
};
struct test_node seq[] = {
{ T_MAP, 0, 0, map1 },
{ T_MAP, 0, 0, map2 },
{ T_MAP, 0, 0, map3 },
end_node
};
struct test_node stream[] = {
{ T_SEQ, 0, 0, seq },
end_node
};
CuStreamCompare( tc,
/* YAML document */
"---\n"
"# products purchased\n"
"- item : Super Hoop\n"
" quantity: 1\n"
"- item : Basketball\n"
" quantity: 4\n"
"- item : Big Shoes\n"
" quantity: 1\n"
,
/* C structure of validations */
stream
);
CuRoundTrip( tc, stream );
}
/*
* Example 2.13: Literal perserves newlines
*/
void
YtsSpecificationExamples_13( CuTest *tc )
{
struct test_node stream[] = {
{ T_STR, 0, "\\//||\\/||\n// || ||_\n" },
end_node
};
CuStreamCompare( tc,
/* YAML document */
"# ASCII Art\n"
"--- | \n"
" \\//||\\/||\n"
" // || ||_\n"
,
/* C structure of validations */
stream
);
CuRoundTrip( tc, stream );
}
/*
* Example 2.14: Folded treats newlines as a space
*/
void
YtsSpecificationExamples_14( CuTest *tc )
{
struct test_node stream[] = {
{ T_STR, 0, "Mark McGwire's year was crippled by a knee injury." },
end_node
};
CuStreamCompare( tc,
/* YAML document */
"---\n"
" Mark McGwire's\n"
" year was crippled\n"
" by a knee injury.\n"
,
/* C structure of validations */
stream
);
CuRoundTrip( tc, stream );
}
/*
* Example 2.15: Newlines preserved for indented and blank lines
*/
void
YtsSpecificationExamples_15( CuTest *tc )
{
struct test_node stream[] = {
{ T_STR, 0, "Sammy Sosa completed another fine season with great stats.\n\n 63 Home Runs\n 0.288 Batting Average\n\nWhat a year!\n" },
end_node
};
CuStreamCompare( tc,
/* YAML document */
"--- > \n"
" Sammy Sosa completed another\n"
" fine season with great stats.\n"
"\n"
" 63 Home Runs\n"
" 0.288 Batting Average\n"
"\n"
" What a year!\n"
,
/* C structure of validations */
stream
);
CuRoundTrip( tc, stream );
}
/*
* Example 2.16: Indentation determines scope
*/
void
YtsSpecificationExamples_16( CuTest *tc )
{
struct test_node map[] = {
{ T_STR, 0, "name" },
{ T_STR, 0, "Mark McGwire" },
{ T_STR, 0, "accomplishment" },
{ T_STR, 0, "Mark set a major league home run record in 1998.\n" },
{ T_STR, 0, "stats" },
{ T_STR, 0, "65 Home Runs\n0.278 Batting Average\n" },
end_node
};
struct test_node stream[] = {
{ T_MAP, 0, 0, map },
end_node
};
CuStreamCompare( tc,
/* YAML document */
"name: Mark McGwire \n"
"accomplishment: > \n"
" Mark set a major league\n"
" home run record in 1998.\n"
"stats: | \n"
" 65 Home Runs\n"
" 0.278 Batting Average\n"
,
/* C structure of validations */
stream
);
CuRoundTrip( tc, stream );
}
/*
* Example 2.18: Multiline flow scalars
*/
void
YtsSpecificationExamples_18( CuTest *tc )
{
struct test_node map[] = {
{ T_STR, 0, "plain" },
{ T_STR, 0, "This unquoted scalar spans many lines." },
{ T_STR, 0, "quoted" },
{ T_STR, 0, "So does this quoted scalar.\n" },
end_node
};
struct test_node stream[] = {
{ T_MAP, 0, 0, map },
end_node
};
CuStreamCompare( tc,
/* YAML document */
"plain:\n"
" This unquoted scalar\n"
" spans many lines.\n"
"\n"
"quoted: \"So does this\n"
" quoted scalar.\\n\"\n"
,
/* C structure of validations */
stream
);
CuRoundTrip( tc, stream );
}
/*
* Example 2.19: Integers
*/
void
YtsSpecificationExamples_19( CuTest *tc )
{
struct test_node map[] = {
{ T_STR, 0, "canonical" },
{ T_STR, 0, "12345" },
{ T_STR, 0, "decimal" },
{ T_STR, 0, "+12,345" },
{ T_STR, 0, "sexagecimal" },
{ T_STR, 0, "3:25:45" },
{ T_STR, 0, "octal" },
{ T_STR, 0, "014" },
{ T_STR, 0, "hexadecimal" },
{ T_STR, 0, "0xC" },
end_node
};
struct test_node stream[] = {
{ T_MAP, 0, 0, map },
end_node
};
CuStreamCompare( tc,
/* YAML document */
"canonical: 12345 \n"
"decimal: +12,345 \n"
"sexagecimal: 3:25:45\n"
"octal: 014 \n"
"hexadecimal: 0xC \n"
,
/* C structure of validations */
stream
);
CuRoundTrip( tc, stream );
}
/*
* Example 2.2: Floating point
*/
void
YtsSpecificationExamples_20( CuTest *tc )
{
struct test_node map[] = {
{ T_STR, 0, "canonical" },
{ T_STR, 0, "1.23015e+3" },
{ T_STR, 0, "exponential" },
{ T_STR, 0, "12.3015e+02" },
{ T_STR, 0, "sexagecimal" },
{ T_STR, 0, "20:30.15" },
{ T_STR, 0, "fixed" },
{ T_STR, 0, "1,230.15" },
{ T_STR, 0, "negative infinity" },
{ T_STR, 0, "-.inf" },
{ T_STR, 0, "not a number" },
{ T_STR, 0, ".NaN" },
end_node
};
struct test_node stream[] = {
{ T_MAP, 0, 0, map },
end_node
};
CuStreamCompare( tc,
/* YAML document */
"canonical: 1.23015e+3 \n"
"exponential: 12.3015e+02 \n"
"sexagecimal: 20:30.15\n"
"fixed: 1,230.15 \n"
"negative infinity: -.inf\n"
"not a number: .NaN \n"
,
/* C structure of validations */
stream
);
CuRoundTrip( tc, stream );
}
/*
* Example 2.21: Miscellaneous
*/
void
YtsSpecificationExamples_21( CuTest *tc )
{
struct test_node map[] = {
{ T_STR, 0, "null" },
{ T_STR, 0, "~" },
{ T_STR, 0, "true" },
{ T_STR, 0, "y" },
{ T_STR, 0, "false" },
{ T_STR, 0, "n" },
{ T_STR, 0, "string" },
{ T_STR, 0, "12345" },
end_node
};
struct test_node stream[] = {
{ T_MAP, 0, 0, map },
end_node
};
CuStreamCompare( tc,
/* YAML document */
"null: ~ \n"
"true: y\n"
"false: n \n"
"string: '12345' \n"
,
/* C structure of validations */
stream
);
CuRoundTrip( tc, stream );
}
/*
* Example 2.22: Timestamps
*/
void
YtsSpecificationExamples_22( CuTest *tc )
{
struct test_node map[] = {
{ T_STR, 0, "canonical" },
{ T_STR, 0, "2001-12-15T02:59:43.1Z" },
{ T_STR, 0, "iso8601" },
{ T_STR, 0, "2001-12-14t21:59:43.10-05:00" },
{ T_STR, 0, "spaced" },
{ T_STR, 0, "2001-12-14 21:59:43.10 -05:00" },
{ T_STR, 0, "date" },
{ T_STR, 0, "2002-12-14" },
end_node
};
struct test_node stream[] = {
{ T_MAP, 0, 0, map },
end_node
};
CuStreamCompare( tc,
/* YAML document */
"canonical: 2001-12-15T02:59:43.1Z\n"
"iso8601: 2001-12-14t21:59:43.10-05:00\n"
"spaced: 2001-12-14 21:59:43.10 -05:00\n"
"date: 2002-12-14 # Time is noon UTC\n"
,
/* C structure of validations */
stream
);
CuRoundTrip( tc, stream );
}
/*
* Example legacy D4: legacy Timestamps test
*/
void
YtsSpecificationExamples_23( CuTest *tc )
{
struct test_node map[] = {
{ T_STR, 0, "canonical" },
{ T_STR, 0, "2001-12-15T02:59:43.00Z" },
{ T_STR, 0, "iso8601" },
{ T_STR, 0, "2001-02-28t21:59:43.00-05:00" },
{ T_STR, 0, "spaced" },
{ T_STR, 0, "2001-12-14 21:59:43.00 -05:00" },
{ T_STR, 0, "date" },
{ T_STR, 0, "2002-12-14" },
end_node
};
struct test_node stream[] = {
{ T_MAP, 0, 0, map },
end_node
};
CuStreamCompare( tc,
/* YAML document */
"canonical: 2001-12-15T02:59:43.00Z\n"
"iso8601: 2001-02-28t21:59:43.00-05:00\n"
"spaced: 2001-12-14 21:59:43.00 -05:00\n"
"date: 2002-12-14\n"
,
/* C structure of validations */
stream
);
CuRoundTrip( tc, stream );
}
/*
* Example 2.23: Various explicit families
*/
void
YtsSpecificationExamples_24( CuTest *tc )
{
struct test_node map[] = {
{ T_STR, 0, "not-date" },
{ T_STR, "tag:yaml.org,2002:str", "2002-04-28" },
{ T_STR, 0, "picture" },
{ T_STR, "tag:yaml.org,2002:binary", "R0lGODlhDAAMAIQAAP//9/X\n17unp5WZmZgAAAOfn515eXv\nPz7Y6OjuDg4J+fn5OTk6enp\n56enmleECcgggoBADs=\n" },
{ T_STR, 0, "application specific tag" },
{ T_STR, "x-private:something", "The semantics of the tag\nabove may be different for\ndifferent documents.\n" },
end_node
};
struct test_node stream[] = {
{ T_MAP, 0, 0, map },
end_node
};
CuStreamCompare( tc,
/* YAML document */
"not-date: !str 2002-04-28\n"
"picture: !binary |\n"
" R0lGODlhDAAMAIQAAP//9/X\n"
" 17unp5WZmZgAAAOfn515eXv\n"
" Pz7Y6OjuDg4J+fn5OTk6enp\n"
" 56enmleECcgggoBADs=\n"
"\n"
"application specific tag: !!something |\n"
" The semantics of the tag\n"
" above may be different for\n"
" different documents.\n"
,
/* C structure of validations */
stream
);
CuRoundTrip( tc, stream );
}
/*
* Example 2.24: Application specific family
*/
void
YtsSpecificationExamples_25( CuTest *tc )
{
struct test_node point1[] = {
{ T_STR, 0, "x" },
{ T_STR, 0, "73" },
{ T_STR, 0, "y" },
{ T_STR, 0, "129" },
end_node
};
struct test_node point2[] = {
{ T_STR, 0, "x" },
{ T_STR, 0, "89" },
{ T_STR, 0, "y" },
{ T_STR, 0, "102" },
end_node
};
struct test_node map1[] = {
{ T_STR, 0, "center" },
{ T_MAP, 0, 0, point1 },
{ T_STR, 0, "radius" },
{ T_STR, 0, "7" },
end_node
};
struct test_node map2[] = {
{ T_STR, 0, "start" },
{ T_MAP, 0, 0, point1 },
{ T_STR, 0, "finish" },
{ T_MAP, 0, 0, point2 },
end_node
};
struct test_node map3[] = {
{ T_STR, 0, "start" },
{ T_MAP, 0, 0, point1 },
{ T_STR, 0, "color" },
{ T_STR, 0, "0xFFEEBB" },
{ T_STR, 0, "value" },
{ T_STR, 0, "Pretty vector drawing." },
end_node
};
struct test_node seq[] = {
{ T_MAP, "tag:clarkevans.com,2002:graph/circle", 0, map1 },
{ T_MAP, "tag:clarkevans.com,2002:graph/line", 0, map2 },
{ T_MAP, "tag:clarkevans.com,2002:graph/label", 0, map3 },
end_node
};
struct test_node stream[] = {
{ T_SEQ, "tag:clarkevans.com,2002:graph/shape", 0, seq },
end_node
};
CuStreamCompare( tc,
/* YAML document */
"# Establish a tag prefix\n"
"--- !clarkevans.com,2002/graph/^shape\n"
" # Use the prefix: shorthand for\n"
" # !clarkevans.com,2002/graph/circle\n"
"- !^circle\n"
" center: &ORIGIN {x: 73, 'y': 129}\n"
" radius: 7\n"
"- !^line # !clarkevans.com,2002/graph/line\n"
" start: *ORIGIN\n"
" finish: { x: 89, 'y': 102 }\n"
"- !^label\n"
" start: *ORIGIN\n"
" color: 0xFFEEBB\n"
" value: Pretty vector drawing.\n"
,
/* C structure of validations */
stream
);
CuRoundTrip( tc, stream );
}
/*
* Example 2.26: Ordered mappings
*/
void
YtsSpecificationExamples_26( CuTest *tc )
{
struct test_node map1[] = {
{ T_STR, 0, "Mark McGwire" },
{ T_STR, 0, "65" },
end_node
};
struct test_node map2[] = {
{ T_STR, 0, "Sammy Sosa" },
{ T_STR, 0, "63" },
end_node
};
struct test_node map3[] = {
{ T_STR, 0, "Ken Griffy" },
{ T_STR, 0, "58" },
end_node
};
struct test_node seq[] = {
{ T_MAP, 0, 0, map1 },
{ T_MAP, 0, 0, map2 },
{ T_MAP, 0, 0, map3 },
end_node
};
struct test_node stream[] = {
{ T_SEQ, "tag:yaml.org,2002:omap", 0, seq },
end_node
};
CuStreamCompare( tc,
/* YAML document */
"# ordered maps are represented as\n"
"# a sequence of mappings, with\n"
"# each mapping having one key\n"
"--- !omap\n"
"- Mark McGwire: 65\n"
"- Sammy Sosa: 63\n"
"- Ken Griffy: 58\n"
,
/* C structure of validations */
stream
);
CuRoundTrip( tc, stream );
}
/*
* Example 2.27: Invoice
*/
void
YtsSpecificationExamples_27( CuTest *tc )
{
struct test_node prod1[] = {
{ T_STR, 0, "sku" },
{ T_STR, 0, "BL394D" },
{ T_STR, 0, "quantity" },
{ T_STR, 0, "4" },
{ T_STR, 0, "description" },
{ T_STR, 0, "Basketball" },
{ T_STR, 0, "price" },
{ T_STR, 0, "450.00" },
end_node
};
struct test_node prod2[] = {
{ T_STR, 0, "sku" },
{ T_STR, 0, "BL4438H" },
{ T_STR, 0, "quantity" },
{ T_STR, 0, "1" },
{ T_STR, 0, "description" },
{ T_STR, 0, "Super Hoop" },
{ T_STR, 0, "price" },
{ T_STR, 0, "2392.00" },
end_node
};
struct test_node products[] = {
{ T_MAP, 0, 0, prod1 },
{ T_MAP, 0, 0, prod2 },
end_node
};
struct test_node address[] = {
{ T_STR, 0, "lines" },
{ T_STR, 0, "458 Walkman Dr.\nSuite #292\n" },
{ T_STR, 0, "city" },
{ T_STR, 0, "Royal Oak" },
{ T_STR, 0, "state" },
{ T_STR, 0, "MI" },
{ T_STR, 0, "postal" },
{ T_STR, 0, "48046" },
end_node
};
struct test_node id001[] = {
{ T_STR, 0, "given" },
{ T_STR, 0, "Chris" },
{ T_STR, 0, "family" },
{ T_STR, 0, "Dumars" },
{ T_STR, 0, "address" },
{ T_MAP, 0, 0, address },
end_node
};
struct test_node map[] = {
{ T_STR, 0, "invoice" },
{ T_STR, 0, "34843" },
{ T_STR, 0, "date" },
{ T_STR, 0, "2001-01-23" },
{ T_STR, 0, "bill-to" },
{ T_MAP, 0, 0, id001 },
{ T_STR, 0, "ship-to" },
{ T_MAP, 0, 0, id001 },
{ T_STR, 0, "product" },
{ T_SEQ, 0, 0, products },
{ T_STR, 0, "tax" },
{ T_STR, 0, "251.42" },
{ T_STR, 0, "total" },
{ T_STR, 0, "4443.52" },
{ T_STR, 0, "comments" },
{ T_STR, 0, "Late afternoon is best. Backup contact is Nancy Billsmer @ 338-4338.\n" },
end_node
};
struct test_node stream[] = {
{ T_MAP, "tag:clarkevans.com,2002:invoice", 0, map },
end_node
};
CuStreamCompare( tc,
/* YAML document */
"--- !clarkevans.com,2002/^invoice\n"
"invoice: 34843\n"
"date : 2001-01-23\n"
"bill-to: &id001\n"
" given : Chris\n"
" family : Dumars\n"
" address:\n"
" lines: |\n"
" 458 Walkman Dr.\n"
" Suite #292\n"
" city : Royal Oak\n"
" state : MI\n"
" postal : 48046\n"
"ship-to: *id001\n"
"product:\n"
" - sku : BL394D\n"
" quantity : 4\n"
" description : Basketball\n"
" price : 450.00\n"
" - sku : BL4438H\n"
" quantity : 1\n"
" description : Super Hoop\n"
" price : 2392.00\n"
"tax : 251.42\n"
"total: 4443.52\n"
"comments: >\n"
" Late afternoon is best.\n"
" Backup contact is Nancy\n"
" Billsmer @ 338-4338.\n"
,
/* C structure of validations */
stream
);
CuRoundTrip( tc, stream );
}
/*
* Example 2.28: Log file
*/
void
YtsSpecificationExamples_28( CuTest *tc )
{
struct test_node map1[] = {
{ T_STR, 0, "Time" },
{ T_STR, 0, "2001-11-23 15:01:42 -05:00" },
{ T_STR, 0, "User" },
{ T_STR, 0, "ed" },
{ T_STR, 0, "Warning" },
{ T_STR, 0, "This is an error message for the log file\n" },
end_node
};
struct test_node map2[] = {
{ T_STR, 0, "Time" },
{ T_STR, 0, "2001-11-23 15:02:31 -05:00" },
{ T_STR, 0, "User" },
{ T_STR, 0, "ed" },
{ T_STR, 0, "Warning" },
{ T_STR, 0, "A slightly different error message.\n" },
end_node
};
struct test_node file1[] = {
{ T_STR, 0, "file" },
{ T_STR, 0, "TopClass.py" },
{ T_STR, 0, "line" },
{ T_STR, 0, "23" },
{ T_STR, 0, "code" },
{ T_STR, 0, "x = MoreObject(\"345\\n\")\n" },
end_node
};
struct test_node file2[] = {
{ T_STR, 0, "file" },
{ T_STR, 0, "MoreClass.py" },
{ T_STR, 0, "line" },
{ T_STR, 0, "58" },
{ T_STR, 0, "code" },
{ T_STR, 0, "foo = bar" },
end_node
};
struct test_node stack[] = {
{ T_MAP, 0, 0, file1 },
{ T_MAP, 0, 0, file2 },
end_node
};
struct test_node map3[] = {
{ T_STR, 0, "Date" },
{ T_STR, 0, "2001-11-23 15:03:17 -05:00" },
{ T_STR, 0, "User" },
{ T_STR, 0, "ed" },
{ T_STR, 0, "Fatal" },
{ T_STR, 0, "Unknown variable \"bar\"\n" },
{ T_STR, 0, "Stack" },
{ T_SEQ, 0, 0, stack },
end_node
};
struct test_node stream[] = {
{ T_MAP, 0, 0, map1 },
{ T_MAP, 0, 0, map2 },
{ T_MAP, 0, 0, map3 },
end_node
};
CuStreamCompare( tc,
/* YAML document */
"---\n"
"Time: 2001-11-23 15:01:42 -05:00\n"
"User: ed\n"
"Warning: >\n"
" This is an error message\n"
" for the log file\n"
"---\n"
"Time: 2001-11-23 15:02:31 -05:00\n"
"User: ed\n"
"Warning: >\n"
" A slightly different error\n"
" message.\n"
"---\n"
"Date: 2001-11-23 15:03:17 -05:00\n"
"User: ed\n"
"Fatal: >\n"
" Unknown variable \"bar\"\n"
"Stack:\n"
" - file: TopClass.py\n"
" line: 23\n"
" code: |\n"
" x = MoreObject(\"345\\n\")\n"
" - file: MoreClass.py\n"
" line: 58\n"
" code: |-\n"
" foo = bar\n"
,
/* C structure of validations */
stream
);
CuRoundTrip( tc, stream );
}
/*
* Example : Throwaway comments
*/
void
YtsSpecificationExamples_29( CuTest *tc )
{
struct test_node map[] = {
{ T_STR, 0, "this" },
{ T_STR, 0, "contains three lines of text.\nThe third one starts with a\n# character. This isn't a comment.\n" },
end_node
};
struct test_node stream[] = {
{ T_MAP, 0, 0, map },
end_node
};
CuStreamCompare( tc,
/* YAML document */
"### These are four throwaway comment ### \n"
"\n"
"### lines (the second line is empty). ### \n"
"this: | # Comments may trail lines.\n"
" contains three lines of text.\n"
" The third one starts with a\n"
" # character. This isn't a comment.\n"
"\n"
"# These are three throwaway comment\n"
"# lines (the first line is empty).\n"
,
/* C structure of validations */
stream
);
CuRoundTrip( tc, stream );
}
/*
* Example : Document with a single value
*/
void
YtsSpecificationExamples_30( CuTest *tc )
{
struct test_node stream[] = {
{ T_STR, 0, "This YAML stream contains a single text value. The next stream is a log file - a sequence of log entries. Adding an entry to the log is a simple matter of appending it at the end.\n" },
end_node
};
CuStreamCompare( tc,
/* YAML document */
"--- > \n"
"This YAML stream contains a single text value.\n"
"The next stream is a log file - a sequence of\n"
"log entries. Adding an entry to the log is a\n"
"simple matter of appending it at the end.\n"
,
/* C structure of validations */
stream
);
CuRoundTrip( tc, stream );
}
/*
* Example : Document stream
*/
void
YtsSpecificationExamples_31( CuTest *tc )
{
struct test_node map1[] = {
{ T_STR, 0, "at" },
{ T_STR, 0, "2001-08-12 09:25:00.00 Z" },
{ T_STR, 0, "type" },
{ T_STR, 0, "GET" },
{ T_STR, 0, "HTTP" },
{ T_STR, 0, "1.0" },
{ T_STR, 0, "url" },
{ T_STR, 0, "/index.html" },
end_node
};
struct test_node map2[] = {
{ T_STR, 0, "at" },
{ T_STR, 0, "2001-08-12 09:25:10.00 Z" },
{ T_STR, 0, "type" },
{ T_STR, 0, "GET" },
{ T_STR, 0, "HTTP" },
{ T_STR, 0, "1.0" },
{ T_STR, 0, "url" },
{ T_STR, 0, "/toc.html" },
end_node
};
struct test_node stream[] = {
{ T_MAP, 0, 0, map1 },
{ T_MAP, 0, 0, map2 },
end_node
};
CuStreamCompare( tc,
/* YAML document */
"--- \n"
"at: 2001-08-12 09:25:00.00 Z \n"
"type: GET \n"
"HTTP: '1.0' \n"
"url: '/index.html' \n"
"--- \n"
"at: 2001-08-12 09:25:10.00 Z \n"
"type: GET \n"
"HTTP: '1.0' \n"
"url: '/toc.html' \n"
,
/* C structure of validations */
stream
);
CuRoundTrip( tc, stream );
}
/*
* Example : Top level mapping
*/
void
YtsSpecificationExamples_32( CuTest *tc )
{
struct test_node map[] = {
{ T_STR, 0, "invoice" },
{ T_STR, 0, "34843" },
{ T_STR, 0, "date" },
{ T_STR, 0, "2001-01-23" },
{ T_STR, 0, "total" },
{ T_STR, 0, "4443.52" },
end_node
};
struct test_node stream[] = {
{ T_MAP, 0, 0, map },
end_node
};
CuStreamCompare( tc,
/* YAML document */
"# This stream is an example of a top-level mapping. \n"
"invoice : 34843 \n"
"date : 2001-01-23 \n"
"total : 4443.52 \n"
,
/* C structure of validations */
stream
);
CuRoundTrip( tc, stream );
}
/*
* Example : Single-line documents
*/
void
YtsSpecificationExamples_33( CuTest *tc )
{
struct test_node map[] = {
end_node
};
struct test_node seq[] = {
end_node
};
struct test_node stream[] = {
{ T_MAP, 0, 0, map },
{ T_SEQ, 0, 0, seq },
{ T_STR, 0, "" },
end_node
};
CuStreamCompare( tc,
/* YAML document */
"# The following is a sequence of three documents. \n"
"# The first contains an empty mapping, the second \n"
"# an empty sequence, and the last an empty string. \n"
"--- {} \n"
"--- [ ] \n"
"--- '' \n"
,
/* C structure of validations */
stream
);
CuRoundTrip( tc, stream );
}
/*
* Example : Document with pause
*/
void
YtsSpecificationExamples_34( CuTest *tc )
{
struct test_node map1[] = {
{ T_STR, 0, "sent at" },
{ T_STR, 0, "2002-06-06 11:46:25.10 Z" },
{ T_STR, 0, "payload" },
{ T_STR, 0, "Whatever" },
end_node
};
struct test_node map2[] = {
{ T_STR, 0, "sent at" },
{ T_STR, 0, "2002-06-06 12:05:53.47 Z" },
{ T_STR, 0, "payload" },
{ T_STR, 0, "Whatever" },
end_node
};
struct test_node stream[] = {
{ T_MAP, 0, 0, map1 },
{ T_MAP, 0, 0, map2 },
end_node
};
CuStreamCompare( tc,
/* YAML document */
"# A communication channel based on a YAML stream. \n"
"--- \n"
"sent at: 2002-06-06 11:46:25.10 Z \n"
"payload: Whatever \n"
"# Receiver can process this as soon as the following is sent: \n"
"... \n"
"# Even if the next message is sent long after: \n"
"--- \n"
"sent at: 2002-06-06 12:05:53.47 Z \n"
"payload: Whatever \n"
"... \n"
,
/* C structure of validations */
stream
);
CuRoundTrip( tc, stream );
}
/*
* Example : Explicit typing
*/
void
YtsSpecificationExamples_35( CuTest *tc )
{
struct test_node map[] = {
{ T_STR, 0, "integer" },
{ T_STR, "tag:yaml.org,2002:int", "12" },
{ T_STR, 0, "also int" },
{ T_STR, "tag:yaml.org,2002:int", "12" },
{ T_STR, 0, "string" },
{ T_STR, "tag:yaml.org,2002:str", "12" },
end_node
};
struct test_node stream[] = {
{ T_MAP, 0, 0, map },
end_node
};
CuStreamCompare( tc,
/* YAML document */
"integer: 12 \n"
"also int: ! \"12\" \n"
"string: !str 12 \n"
,
/* C structure of validations */
stream
);
CuRoundTrip( tc, stream );
}
/*
* Example : Private types
*/
void
YtsSpecificationExamples_36( CuTest *tc )
{
struct test_node pool[] = {
{ T_STR, 0, "number" },
{ T_STR, 0, "8" },
{ T_STR, 0, "color" },
{ T_STR, 0, "black" },
end_node
};
struct test_node map1[] = {
{ T_STR, 0, "pool" },
{ T_MAP, "x-private:ball", 0, pool },
end_node
};
struct test_node bearing[] = {
{ T_STR, 0, "material" },
{ T_STR, 0, "steel" },
end_node
};
struct test_node map2[] = {
{ T_STR, 0, "bearing" },
{ T_MAP, "x-private:ball", 0, bearing },
end_node
};
struct test_node stream[] = {
{ T_MAP, 0, 0, map1 },
{ T_MAP, 0, 0, map2 },
end_node
};
CuStreamCompare( tc,
/* YAML document */
"# Both examples below make use of the 'x-private:ball' \n"
"# type family URI, but with different semantics. \n"
"--- \n"
"pool: !!ball \n"
" number: 8 \n"
" color: black \n"
"--- \n"
"bearing: !!ball \n"
" material: steel \n"
,
/* C structure of validations */
stream
);
CuRoundTrip( tc, stream );
}
/*
* Example : Type family under yaml.org
*/
void
YtsSpecificationExamples_37( CuTest *tc )
{
struct test_node seq[] = {
{ T_STR, "tag:yaml.org,2002:str", "a Unicode string" },
end_node
};
struct test_node stream[] = {
{ T_SEQ, 0, 0, seq },
end_node
};
CuStreamCompare( tc,
/* YAML document */
"# The URI is 'tag:yaml.org,2002:str' \n"
"- !str a Unicode string \n"
,
/* C structure of validations */
stream
);
CuRoundTrip( tc, stream );
}
/*
* Example : Type family under perl.yaml.org
*/
void
YtsSpecificationExamples_38( CuTest *tc )
{
struct test_node map[] = {
end_node
};
struct test_node seq[] = {
{ T_MAP, "tag:perl.yaml.org,2002:Text::Tabs", 0, map },
end_node
};
struct test_node stream[] = {
{ T_SEQ, 0, 0, seq },
end_node
};
CuStreamCompare( tc,
/* YAML document */
"# The URI is 'tag:perl.yaml.org,2002:Text::Tabs' \n"
"- !perl/Text::Tabs {} \n"
,
/* C structure of validations */
stream
);
CuRoundTrip( tc, stream );
}
/*
* Example : Type family under clarkevans.com
*/
void
YtsSpecificationExamples_39( CuTest *tc )
{
struct test_node map[] = {
end_node
};
struct test_node seq[] = {
{ T_MAP, "tag:clarkevans.com,2003-02:timesheet", 0, map },
end_node
};
struct test_node stream[] = {
{ T_SEQ, 0, 0, seq },
end_node
};
CuStreamCompare( tc,
/* YAML document */
"# The URI is 'tag:clarkevans.com,2003-02:timesheet' \n"
"- !clarkevans.com,2003-02/timesheet {}\n"
,
/* C structure of validations */
stream
);
CuRoundTrip( tc, stream );
}
/*
* Example : URI Escaping
*/
void
YtsSpecificationExamples_40( CuTest *tc )
{
struct test_node same[] = {
{ T_STR, "tag:domain.tld,2002:type0", "value" },
{ T_STR, "tag:domain.tld,2002:type0", "value" },
end_node
};
struct test_node diff[] = {
{ T_STR, "tag:domain.tld,2002:type%30", "value" },
{ T_STR, "tag:domain.tld,2002:type0", "value" },
end_node
};
struct test_node map[] = {
{ T_STR, 0, "same" },
{ T_SEQ, 0, 0, same },
{ T_STR, 0, "different" },
{ T_SEQ, 0, 0, diff },
end_node
};
struct test_node stream[] = {
{ T_MAP, 0, 0, map },
end_node
};
CuStreamCompare( tc,
/* YAML document */
"same: \n"
" - !domain.tld,2002/type\\x30 value\n"
" - !domain.tld,2002/type0 value\n"
"different: # As far as the YAML parser is concerned \n"
" - !domain.tld,2002/type%30 value\n"
" - !domain.tld,2002/type0 value\n"
,
/* C structure of validations */
stream
);
CuRoundTrip( tc, stream );
}
/*
* Example : Overriding anchors
*/
void
YtsSpecificationExamples_42( CuTest *tc )
{
struct test_node map[] = {
{ T_STR, 0, "anchor" },
{ T_STR, 0, "This scalar has an anchor." },
{ T_STR, 0, "override" },
{ T_STR, 0, "The alias node below is a repeated use of this value.\n" },
{ T_STR, 0, "alias" },
{ T_STR, 0, "The alias node below is a repeated use of this value.\n" },
end_node
};
struct test_node stream[] = {
{ T_MAP, 0, 0, map },
end_node
};
CuStreamCompare( tc,
/* YAML document */
"anchor : &A001 This scalar has an anchor. \n"
"override : &A001 >\n"
" The alias node below is a\n"
" repeated use of this value.\n"
"alias : *A001\n"
,
/* C structure of validations */
stream
);
CuRoundTrip( tc, stream );
}
/*
* Example : Flow and block formatting
*/
void
YtsSpecificationExamples_43( CuTest *tc )
{
struct test_node empty[] = {
end_node
};
struct test_node flow[] = {
{ T_STR, 0, "one" },
{ T_STR, 0, "two" },
{ T_STR, 0, "three" },
{ T_STR, 0, "four" },
{ T_STR, 0, "five" },
end_node
};
struct test_node inblock[] = {
{ T_STR, 0, "Subordinate sequence entry" },
end_node
};
struct test_node block[] = {
{ T_STR, 0, "First item in top sequence" },
{ T_SEQ, 0, 0, inblock },
{ T_STR, 0, "A folded sequence entry\n" },
{ T_STR, 0, "Sixth item in top sequence" },
end_node
};
struct test_node map[] = {
{ T_STR, 0, "empty" },
{ T_SEQ, 0, 0, empty },
{ T_STR, 0, "flow" },
{ T_SEQ, 0, 0, flow },
{ T_STR, 0, "block" },
{ T_SEQ, 0, 0, block },
end_node
};
struct test_node stream[] = {
{ T_MAP, 0, 0, map },
end_node
};
CuStreamCompare( tc,
/* YAML document */
"empty: [] \n"
"flow: [ one, two, three # May span lines, \n"
" , four, # indentation is \n"
" five ] # mostly ignored. \n"
"block: \n"
" - First item in top sequence \n"
" - \n"
" - Subordinate sequence entry \n"
" - > \n"
" A folded sequence entry\n"
" - Sixth item in top sequence \n"
,
/* C structure of validations */
stream
);
CuRoundTrip( tc, stream );
}
/*
* Example : Literal combinations
*/
void
YtsSpecificationExamples_47( CuTest *tc )
{
struct test_node map[] = {
{ T_STR, 0, "empty" },
{ T_STR, 0, "" },
{ T_STR, 0, "literal" },
{ T_STR, 0, "The \\ ' \" characters may be\nfreely used. Leading white\n space "
"is significant.\n\nLine breaks are significant.\nThus this value contains one\n"
"empty line and ends with a\nsingle line break, but does\nnot start with one.\n" },
{ T_STR, 0, "is equal to" },
{ T_STR, 0, "The \\ ' \" characters may be\nfreely used. Leading white\n space "
"is significant.\n\nLine breaks are significant.\nThus this value contains one\n"
"empty line and ends with a\nsingle line break, but does\nnot start with one.\n" },
{ T_STR, 0, "indented and chomped" },
{ T_STR, 0, " This has no newline." },
{ T_STR, 0, "also written as" },
{ T_STR, 0, " This has no newline." },
{ T_STR, 0, "both are equal to" },
{ T_STR, 0, " This has no newline." },
end_node
};
struct test_node stream[] = {
{ T_MAP, 0, 0, map },
end_node
};
CuStreamCompare( tc,
/* YAML document */
"empty: |\n"
"\n"
"literal: |\n"
" The \\ ' \" characters may be\n"
" freely used. Leading white\n"
" space is significant.\n"
"\n"
" Line breaks are significant.\n"
" Thus this value contains one\n"
" empty line and ends with a\n"
" single line break, but does\n"
" not start with one.\n"
"\n"
"is equal to: \"The \\\\ ' \\\" characters may \\\n"
" be\\nfreely used. Leading white\\n space \\\n"
" is significant.\\n\\nLine breaks are \\\n"
" significant.\\nThus this value contains \\\n"
" one\\nempty line and ends with a\\nsingle \\\n"
" line break, but does\\nnot start with one.\\n\"\n"
"\n"
"# Comments may follow a block \n"
"# scalar value. They must be \n"
"# less indented. \n"
"\n"
"# Modifiers may be combined in any order.\n"
"indented and chomped: |2-\n"
" This has no newline.\n"
"\n"
"also written as: |-2\n"
" This has no newline.\n"
"\n"
"both are equal to: \" This has no newline.\"\n"
,
/* C structure of validations */
stream
);
CuRoundTrip( tc, stream );
}
/*
* Example : Timestamp
*/
void
YtsSpecificationExamples_62( CuTest *tc )
{
struct test_node map[] = {
{ T_STR, 0, "canonical" },
{ T_STR, 0, "2001-12-15T02:59:43.1Z" },
{ T_STR, 0, "valid iso8601" },
{ T_STR, 0, "2001-12-14t21:59:43.10-05:00" },
{ T_STR, 0, "space separated" },
{ T_STR, 0, "2001-12-14 21:59:43.10 -05:00" },
{ T_STR, 0, "date (noon UTC)" },
{ T_STR, 0, "2002-12-14" },
end_node
};
struct test_node stream[] = {
{ T_MAP, 0, 0, map },
end_node
};
CuStreamCompare( tc,
/* YAML document */
"canonical: 2001-12-15T02:59:43.1Z \n"
"valid iso8601: 2001-12-14t21:59:43.10-05:00 \n"
"space separated: 2001-12-14 21:59:43.10 -05:00 \n"
"date (noon UTC): 2002-12-14 \n"
,
/* C structure of validations */
stream
);
CuRoundTrip( tc, stream );
}
CuSuite *
SyckGetSuite()
{
CuSuite *suite = CuSuiteNew();
SUITE_ADD_TEST( suite, YtsFoldedScalars_7 );
SUITE_ADD_TEST( suite, YtsNullsAndEmpties_0 );
SUITE_ADD_TEST( suite, YtsNullsAndEmpties_1 );
SUITE_ADD_TEST( suite, YtsNullsAndEmpties_2 );
SUITE_ADD_TEST( suite, YtsNullsAndEmpties_3 );
SUITE_ADD_TEST( suite, YtsNullsAndEmpties_4 );
SUITE_ADD_TEST( suite, YtsNullsAndEmpties_5 );
SUITE_ADD_TEST( suite, YtsSpecificationExamples_0 );
SUITE_ADD_TEST( suite, YtsSpecificationExamples_1 );
SUITE_ADD_TEST( suite, YtsSpecificationExamples_2 );
SUITE_ADD_TEST( suite, YtsSpecificationExamples_3 );
SUITE_ADD_TEST( suite, YtsSpecificationExamples_4 );
SUITE_ADD_TEST( suite, YtsSpecificationExamples_5 );
SUITE_ADD_TEST( suite, YtsSpecificationExamples_6 );
SUITE_ADD_TEST( suite, YtsSpecificationExamples_7 );
SUITE_ADD_TEST( suite, YtsSpecificationExamples_8 );
SUITE_ADD_TEST( suite, YtsSpecificationExamples_9 );
SUITE_ADD_TEST( suite, YtsSpecificationExamples_10 );
SUITE_ADD_TEST( suite, YtsSpecificationExamples_11 );
SUITE_ADD_TEST( suite, YtsSpecificationExamples_12 );
SUITE_ADD_TEST( suite, YtsSpecificationExamples_13 );
SUITE_ADD_TEST( suite, YtsSpecificationExamples_14 );
SUITE_ADD_TEST( suite, YtsSpecificationExamples_15 );
SUITE_ADD_TEST( suite, YtsSpecificationExamples_16 );
SUITE_ADD_TEST( suite, YtsSpecificationExamples_18 );
SUITE_ADD_TEST( suite, YtsSpecificationExamples_19 );
SUITE_ADD_TEST( suite, YtsSpecificationExamples_20 );
SUITE_ADD_TEST( suite, YtsSpecificationExamples_21 );
SUITE_ADD_TEST( suite, YtsSpecificationExamples_22 );
SUITE_ADD_TEST( suite, YtsSpecificationExamples_23 );
SUITE_ADD_TEST( suite, YtsSpecificationExamples_24 );
SUITE_ADD_TEST( suite, YtsSpecificationExamples_25 );
SUITE_ADD_TEST( suite, YtsSpecificationExamples_26 );
SUITE_ADD_TEST( suite, YtsSpecificationExamples_27 );
SUITE_ADD_TEST( suite, YtsSpecificationExamples_28 );
SUITE_ADD_TEST( suite, YtsSpecificationExamples_29 );
SUITE_ADD_TEST( suite, YtsSpecificationExamples_30 );
SUITE_ADD_TEST( suite, YtsSpecificationExamples_31 );
SUITE_ADD_TEST( suite, YtsSpecificationExamples_32 );
SUITE_ADD_TEST( suite, YtsSpecificationExamples_33 );
SUITE_ADD_TEST( suite, YtsSpecificationExamples_34 );
SUITE_ADD_TEST( suite, YtsSpecificationExamples_35 );
SUITE_ADD_TEST( suite, YtsSpecificationExamples_36 );
SUITE_ADD_TEST( suite, YtsSpecificationExamples_37 );
SUITE_ADD_TEST( suite, YtsSpecificationExamples_38 );
SUITE_ADD_TEST( suite, YtsSpecificationExamples_39 );
SUITE_ADD_TEST( suite, YtsSpecificationExamples_40 );
SUITE_ADD_TEST( suite, YtsSpecificationExamples_42 );
SUITE_ADD_TEST( suite, YtsSpecificationExamples_43 );
SUITE_ADD_TEST( suite, YtsSpecificationExamples_47 );
SUITE_ADD_TEST( suite, YtsSpecificationExamples_62 );
return suite;
}
int main(void)
{
CuString *output = CuStringNew();
CuSuite* suite = SyckGetSuite();
int count;
CuSuiteRun(suite);
CuSuiteSummary(suite, output);
CuSuiteDetails(suite, output);
printf("%s\n", output->buffer);
count = suite->failCount;
CuStringFree( output );
CuSuiteFree( suite );
return count;
}
| ystk/tools-yocto1-rpm | syck/tests/YTS.c | C | lgpl-2.1 | 56,537 |
/*---------------------------------------------------------------------------*\
* OpenSG *
* *
* *
* Copyright (C) 2000-2013 by the OpenSG Forum *
* *
* www.opensg.org *
* *
* contact: [email protected], [email protected], [email protected] *
* *
\*---------------------------------------------------------------------------*/
/*---------------------------------------------------------------------------*\
* License *
* *
* This library is free software; you can redistribute it and/or modify it *
* under the terms of the GNU Library General Public License as published *
* by the Free Software Foundation, version 2. *
* *
* This library is distributed in the hope that it will be useful, but *
* WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
* Library General Public License for more details. *
* *
* You should have received a copy of the GNU Library General Public *
* License along with this library; if not, write to the Free Software *
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *
* *
\*---------------------------------------------------------------------------*/
/*---------------------------------------------------------------------------*\
* Changes *
* *
* *
* *
* *
* *
* *
\*---------------------------------------------------------------------------*/
/*****************************************************************************\
*****************************************************************************
** **
** This file is automatically generated. **
** **
** Any changes made to this file WILL be lost when it is **
** regenerated, which can become necessary at any time. **
** **
** Do not change this file, changes should be done in the derived **
** class TextureBackground
** **
*****************************************************************************
\*****************************************************************************/
#ifndef _OSGTEXTUREBACKGROUNDBASE_H_
#define _OSGTEXTUREBACKGROUNDBASE_H_
#ifdef __sgi
#pragma once
#endif
#include "OSGConfig.h"
#include "OSGWindowDef.h"
//#include "OSGBaseTypes.h"
#include "OSGBackground.h" // Parent
#include "OSGBaseFields.h" // Color type
#include "OSGTextureBaseChunkFields.h" // Texture type
#include "OSGVecFields.h" // TexCoords type
#include "OSGSysFields.h" // RadialDistortion type
#include "OSGTextureBackgroundFields.h"
OSG_BEGIN_NAMESPACE
class TextureBackground;
//! \brief TextureBackground Base Class.
class OSG_WINDOW_DLLMAPPING TextureBackgroundBase : public Background
{
public:
typedef Background Inherited;
typedef Background ParentContainer;
typedef Inherited::TypeObject TypeObject;
typedef TypeObject::InitPhase InitPhase;
OSG_GEN_INTERNALPTR(TextureBackground);
/*========================== PUBLIC =================================*/
public:
enum
{
ColorFieldId = Inherited::NextFieldId,
TextureFieldId = ColorFieldId + 1,
TexCoordsFieldId = TextureFieldId + 1,
RadialDistortionFieldId = TexCoordsFieldId + 1,
CenterOfDistortionFieldId = RadialDistortionFieldId + 1,
HorFieldId = CenterOfDistortionFieldId + 1,
VertFieldId = HorFieldId + 1,
NextFieldId = VertFieldId + 1
};
static const OSG::BitVector ColorFieldMask =
(TypeTraits<BitVector>::One << ColorFieldId);
static const OSG::BitVector TextureFieldMask =
(TypeTraits<BitVector>::One << TextureFieldId);
static const OSG::BitVector TexCoordsFieldMask =
(TypeTraits<BitVector>::One << TexCoordsFieldId);
static const OSG::BitVector RadialDistortionFieldMask =
(TypeTraits<BitVector>::One << RadialDistortionFieldId);
static const OSG::BitVector CenterOfDistortionFieldMask =
(TypeTraits<BitVector>::One << CenterOfDistortionFieldId);
static const OSG::BitVector HorFieldMask =
(TypeTraits<BitVector>::One << HorFieldId);
static const OSG::BitVector VertFieldMask =
(TypeTraits<BitVector>::One << VertFieldId);
static const OSG::BitVector NextFieldMask =
(TypeTraits<BitVector>::One << NextFieldId);
typedef SFColor4f SFColorType;
typedef SFUnrecTextureBaseChunkPtr SFTextureType;
typedef MFPnt2f MFTexCoordsType;
typedef SFReal32 SFRadialDistortionType;
typedef SFVec2f SFCenterOfDistortionType;
typedef SFUInt16 SFHorType;
typedef SFUInt16 SFVertType;
/*---------------------------------------------------------------------*/
/*! \name Class Get */
/*! \{ */
static FieldContainerType &getClassType (void);
static UInt32 getClassTypeId (void);
static UInt16 getClassGroupId(void);
/*! \} */
/*---------------------------------------------------------------------*/
/*! \name FieldContainer Get */
/*! \{ */
virtual FieldContainerType &getType (void);
virtual const FieldContainerType &getType (void) const;
virtual UInt32 getContainerSize(void) const;
/*! \} */
/*---------------------------------------------------------------------*/
/*! \name Field Get */
/*! \{ */
SFColor4f *editSFColor (void);
const SFColor4f *getSFColor (void) const;
const SFUnrecTextureBaseChunkPtr *getSFTexture (void) const;
SFUnrecTextureBaseChunkPtr *editSFTexture (void);
MFPnt2f *editMFTexCoords (void);
const MFPnt2f *getMFTexCoords (void) const;
SFReal32 *editSFRadialDistortion(void);
const SFReal32 *getSFRadialDistortion (void) const;
SFVec2f *editSFCenterOfDistortion(void);
const SFVec2f *getSFCenterOfDistortion (void) const;
SFUInt16 *editSFHor (void);
const SFUInt16 *getSFHor (void) const;
SFUInt16 *editSFVert (void);
const SFUInt16 *getSFVert (void) const;
Color4f &editColor (void);
const Color4f &getColor (void) const;
TextureBaseChunk * getTexture (void) const;
MFPnt2f ::reference editTexCoords (const UInt32 index);
const Pnt2f &getTexCoords (const UInt32 index) const;
Real32 &editRadialDistortion(void);
Real32 getRadialDistortion (void) const;
Vec2f &editCenterOfDistortion(void);
const Vec2f &getCenterOfDistortion (void) const;
UInt16 &editHor (void);
UInt16 getHor (void) const;
UInt16 &editVert (void);
UInt16 getVert (void) const;
/*! \} */
/*---------------------------------------------------------------------*/
/*! \name Field Set */
/*! \{ */
void setColor (const Color4f &value);
void setTexture (TextureBaseChunk * const value);
void setRadialDistortion(const Real32 value);
void setCenterOfDistortion(const Vec2f &value);
void setHor (const UInt16 value);
void setVert (const UInt16 value);
/*! \} */
/*---------------------------------------------------------------------*/
/*! \name Ptr Field Set */
/*! \{ */
/*! \} */
/*---------------------------------------------------------------------*/
/*! \name Ptr MField Set */
/*! \{ */
/*! \} */
/*---------------------------------------------------------------------*/
/*! \name Binary Access */
/*! \{ */
virtual SizeT getBinSize (ConstFieldMaskArg whichField);
virtual void copyToBin (BinaryDataHandler &pMem,
ConstFieldMaskArg whichField);
virtual void copyFromBin(BinaryDataHandler &pMem,
ConstFieldMaskArg whichField);
/*! \} */
/*---------------------------------------------------------------------*/
/*! \name Construction */
/*! \{ */
static TextureBackgroundTransitPtr create (void);
static TextureBackground *createEmpty (void);
static TextureBackgroundTransitPtr createLocal (
BitVector bFlags = FCLocal::All);
static TextureBackground *createEmptyLocal(
BitVector bFlags = FCLocal::All);
static TextureBackgroundTransitPtr createDependent (BitVector bFlags);
/*! \} */
/*---------------------------------------------------------------------*/
/*! \name Copy */
/*! \{ */
virtual FieldContainerTransitPtr shallowCopy (void) const;
virtual FieldContainerTransitPtr shallowCopyLocal(
BitVector bFlags = FCLocal::All) const;
virtual FieldContainerTransitPtr shallowCopyDependent(
BitVector bFlags) const;
/*! \} */
/*========================= PROTECTED ===============================*/
protected:
static TypeObject _type;
static void classDescInserter(TypeObject &oType);
static const Char8 *getClassname (void );
/*---------------------------------------------------------------------*/
/*! \name Fields */
/*! \{ */
SFColor4f _sfColor;
SFUnrecTextureBaseChunkPtr _sfTexture;
MFPnt2f _mfTexCoords;
SFReal32 _sfRadialDistortion;
SFVec2f _sfCenterOfDistortion;
SFUInt16 _sfHor;
SFUInt16 _sfVert;
/*! \} */
/*---------------------------------------------------------------------*/
/*! \name Constructors */
/*! \{ */
TextureBackgroundBase(void);
TextureBackgroundBase(const TextureBackgroundBase &source);
/*! \} */
/*---------------------------------------------------------------------*/
/*! \name Destructors */
/*! \{ */
virtual ~TextureBackgroundBase(void);
/*! \} */
/*---------------------------------------------------------------------*/
/*! \name onCreate */
/*! \{ */
void onCreate(const TextureBackground *source = NULL);
/*! \} */
/*---------------------------------------------------------------------*/
/*! \name Generic Field Access */
/*! \{ */
GetFieldHandlePtr getHandleColor (void) const;
EditFieldHandlePtr editHandleColor (void);
GetFieldHandlePtr getHandleTexture (void) const;
EditFieldHandlePtr editHandleTexture (void);
GetFieldHandlePtr getHandleTexCoords (void) const;
EditFieldHandlePtr editHandleTexCoords (void);
GetFieldHandlePtr getHandleRadialDistortion (void) const;
EditFieldHandlePtr editHandleRadialDistortion(void);
GetFieldHandlePtr getHandleCenterOfDistortion (void) const;
EditFieldHandlePtr editHandleCenterOfDistortion(void);
GetFieldHandlePtr getHandleHor (void) const;
EditFieldHandlePtr editHandleHor (void);
GetFieldHandlePtr getHandleVert (void) const;
EditFieldHandlePtr editHandleVert (void);
/*! \} */
/*---------------------------------------------------------------------*/
/*! \name Sync */
/*! \{ */
#ifdef OSG_MT_CPTR_ASPECT
virtual void execSyncV( FieldContainer &oFrom,
ConstFieldMaskArg whichField,
AspectOffsetStore &oOffsets,
ConstFieldMaskArg syncMode ,
const UInt32 uiSyncInfo);
void execSync ( TextureBackgroundBase *pFrom,
ConstFieldMaskArg whichField,
AspectOffsetStore &oOffsets,
ConstFieldMaskArg syncMode ,
const UInt32 uiSyncInfo);
#endif
/*! \} */
/*---------------------------------------------------------------------*/
/*! \name Edit */
/*! \{ */
/*! \} */
/*---------------------------------------------------------------------*/
/*! \name Aspect Create */
/*! \{ */
#ifdef OSG_MT_CPTR_ASPECT
virtual FieldContainer *createAspectCopy(
const FieldContainer *pRefAspect) const;
#endif
/*! \} */
/*---------------------------------------------------------------------*/
/*! \name Edit */
/*! \{ */
/*! \} */
/*---------------------------------------------------------------------*/
/*! \name Sync */
/*! \{ */
virtual void resolveLinks(void);
/*! \} */
/*========================== PRIVATE ================================*/
private:
/*---------------------------------------------------------------------*/
// prohibit default functions (move to 'public' if you need one)
void operator =(const TextureBackgroundBase &source);
};
typedef TextureBackgroundBase *TextureBackgroundBaseP;
OSG_END_NAMESPACE
#endif /* _OSGTEXTUREBACKGROUNDBASE_H_ */
| jondo2010/OpenSG | Source/System/Window/Background/OSGTextureBackgroundBase.h | C | lgpl-2.1 | 19,137 |
# Makefile.in generated by automake 1.10.1 from Makefile.am.
# gconf/GConf/Makefile. Generated from Makefile.in by configure.
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
pkgdatadir = $(datadir)/gnome-sharp
pkglibdir = $(libdir)/gnome-sharp
pkgincludedir = $(includedir)/gnome-sharp
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = x86_64-unknown-linux-gnu
host_triplet = x86_64-unknown-linux-gnu
target_triplet = x86_64-unknown-linux-gnu
subdir = gconf/GConf
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
$(srcdir)/gconf-sharp-2.0.pc.in \
$(srcdir)/gconf-sharp.dll.config.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/configure.in
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES = gconf-sharp.dll.config gconf-sharp-2.0.pc
SOURCES =
DIST_SOURCES =
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
am__vpath_adj = case $$p in \
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
*) f=$$p;; \
esac;
am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
am__installdirs = "$(DESTDIR)$(pkgconfigdir)"
pkgconfigDATA_INSTALL = $(INSTALL_DATA)
DATA = $(noinst_DATA) $(pkgconfig_DATA)
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = ${SHELL} /usr/local/src/gnome-sharp-2.24.1/missing --run aclocal-1.10
AL = /usr/local/bin/al
AMTAR = ${SHELL} /usr/local/src/gnome-sharp-2.24.1/missing --run tar
API_VERSION = 2.24.0.0
AR = ar
AS = as
AUTOCONF = ${SHELL} /usr/local/src/gnome-sharp-2.24.1/missing --run autoconf
AUTOHEADER = ${SHELL} /usr/local/src/gnome-sharp-2.24.1/missing --run autoheader
AUTOMAKE = ${SHELL} /usr/local/src/gnome-sharp-2.24.1/missing --run automake-1.10
AWK = gawk
BUILD_EXEEXT =
BUILD_GTK_CFLAGS = -pthread -I/usr/include/gtk-2.0 -I/usr/lib64/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng15 -I/usr/include/libdrm -I/usr/include/harfbuzz
BUILD_GTK_LIBS = -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgio-2.0 -lpangoft2-1.0 -lpangocairo-1.0 -lgdk_pixbuf-2.0 -lcairo -lpango-1.0 -lfontconfig -lgobject-2.0 -lglib-2.0 -lfreetype
CC = gcc
CCDEPMODE = depmode=gcc3
CC_FOR_BUILD = gcc
CFLAGS = -g -Wall -Wunused -Wmissing-prototypes -Wmissing-declarations -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Wshadow -Wpointer-arith -Wno-cast-qual -Wcast-align -Wwrite-strings
CPP = gcc -E
CPPFLAGS =
CSC = /usr/local/bin/mcs
CSFLAGS = -define:GTK_SHARP_2_6 -define:GTK_SHARP_2_8 -define:GNOME_SHARP_2_16 -define:GNOME_SHARP_2_20 -define:GNOME_SHARP_2_24
CXX = g++
CXXCPP = g++ -E
CXXDEPMODE = depmode=gcc3
CXXFLAGS = -g -O2
CYGPATH_W = echo
DEFS = -DHAVE_CONFIG_H
DEPDIR = .deps
DLLTOOL = dlltool
DSYMUTIL =
ECHO = echo
ECHO_C =
ECHO_N = -n
ECHO_T =
EGREP = /usr/bin/grep -E
EXEEXT =
F77 =
FFLAGS =
GACUTIL = /usr/local/bin/gacutil
GACUTIL_FLAGS = /package $(PACKAGE_VERSION) /gacdir $(DESTDIR)$(prefix)/lib
GAPI_CFLAGS =
GAPI_CODEGEN = /usr/local/bin/gapi2-codegen
GAPI_FIXUP = /usr/local/bin/gapi2-fixup
GAPI_LIBS =
GAPI_PARSER = /usr/local/bin/gapi2-parser
GENERATED_SOURCES = generated/*.cs
GLADESHARP_CFLAGS = -I:/usr/local/lib/pkgconfig/../../share/gapi-2.0/glade-api.xml -I:/usr/local/lib/pkgconfig/../../share/gapi-2.0/pango-api.xml -I:/usr/local/lib/pkgconfig/../../share/gapi-2.0/atk-api.xml -I:/usr/local/lib/pkgconfig/../../share/gapi-2.0/gdk-api.xml -I:/usr/local/lib/pkgconfig/../../share/gapi-2.0/gtk-api.xml -I:/usr/local/lib/pkgconfig/../../share/gapi-2.0/glib-api.xml
GLADESHARP_LIBS = -r:/usr/local/lib/pkgconfig/../../lib/mono/gtk-sharp-2.0/glade-sharp.dll -r:/usr/local/lib/pkgconfig/../../lib/mono/gtk-sharp-2.0/pango-sharp.dll -r:/usr/local/lib/pkgconfig/../../lib/mono/gtk-sharp-2.0/atk-sharp.dll -r:/usr/local/lib/pkgconfig/../../lib/mono/gtk-sharp-2.0/gdk-sharp.dll -r:/usr/local/lib/pkgconfig/../../lib/mono/gtk-sharp-2.0/gtk-sharp.dll -r:/usr/local/lib/pkgconfig/../../lib/mono/gtk-sharp-2.0/glib-sharp.dll
GNOMEVFS_CFLAGS = -pthread -I/usr/include/gnome-vfs-2.0 -I/usr/lib64/gnome-vfs-2.0/include -I/usr/include/gconf/2 -I/usr/include/dbus-1.0 -I/usr/lib64/dbus-1.0/include -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include
GNOMEVFS_LIBS = -pthread -lgnomevfs-2 -lgconf-2 -lgthread-2.0 -lgmodule-2.0 -lgobject-2.0 -lglib-2.0
GNOME_CFLAGS = -pthread -DORBIT2=1 -D_REENTRANT -I/usr/include/libgnomecanvas-2.0 -I/usr/include/pango-1.0 -I/usr/include/gail-1.0 -I/usr/include/libart-2.0 -I/usr/include/gtk-2.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/harfbuzz -I/usr/include/freetype2 -I/usr/include/atk-1.0 -I/usr/lib64/gtk-2.0/include -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/pixman-1 -I/usr/include/libpng15 -I/usr/include/libdrm -I/usr/include/libgnomeui-2.0 -I/usr/include/gconf/2 -I/usr/include/gnome-keyring-1 -I/usr/include/libgnome-2.0 -I/usr/include/libbonoboui-2.0 -I/usr/include/gnome-vfs-2.0 -I/usr/lib64/gnome-vfs-2.0/include -I/usr/include/dbus-1.0 -I/usr/lib64/dbus-1.0/include -I/usr/include/orbit-2.0 -I/usr/include/libbonobo-2.0 -I/usr/include/bonobo-activation-2.0 -I/usr/include/libxml2
GNOME_LIBS = -pthread -Wl,--export-dynamic -lgnomeui-2 -lSM -lICE -lbonoboui-2 -lgnomevfs-2 -lgnomecanvas-2 -lgnome-2 -lpopt -lbonobo-2 -lbonobo-activation -lORBit-2 -lart_lgpl_2 -lgconf-2 -lgthread-2.0 -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgio-2.0 -lpangoft2-1.0 -lpangocairo-1.0 -lgdk_pixbuf-2.0 -lcairo -lpango-1.0 -lfontconfig -lgobject-2.0 -lfreetype -lgmodule-2.0 -lglib-2.0
GREP = /usr/bin/grep
GTKSHARP_CFLAGS = -I:/usr/local/lib/pkgconfig/../../share/gapi-2.0/pango-api.xml -I:/usr/local/lib/pkgconfig/../../share/gapi-2.0/atk-api.xml -I:/usr/local/lib/pkgconfig/../../share/gapi-2.0/gdk-api.xml -I:/usr/local/lib/pkgconfig/../../share/gapi-2.0/gtk-api.xml -I:/usr/local/lib/pkgconfig/../../share/gapi-2.0/glib-api.xml
GTKSHARP_LIBS = -r:/usr/local/lib/pkgconfig/../../lib/mono/gtk-sharp-2.0/pango-sharp.dll -r:/usr/local/lib/pkgconfig/../../lib/mono/gtk-sharp-2.0/atk-sharp.dll -r:/usr/local/lib/pkgconfig/../../lib/mono/gtk-sharp-2.0/gdk-sharp.dll -r:/usr/local/lib/pkgconfig/../../lib/mono/gtk-sharp-2.0/gtk-sharp.dll -r:/usr/local/lib/pkgconfig/../../lib/mono/gtk-sharp-2.0/glib-sharp.dll
GTK_SHARP_VERSION_CFLAGS = -DGTK_SHARP_2_6 -DGTK_SHARP_2_8 -DGNOME_SHARP_2_16 -DGNOME_SHARP_2_20 -DGNOME_SHARP_2_24
HOST_CC =
INSTALL = /usr/bin/install -c
INSTALL_DATA = ${INSTALL} -m 644
INSTALL_PROGRAM = ${INSTALL}
INSTALL_SCRIPT = ${INSTALL}
INSTALL_STRIP_PROGRAM = $(install_sh) -c -s
LDFLAGS =
LIBART_CFLAGS = -I/usr/include/libart-2.0
LIBART_LIBS = -lart_lgpl_2
LIBOBJS =
LIBS =
LIBTOOL = $(SHELL) $(top_builddir)/libtool
LIB_PREFIX = .so
LIB_SUFFIX =
LN_S = ln -s
LTLIBOBJS =
MAINT = #
MAKEINFO = ${SHELL} /usr/local/src/gnome-sharp-2.24.1/missing --run makeinfo
MKDIR_P = /usr/bin/mkdir -p
MONO_CAIRO_CFLAGS =
MONO_CAIRO_LIBS = -r:Mono.Cairo
MONO_DEPENDENCY_CFLAGS =
MONO_DEPENDENCY_LIBS =
NMEDIT =
OBJDUMP = objdump
OBJEXT = o
PACKAGE = gnome-sharp
PACKAGE_BUGREPORT =
PACKAGE_NAME =
PACKAGE_STRING =
PACKAGE_TARNAME =
PACKAGE_VERSION = gtk-sharp-2.0
PATH_SEPARATOR = :
PKG_CONFIG = /usr/bin/pkg-config
POLICY_VERSIONS = 2.4 2.6 2.8 2.16 2.20
RANLIB = ranlib
RUNTIME = mono
SED = /usr/bin/sed
SET_MAKE =
SHELL = /bin/sh
STRIP = strip
VERSION = 2.24.1
abs_builddir = /usr/local/src/gnome-sharp-2.24.1/gconf/GConf
abs_srcdir = /usr/local/src/gnome-sharp-2.24.1/gconf/GConf
abs_top_builddir = /usr/local/src/gnome-sharp-2.24.1
abs_top_srcdir = /usr/local/src/gnome-sharp-2.24.1
ac_ct_CC = gcc
ac_ct_CXX = g++
ac_ct_F77 =
am__include = include
am__leading_dot = .
am__quote =
am__tar = ${AMTAR} chof - "$$tardir"
am__untar = ${AMTAR} xf -
bindir = ${exec_prefix}/bin
build = x86_64-unknown-linux-gnu
build_alias =
build_cpu = x86_64
build_os = linux-gnu
build_vendor = unknown
builddir = .
datadir = ${datarootdir}
datarootdir = ${prefix}/share
docdir = ${datarootdir}/doc/${PACKAGE}
dvidir = ${docdir}
exec_prefix = ${prefix}
host = x86_64-unknown-linux-gnu
host_alias =
host_cpu = x86_64
host_os = linux-gnu
host_vendor = unknown
htmldir = ${docdir}
includedir = ${prefix}/include
infodir = ${datarootdir}/info
install_sh = $(SHELL) /usr/local/src/gnome-sharp-2.24.1/install-sh
libdir = ${exec_prefix}/lib
libexecdir = ${exec_prefix}/libexec
localedir = ${datarootdir}/locale
localstatedir = ${prefix}/var
mandir = ${datarootdir}/man
mkdir_p = /usr/bin/mkdir -p
oldincludedir = /usr/include
pdfdir = ${docdir}
prefix = /usr/local
program_transform_name = s,x,x,
psdir = ${docdir}
sbindir = ${exec_prefix}/sbin
sharedstatedir = ${prefix}/com
srcdir = .
sysconfdir = ${prefix}/etc
target = x86_64-unknown-linux-gnu
target_alias =
target_cpu = x86_64
target_os = linux-gnu
target_vendor = unknown
top_build_prefix = ../../
top_builddir = ../..
top_srcdir = ../..
TARGET = $(ASSEMBLY) $(ASSEMBLY).config
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = gconf-sharp-2.0.pc
noinst_DATA = $(TARGET) $(POLICY_ASSEMBLIES)
CLEANFILES = $(ASSEMBLY) $(ASSEMBLY).mdb gtk-sharp.snk AssemblyInfo.cs $(POLICY_ASSEMBLIES) $(POLICY_CONFIGS)
DISTCLEANFILES = gconf-sharp-2.0.pc $(ASSEMBLY).config
POLICY_ASSEMBLIES = $(addsuffix .$(ASSEMBLY), $(addprefix policy., $(POLICY_VERSIONS)))
POLICY_CONFIGS = $(addsuffix .config, $(addprefix policy., $(POLICY_VERSIONS)))
ASSEMBLY = $(ASSEMBLY_NAME).dll
ASSEMBLY_NAME = gconf-sharp
EXTRA_DIST = \
$(sources) \
$(ASSEMBLY).config.in \
gconf-sharp-2.0.pc.in
references = $(GTKSHARP_LIBS)
sources = \
ClientBase.cs \
Client.cs \
ChangeSet.cs \
Engine.cs \
_Entry.cs \
NoSuchKeyException.cs \
NotifyEventArgs.cs \
NotifyEventHandler.cs \
NotifyWrapper.cs \
Value.cs
build_sources = $(addprefix $(srcdir)/, $(sources))
GAPI_CDECL_INSERT =
#GAPI_CDECL_INSERT = $(top_srcdir)/gapi-cdecl-insert --keyfile=gtk-sharp.snk $(ASSEMBLY)
all: all-am
.SUFFIXES:
$(srcdir)/Makefile.in: # $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
&& exit 0; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign gconf/GConf/Makefile'; \
cd $(top_srcdir) && \
$(AUTOMAKE) --foreign gconf/GConf/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(top_srcdir)/configure: # $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): # $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
gconf-sharp.dll.config: $(top_builddir)/config.status $(srcdir)/gconf-sharp.dll.config.in
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
gconf-sharp-2.0.pc: $(top_builddir)/config.status $(srcdir)/gconf-sharp-2.0.pc.in
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
install-pkgconfigDATA: $(pkgconfig_DATA)
@$(NORMAL_INSTALL)
test -z "$(pkgconfigdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)"
@list='$(pkgconfig_DATA)'; for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
f=$(am__strip_dir) \
echo " $(pkgconfigDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(pkgconfigdir)/$$f'"; \
$(pkgconfigDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(pkgconfigdir)/$$f"; \
done
uninstall-pkgconfigDATA:
@$(NORMAL_UNINSTALL)
@list='$(pkgconfig_DATA)'; for p in $$list; do \
f=$(am__strip_dir) \
echo " rm -f '$(DESTDIR)$(pkgconfigdir)/$$f'"; \
rm -f "$(DESTDIR)$(pkgconfigdir)/$$f"; \
done
tags: TAGS
TAGS:
ctags: CTAGS
CTAGS:
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
dist_files=`for file in $$list; do echo $$file; done | \
sed -e "s|^$$srcdirstrip/||;t" \
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
case $$dist_files in \
*/*) $(MKDIR_P) `echo "$$dist_files" | \
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
sort -u` ;; \
esac; \
for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
if test -d $$d/$$file; then \
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
fi; \
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
else \
test -f $(distdir)/$$file \
|| cp -p $$d/$$file $(distdir)/$$file \
|| exit 1; \
fi; \
done
check-am: all-am
check: check-am
all-am: Makefile $(DATA)
installdirs:
for dir in "$(DESTDIR)$(pkgconfigdir)"; do \
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done
install: install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
clean-generic:
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
clean: clean-am
clean-am: clean-generic clean-libtool mostlyclean-am
distclean: distclean-am
-rm -f Makefile
distclean-am: clean-am distclean-generic
dvi: dvi-am
dvi-am:
html: html-am
info: info-am
info-am:
install-data-am: install-data-local install-pkgconfigDATA
install-dvi: install-dvi-am
install-exec-am:
install-html: install-html-am
install-info: install-info-am
install-man:
install-pdf: install-pdf-am
install-ps: install-ps-am
installcheck-am:
maintainer-clean: maintainer-clean-am
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
pdf: pdf-am
pdf-am:
ps: ps-am
ps-am:
uninstall-am: uninstall-local uninstall-pkgconfigDATA
.MAKE: install-am install-strip
.PHONY: all all-am check check-am clean clean-generic clean-libtool \
distclean distclean-generic distclean-libtool distdir dvi \
dvi-am html html-am info info-am install install-am \
install-data install-data-am install-data-local install-dvi \
install-dvi-am install-exec install-exec-am install-html \
install-html-am install-info install-info-am install-man \
install-pdf install-pdf-am install-pkgconfigDATA install-ps \
install-ps-am install-strip installcheck installcheck-am \
installdirs maintainer-clean maintainer-clean-generic \
mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
ps ps-am uninstall uninstall-am uninstall-local \
uninstall-pkgconfigDATA
gtk-sharp.snk: $(top_srcdir)/gtk-sharp.snk
cp $(top_srcdir)/gtk-sharp.snk .
AssemblyInfo.cs: $(top_builddir)/AssemblyInfo.cs
cp $(top_builddir)/AssemblyInfo.cs .
$(ASSEMBLY): $(build_sources) gtk-sharp.snk AssemblyInfo.cs
@rm -f $(ASSEMBLY).mdb
$(CSC) $(CSFLAGS) /out:$(ASSEMBLY) /target:library $(references) $(build_sources) AssemblyInfo.cs
$(GAPI_CDECL_INSERT)
$(POLICY_ASSEMBLIES): $(top_builddir)/policy.config gtk-sharp.snk
@for i in $(POLICY_VERSIONS); do \
echo "Creating policy.$$i.$(ASSEMBLY)"; \
sed -e "s/@ASSEMBLY_NAME@/$(ASSEMBLY_NAME)/" -e "s/@POLICY@/$$i/" $(top_builddir)/policy.config > policy.$$i.config; \
$(AL) -link:policy.$$i.config -out:policy.$$i.$(ASSEMBLY) -keyfile:gtk-sharp.snk; \
done
install-data-local:
@if test -n '$(TARGET)'; then \
echo "$(GACUTIL) /i $(ASSEMBLY) /f $(GACUTIL_FLAGS)"; \
$(GACUTIL) /i $(ASSEMBLY) /f $(GACUTIL_FLAGS) || exit 1; \
if test -n '$(POLICY_VERSIONS)'; then \
for i in $(POLICY_VERSIONS); do \
echo "$(GACUTIL) /i policy.$$i.$(ASSEMBLY) /f $(GACUTIL_FLAGS)"; \
$(GACUTIL) /i policy.$$i.$(ASSEMBLY) /f $(GACUTIL_FLAGS) || exit 1; \
done \
fi \
fi
uninstall-local:
@if test -n '$(TARGET)'; then \
echo "$(GACUTIL) /u $(ASSEMBLY_NAME) $(GACUTIL_FLAGS)"; \
$(GACUTIL) /u $(ASSEMBLY_NAME) $(GACUTIL_FLAGS) || exit 1; \
if test -n '$(POLICY_VERSIONS)'; then \
for i in $(POLICY_VERSIONS); do \
echo "$(GACUTIL) /u policy.$$i.$(ASSEMBLY_NAME) $(GACUTIL_FLAGS)"; \
$(GACUTIL) /u policy.$$i.$(ASSEMBLY_NAME) $(GACUTIL_FLAGS) || exit 1; \
done \
fi \
fi
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
| LonghronShen/gnome-sharp-2.24.1 | gconf/GConf/Makefile | Makefile | lgpl-2.1 | 18,478 |
/*
* Jitsi, the OpenSource Java VoIP and Instant Messaging client.
*
* Distributable under LGPL license.
* See terms of license at gnu.org.
*/
package net.java.sip.communicator.service.protocol.event;
import java.util.*;
import net.java.sip.communicator.service.protocol.*;
/**
* Events of this class represent the fact that a server stored
* subscription/contact has been moved from one server stored group to another.
* Such events are only generated by implementations of
* OperationSetPersistentPresence as non persistent presence operation sets do
* not support the notion of server stored groups.
*
* @author Emil Ivov
*/
public class SubscriptionMovedEvent
extends EventObject
{
/**
* Serial version UID.
*/
private static final long serialVersionUID = 0L;
private ContactGroup oldParent = null;
private ContactGroup newParent = null;
private ProtocolProviderService sourceProvider = null;
/**
* Creates an event instance with the specified source contact and old and
* new parent.
*
* @param sourceContact the <tt>Contact</tt> that has been moved.
* @param sourceProvider a reference to the <tt>ProtocolProviderService</tt>
* that the source <tt>Contact</tt> belongs to.
* @param oldParent the <tt>ContactGroup</tt> that has previously been
* the parent
* @param newParent the new <tt>ContactGroup</tt> parent of
* <tt>sourceContact</tt>
*/
public SubscriptionMovedEvent(Contact sourceContact,
ProtocolProviderService sourceProvider,
ContactGroup oldParent,
ContactGroup newParent)
{
super(sourceContact);
this.oldParent = oldParent;
this.newParent = newParent;
this.sourceProvider = sourceProvider;
}
/**
* Returns a reference to the contact that has been moved.
* @return a reference to the <tt>Contact</tt> that has been moved.
*/
public Contact getSourceContact()
{
return (Contact)getSource();
}
/**
* Returns a reference to the ContactGroup that contained the source contact
* before it was moved.
* @return a reference to the previous <tt>ContactGroup</tt> parent of
* the source <tt>Contact</tt>.
*/
public ContactGroup getOldParentGroup()
{
return oldParent;
}
/**
* Returns a reference to the ContactGroup that currently contains the
* source contact.
*
* @return a reference to the current <tt>ContactGroup</tt> parent of
* the source <tt>Contact</tt>.
*/
public ContactGroup getNewParentGroup()
{
return newParent;
}
/**
* Returns the provider that the source contact belongs to.
* @return the provider that the source contact belongs to.
*/
public ProtocolProviderService getSourceProvider()
{
return sourceProvider;
}
/**
* Returns a String representation of this ContactPresenceStatusChangeEvent
*
* @return A a String representation of this
* SubscriptionMovedEvent.
*/
public String toString()
{
StringBuffer buff
= new StringBuffer("SubscriptionMovedEvent-[ ContactID=");
buff.append(getSourceContact().getAddress());
buff.append(", OldParentGroup=").append(getOldParentGroup().getGroupName());
buff.append(", NewParentGroup=").append(getNewParentGroup().getGroupName());
return buff.toString();
}
}
| zhaozw/android-1 | src/net/java/sip/communicator/service/protocol/event/SubscriptionMovedEvent.java | Java | lgpl-2.1 | 3,564 |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
"http://www.w3.org/TR/1998/REC-html40-19980424/loose.dtd">
<html><head>
<title>Methods</title>
<meta name="generator" content="HeaderDoc">
</head><body bgcolor="#ffffff"><h1><font face="Geneva,Arial,Helvtica">Methods</font></h1><hr><br>
<a name="//apple_ref/occ/clm/GSNSDataExtensions.h/+dataWithBase64EncodedString:"></a>
<h3><a name="+dataWithBase64EncodedString:">+dataWithBase64EncodedString:</a></h3>
<blockquote><pre><tt>+ (NSData *)<B>dataWithBase64EncodedString:</B>(NSString *)<I>inBase64String;</I> </tt><br>
</pre></blockquote>
<p>This method returns an autoreleased NSData object. The NSData object is initialized with the
contents of the Base 64 encoded string. This is a convenience function for
-initWithBase64EncodedString:.
</p>
<h4>Parameters</h4>
<blockquote>
<table border="1" width="90%">
<thead><tr><th>Name</th><th>Description</th></tr></thead>
<tr><td align="center"><tt>inBase64String</tt></td><td>An NSString object that contains only Base 64 encoded data.</td></tr>
</table>
</blockquote>
<b>Result:</b> The NSData object.
<hr>
<a name="//apple_ref/occ/clm/GSNSDataExtensions.h/+isCharacterPartOfBase64Encoding:"></a>
<h3><a name="+isCharacterPartOfBase64Encoding:">+isCharacterPartOfBase64Encoding:</a></h3>
<blockquote><pre><tt>+ (BOOL)<B>isCharacterPartOfBase64Encoding:</B>(char)<I>inChar;</I> </tt><br>
</pre></blockquote>
<p>This method returns YES or NO depending on whether the given character is a part of the
Base64 encoding table.
</p>
<h4>Parameters</h4>
<blockquote>
<table border="1" width="90%">
<thead><tr><th>Name</th><th>Description</th></tr></thead>
<tr><td align="center"><tt>inChar</tt></td><td>An character in ASCII encoding.</td></tr>
</table>
</blockquote>
<b>Result:</b> YES if the character is a part of the Base64 encoding table.
<hr>
<a name="//apple_ref/occ/instm/GSNSDataExtensions.h/-base64EncodingWithLineLength:"></a>
<h3><a name="-base64EncodingWithLineLength:">-base64EncodingWithLineLength:</a></h3>
<blockquote><pre><tt>- (NSString *)<B>base64EncodingWithLineLength:</B>(unsigned int)<I>inLineLength;</I> </tt><br>
</pre></blockquote>
<p>This method returns a Base 64 encoded string representation of the data object.
</p>
<h4>Parameters</h4>
<blockquote>
<table border="1" width="90%">
<thead><tr><th>Name</th><th>Description</th></tr></thead>
<tr><td align="center"><tt>inLineLength</tt></td><td>A value of zero means no line breaks. This is crunched to a multiple of 4 (the next
one greater than inLineLength).</td></tr>
</table>
</blockquote>
<b>Result:</b> The base 64 encoded data.
<hr>
<a name="//apple_ref/occ/instm/GSNSDataExtensions.h/-initWithBase64EncodedString:"></a>
<h3><a name="-initWithBase64EncodedString:">-initWithBase64EncodedString:</a></h3>
<blockquote><pre><tt>- (id)<B>initWithBase64EncodedString:</B>(NSString *)<I>inBase64String;</I> </tt><br>
</pre></blockquote>
<p>The NSData object is initialized with the contents of the Base 64 encoded string.
This method returns self as a convenience.
</p>
<h4>Parameters</h4>
<blockquote>
<table border="1" width="90%">
<thead><tr><th>Name</th><th>Description</th></tr></thead>
<tr><td align="center"><tt>inBase64String</tt></td><td>An NSString object that contains only Base 64 encoded data.</td></tr>
</table>
</blockquote>
<b>Result:</b> This method returns self.
<hr>
<p><p>© 2001, 2005 Kyle Hammond (Last Updated 1/12/2005)
</p></body></html>
| ystk/tools-yocto1-rpm | syck/ext/cocoa/src/Base64 NSData code/GSNSDataExtensions/Methods/Methods.html | HTML | lgpl-2.1 | 3,467 |
#include <ixlib_random.hpp>
| JackieXie168/ixlib | old_headers/ixlib_random.hh | C++ | lgpl-2.1 | 28 |
package net.gigimoi.zombietc.tile;
import net.gigimoi.zombietc.ZombieTC;
import net.gigimoi.zombietc.util.IListenerZTC;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.network.NetworkManager;
import net.minecraft.network.Packet;
import net.minecraft.network.play.server.S35PacketUpdateTileEntity;
import net.minecraft.tileentity.TileEntity;
/**
* Created by gigimoi on 8/8/2014.
*/
public abstract class TileZTC extends TileEntity implements IListenerZTC {
@Override
public void updateEntity() {
super.updateEntity();
if(!ZombieTC.gameManager.isRegisteredListener(this)) {
ZombieTC.gameManager.registerListener(this);
}
}
@Override
public Packet getDescriptionPacket() {
NBTTagCompound tagCompound = new NBTTagCompound();
writeToNBT(tagCompound);
return new S35PacketUpdateTileEntity(xCoord, yCoord, zCoord, 1, tagCompound);
}
@Override
public void onDataPacket(NetworkManager net, S35PacketUpdateTileEntity pkt) {
super.onDataPacket(net, pkt);
readFromNBT(pkt.func_148857_g());
}
}
| gigimoi/Zombie-Total-Conversion-Craft | src/main/java/net/gigimoi/zombietc/tile/TileZTC.java | Java | lgpl-2.1 | 1,114 |
FROM registry.access.redhat.com/rhel7:latest
MAINTAINER [email protected]
RUN yum install -y deltarpm yum-utils &&\
yum update -y && \
yum install avahi -y && \
yum clean all
ADD avahi-daemon.conf /etc/avahi/
ADD ssh.service /etc/avahi/services/
ADD avahi-daemon.service /etc/systemd/system/
LABEL RUN /usr/bin/docker run --rm --name NAME --net=host --volume /etc/localtime:/etc/localtime:r IMAGE /usr/sbin/avahi-daemon --debug
LABEL INSTALL /usr/bin/docker run --privileged --rm --volume /:/host --name NAME IMAGE cp -v /etc/systemd/system/avahi-daemon.service /host/etc/systemd/system/
LABEL UNINSTALL /usr/bin/docker run --privileged --rm --volume /:/host --name NAME IMAGE rm /host/etc/systemd/system/avahi-daemon.service
| cevich/atomic-avahi | Dockerfile | Dockerfile | lgpl-2.1 | 738 |
package net.minecraft.server;
import java.util.Iterator;
import java.util.List;
import net.minecraft.src.BiomeGenBase;
import cpw.mods.fml.common.registry.IMinecraftRegistry;
import cpw.mods.fml.server.FMLBukkitHandler;
public class BukkitRegistry implements IMinecraftRegistry
{
@Override
public void addRecipe(net.minecraft.src.ItemStack output, Object... params)
{
CraftingManager.getInstance().registerShapedRecipe((ItemStack) output, params);
}
@Override
public void addShapelessRecipe(net.minecraft.src.ItemStack output, Object... params)
{
CraftingManager.getInstance().registerShapelessRecipe((ItemStack) output, params);
}
@SuppressWarnings("unchecked")
@Override
public void addRecipe(net.minecraft.src.IRecipe recipe)
{
CraftingManager.getInstance().getRecipies().add(recipe);
}
@Override
public void addSmelting(int input, net.minecraft.src.ItemStack output)
{
FurnaceRecipes.getInstance().registerRecipe(input, (ItemStack) output);
}
@Override
public void registerBlock(net.minecraft.src.Block block)
{
registerBlock(block, ItemBlock.class);
}
@Override
public void registerBlock(net.minecraft.src.Block block, Class <? extends net.minecraft.src.ItemBlock > itemclass)
{
try
{
assert block != null : "registerBlock: block cannot be null";
assert itemclass != null : "registerBlock: itemclass cannot be null";
int blockItemId = ((Block)block).id - 256;
itemclass.getConstructor(int.class).newInstance(blockItemId);
}
catch (Exception e)
{
//HMMM
}
}
@SuppressWarnings("unchecked")
@Override
public void registerEntityID(Class <? extends net.minecraft.src.Entity > entityClass, String entityName, int id)
{
EntityTypes.addNewEntityListMapping((Class<? extends Entity>) entityClass, entityName, id);
}
@SuppressWarnings("unchecked")
@Override
public void registerEntityID(Class <? extends net.minecraft.src.Entity > entityClass, String entityName, int id, int backgroundEggColour, int foregroundEggColour)
{
EntityTypes.addNewEntityListMapping((Class<? extends Entity>) entityClass, entityName, id, backgroundEggColour, foregroundEggColour);
}
@SuppressWarnings("unchecked")
@Override
public void registerTileEntity(Class <? extends net.minecraft.src.TileEntity > tileEntityClass, String id)
{
TileEntity.addNewTileEntityMapping((Class<? extends TileEntity>) tileEntityClass, id);
}
@Override
public void addBiome(BiomeGenBase biome)
{
FMLBukkitHandler.instance().addBiomeToDefaultWorldGenerator((BiomeBase) biome);
}
@Override
public void addSpawn(Class <? extends net.minecraft.src.EntityLiving > entityClass, int weightedProb, int min, int max, net.minecraft.src.EnumCreatureType typeOfCreature, BiomeGenBase... biomes)
{
BiomeBase[] realBiomes=(BiomeBase[]) biomes;
for (BiomeBase biome : realBiomes)
{
@SuppressWarnings("unchecked")
List<BiomeMeta> spawns = ((BiomeBase)biome).getMobs((EnumCreatureType)typeOfCreature);
for (BiomeMeta entry : spawns)
{
//Adjusting an existing spawn entry
if (entry.a == entityClass)
{
entry.d = weightedProb;
entry.b = min;
entry.c = max;
break;
}
}
spawns.add(new BiomeMeta(entityClass, weightedProb, min, max));
}
}
@Override
@SuppressWarnings("unchecked")
public void addSpawn(String entityName, int weightedProb, int min, int max, net.minecraft.src.EnumCreatureType spawnList, BiomeGenBase... biomes)
{
Class <? extends Entity > entityClazz = EntityTypes.getEntityToClassMapping().get(entityName);
if (EntityLiving.class.isAssignableFrom(entityClazz))
{
addSpawn((Class <? extends net.minecraft.src.EntityLiving >) entityClazz, weightedProb, min, max, spawnList, biomes);
}
}
@Override
public void removeBiome(BiomeGenBase biome)
{
FMLBukkitHandler.instance().removeBiomeFromDefaultWorldGenerator((BiomeBase)biome);
}
@Override
public void removeSpawn(Class <? extends net.minecraft.src.EntityLiving > entityClass, net.minecraft.src.EnumCreatureType typeOfCreature, BiomeGenBase... biomesO)
{
BiomeBase[] biomes=(BiomeBase[]) biomesO;
for (BiomeBase biome : biomes)
{
@SuppressWarnings("unchecked")
List<BiomeMeta> spawns = ((BiomeBase)biome).getMobs((EnumCreatureType) typeOfCreature);
Iterator<BiomeMeta> entries = spawns.iterator();
while (entries.hasNext())
{
BiomeMeta entry = entries.next();
if (entry.a == entityClass)
{
entries.remove();
}
}
}
}
@Override
@SuppressWarnings("unchecked")
public void removeSpawn(String entityName, net.minecraft.src.EnumCreatureType spawnList, BiomeGenBase... biomes)
{
Class <? extends Entity > entityClazz = EntityTypes.getEntityToClassMapping().get(entityName);
if (EntityLiving.class.isAssignableFrom(entityClazz))
{
removeSpawn((Class <? extends net.minecraft.src.EntityLiving >) entityClazz, spawnList, biomes);
}
}
}
| aerospark/FML | bukkit/net/minecraft/server/BukkitRegistry.java | Java | lgpl-2.1 | 5,591 |
#define OMPI_SKIP_MPICXX 1
#define MPICH_SKIP_MPICXX 1
#include "comm.h"
#include <stdio.h>
#include "cmdLineOptions.h"
#include "h5test.h"
#include "parallel_io.h"
#include "t3pio.h"
Comm P;
void outputResults(CmdLineOptions& cmd, ParallelIO& pio);
int main(int argc, char* argv[])
{
P.init(&argc, &argv, MPI_COMM_WORLD);
CmdLineOptions cmd(argc, argv);
CmdLineOptions::state_t state = cmd.state();
if (state != CmdLineOptions::iGOOD)
{
MPI_Finalize();
return (state == CmdLineOptions::iBAD);
}
ParallelIO pio;
if (cmd.h5slab || cmd.h5chunk)
pio.h5writer(cmd);
if (cmd.romio)
pio.MPIIOwriter(cmd);
if (P.myProc == 0)
outputResults(cmd, pio);
P.fini();
return 0;
}
void outputResults(CmdLineOptions& cmd, ParallelIO& pio)
{
double fileSz = pio.totalSz()/(1024.0 * 1024.0 * 1024.0);
const char* t3pioV = t3pio_version();
if (cmd.luaStyleOutput)
{
printf("%%%% { t3pioV = \"%s\", nprocs = %d, lSz = %ld, wrtStyle = \"%s\","
" xferStyle = \"%s\", iounits = %d, aggregators = %d, nstripes = %d, "
" stripeSzMB = %d, fileSzGB = %15.7g, time = %15.7g, totalTime = %15.7g,"
" rate = %15.7g },\n",
t3pioV, P.nProcs, cmd.localSz, cmd.wrtStyle.c_str(), cmd.xferStyle.c_str(),
pio.nIOUnits(), pio.aggregators(), pio.nStripes(), pio.stripeSzMB(),
fileSz, pio.time(), pio.totalTime(), pio.rate());
}
if (cmd.tableStyleOutput)
{
printf("\nunstructTest:\n"
"-------------------\n\n"
" Nprocs: %12d\n"
" lSz: %12ld\n"
" Numvar: %12d\n"
" iounits: %12d\n"
" aggregators: %12d\n"
" nstripes: %12d\n"
" stripeSz (MB): %12d\n"
" fileSz (GB): %12.3f\n"
" time (sec): %12.3f\n"
" totalTime (sec): %12.3f\n"
" rate (MB/s): %12.3f\n"
" wrtStyle: %12s\n"
" xferStyle: %12s\n"
" S_dne: %12d\n"
" S_auto_max: %12d\n"
" nStripesT3: %12d\n"
" t3pioV: %12s\n",
P.nProcs, cmd.localSz, pio.numvar(), pio.nIOUnits(), pio.aggregators(),
pio.nStripes(), pio.stripeSzMB(), fileSz, pio.time(), pio.totalTime(),
pio.rate(), cmd.wrtStyle.c_str(), cmd.xferStyle.c_str(), pio.dne_stripes(),
pio.auto_max_stripes(), pio.nStripesT3(), t3pioV);
}
}
| TACC/t3pio | unstructTest/main.C | C++ | lgpl-2.1 | 2,609 |
/*
* See the NOTICE file distributed with this work for additional
* information regarding copyright ownership.
*
* This is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation; either version 2.1 of
* the License, or (at your option) any later version.
*
* This software is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this software; if not, write to the Free
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
package com.xpn.xwiki.web;
/**
* Enumeration of supported object policy types. A object policy type is an
* implementation on how to manage parameters in the query string that wants to
* modify objects in page. They are usually on the form of
* 'Space.PageClass_0_prop. In the default implementation of XWiki, these
* parameters will initialize values of properties of existing object (see
* 'UPDATE').
*
* The second implementation, called 'UDPATE_OR_CREATE' will also create objects
* if they don't exist. For example, let's take a page that contains one object
* Space.PageClass. Given the following parameters:
* <ul>
* <li>Space.PageClass_0_prop=abc</li>
* <li>Space.PageClass_1_prop=def</li>
* <li>Space.PageClass_2_prop=ghi</li>
* <li>Space.PageClass_6_prop=jkl</li>
* </ul>
*
* The object number 0 will have it's property initialized with 'abc'. The
* objects number 1 and 2 will be created and respectively initialized with
* 'def' and 'ghi'. The final parameter will be ignored since the number doesn't
* refer to a following number.
*
* @version $Id$
* @since 7.0RC1
*/
public enum ObjectPolicyType {
/** Only update objects. */
UPDATE("update"),
/** Update and/or create objects. */
UPDATE_OR_CREATE("updateOrCreate");
/** Name that is used in HTTP parameters to specify the object policy. */
private final String name;
/**
* @param name The string name corresponding to the object policy type.
*/
ObjectPolicyType(String name) {
this.name = name;
}
/**
* @return The string name corresponding to the object policy type.
*/
public String getName() {
return this.name;
}
/**
* @param name The string name corresponding to the object policy type.
* @return The ObjectPolicyType corresponding to the parameter 'name'.
*/
public static ObjectPolicyType forName(String name) {
for (ObjectPolicyType type : values()) {
if (type.getName().equals(name)) {
return type;
}
}
return null;
}
}
| pbondoer/xwiki-platform | xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/web/ObjectPolicyType.java | Java | lgpl-2.1 | 2,998 |
-- Copyright (C) 2016-2017 Red Hat, Inc.
--
-- This library is free software; you can redistribute it and/or
-- modify it under the terms of the GNU Lesser General Public
-- License as published by the Free Software Foundation; either
-- version 2.1 of the License, or (at your option) any later version.
--
-- This library is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-- Lesser General Public License for more details.
--
-- You should have received a copy of the GNU Lesser General Public
-- License along with this library; if not, see <http://www.gnu.org/licenses/>.
{-# LANGUAGE OverloadedStrings #-}
module BDCS.RPM.Sources(mkSource)
where
import Database.Esqueleto(Key)
import qualified Data.Text as T
import BDCS.DB(Projects, Sources(..))
import BDCS.Exceptions(DBException(..), throwIfNothing)
import RPM.Tags(Tag, findStringTag)
mkSource :: [Tag] -> Key Projects -> Sources
mkSource tags projectId = let
license = T.pack $ findStringTag "License" tags `throwIfNothing` MissingRPMTag "License"
version = T.pack $ findStringTag "Version" tags `throwIfNothing` MissingRPMTag "Version"
-- FIXME: Where to get this from?
source_ref = "SOURCE_REF"
in
Sources projectId license version source_ref
| dashea/bdcs | importer/BDCS/RPM/Sources.hs | Haskell | lgpl-2.1 | 1,380 |
#if USE_SDL_BACKEND
#include "../test/SDLBackend.h"
#else
#include "../test/OgreBackend.h"
#endif
#include <GG/StyleFactory.h>
#include <GG/dialogs/ThreeButtonDlg.h>
#include <GG/dialogs/FileDlg.h>
#include <iostream>
// Tutorial 1: Minimal
// This contains the minimal interesting GG application. It contains 3D as
// well as GUI elements in the same scene, and demonstrates how to use the
// default SDL and Ogre input drivers.
void CustomRender()
{
const double RPM = 4;
const double DEGREES_PER_MS = 360.0 * RPM / 60000.0;
// DeltaT() returns the time in whole milliseconds since the last frame
// was rendered (in other words, since this method was last invoked).
glRotated(GG::GUI::GetGUI()->DeltaT() * DEGREES_PER_MS, 0.0, 1.0, 0.0);
glBegin(GL_QUADS);
glColor3d(0.0, 1.0, 0.0);
glVertex3d(1.0, 1.0, -1.0);
glVertex3d(-1.0, 1.0, -1.0);
glVertex3d(-1.0, 1.0, 1.0);
glVertex3d(1.0, 1.0, 1.0);
glColor3d(1.0, 0.5, 0.0);
glVertex3d(1.0, -1.0, 1.0);
glVertex3d(-1.0, -1.0, 1.0);
glVertex3d(-1.0, -1.0,-1.0);
glVertex3d(1.0, -1.0,-1.0);
glColor3d(1.0, 0.0, 0.0);
glVertex3d(1.0, 1.0, 1.0);
glVertex3d(-1.0, 1.0, 1.0);
glVertex3d(-1.0, -1.0, 1.0);
glVertex3d(1.0, -1.0, 1.0);
glColor3d(1.0, 1.0, 0.0);
glVertex3d(1.0, -1.0, -1.0);
glVertex3d(-1.0, -1.0, -1.0);
glVertex3d(-1.0, 1.0, -1.0);
glVertex3d(1.0, 1.0, -1.0);
glColor3d(0.0, 0.0, 1.0);
glVertex3d(-1.0, 1.0, 1.0);
glVertex3d(-1.0, 1.0, -1.0);
glVertex3d(-1.0, -1.0, -1.0);
glVertex3d(-1.0, -1.0, 1.0);
glColor3d(1.0, 0.0, 1.0);
glVertex3d(1.0, 1.0, -1.0);
glVertex3d(1.0, 1.0, 1.0);
glVertex3d(1.0, -1.0, 1.0);
glVertex3d(1.0, -1.0, -1.0);
glEnd();
}
// This is the launch point for your GG app. This is where you should place
// your main GG::Wnd(s) that should appear when the application starts, if
// any.
void CustomInit()
{
// Create a modal dialog and execute it. This will show GG operating on
// top of a "real 3D" scene. Note that if you want "real" 3D objects
// (i.e. drawn in a non-orthographic space) inside of GG windows, you can
// add whatever OpenGL calls you like to a GG::Wnd's Render() method,
// sandwiched between Exit2DMode() and Enter2DMode().
const std::string message = "Are we Готово yet?"; // That Russian word means "Done", ha.
const std::set<GG::UnicodeCharset> charsets_ = GG::UnicodeCharsetsToRender(message);
const std::vector<GG::UnicodeCharset> charsets(charsets_.begin(), charsets_.end());
const boost::shared_ptr<GG::Font> font =
GG::GUI::GetGUI()->GetStyleFactory()->DefaultFont(12, &charsets[0], &charsets[0] + charsets.size());
GG::Wnd* quit_dlg =
new GG::ThreeButtonDlg(GG::X(200), GG::Y(100), message, font, GG::CLR_SHADOW,
GG::CLR_SHADOW, GG::CLR_SHADOW, GG::CLR_WHITE, 1);
quit_dlg->Run();
// Now that we're back from the modal dialog, we can exit normally, since
// that's what closing the dialog indicates. Exit() calls all the cleanup
// methods for GG::SDLGUI.
GG::GUI::GetGUI()->Exit(0);
}
extern "C" // Note the use of C-linkage, as required by SDL.
int main(int argc, char* argv[])
{
// The try-catch block is not strictly necessary, but it sure helps to see
// what exception crashed your app in the log file.
try {
#if USE_SDL_BACKEND
MinimalSDLGUI::CustomInit = &CustomInit;
MinimalSDLGUI::CustomRender = &CustomRender;
MinimalSDLMain();
#else
MinimalOgreGUI::CustomInit = &CustomInit;
MinimalOgreGUI::CustomRender = &CustomRender;
MinimalOgreMain();
#endif
} catch (const std::invalid_argument& e) {
std::cerr << "main() caught exception(std::invalid_arg): " << e.what();
} catch (const std::runtime_error& e) {
std::cerr << "main() caught exception(std::runtime_error): " << e.what();
} catch (const std::exception& e) {
std::cerr << "main() caught exception(std::exception): " << e.what();
}
return 0;
}
| tzlaine/GG | tutorial/minimal.cpp | C++ | lgpl-2.1 | 4,112 |
#include "longlong_pre.h"
#include <longlong_inc.h>
/* longlong.h -- definitions for mixed size 32/64 bit arithmetic.
Copyright 1991, 1992, 1993, 1994, 1996, 1997, 1999, 2000, 2001, 2002, 2003,
2004, 2005 Free Software Foundation, Inc.
This file is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2.1 of the License, or (at your
option) any later version.
This file is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this file; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
MA 02110-1301, USA. */
/* You have to define the following before including this file:
UWtype -- An unsigned type, default type for operations (typically a "word")
UHWtype -- An unsigned type, at least half the size of UWtype.
UDWtype -- An unsigned type, at least twice as large a UWtype
W_TYPE_SIZE -- size in bits of UWtype
SItype, USItype -- Signed and unsigned 32 bit types.
DItype, UDItype -- Signed and unsigned 64 bit types.
On a 32 bit machine UWtype should typically be USItype;
on a 64 bit machine, UWtype should typically be UDItype.
*/
/* Use mpn_umul_ppmm or mpn_udiv_qrnnd functions, if they exist. The "_r"
forms have "reversed" arguments, meaning the pointer is last, which
sometimes allows better parameter passing, in particular on 64-bit
hppa. */
#define mpn_umul_ppmm __MPN(umul_ppmm)
extern UWtype mpn_umul_ppmm _PROTO ((UWtype *, UWtype, UWtype));
#if ! defined (umul_ppmm) && HAVE_NATIVE_mpn_umul_ppmm \
&& ! defined (LONGLONG_STANDALONE)
#define umul_ppmm(wh, wl, u, v) \
do { \
UWtype __umul_ppmm__p0; \
(wh) = mpn_umul_ppmm (&__umul_ppmm__p0, (UWtype) (u), (UWtype) (v)); \
(wl) = __umul_ppmm__p0; \
} while (0)
#endif
#define mpn_umul_ppmm_r __MPN(umul_ppmm_r)
extern UWtype mpn_umul_ppmm_r _PROTO ((UWtype, UWtype, UWtype *));
#if ! defined (umul_ppmm) && HAVE_NATIVE_mpn_umul_ppmm_r \
&& ! defined (LONGLONG_STANDALONE)
#define umul_ppmm(wh, wl, u, v) \
do { \
UWtype __umul_ppmm__p0; \
(wh) = mpn_umul_ppmm_r ((UWtype) (u), (UWtype) (v), &__umul_ppmm__p0); \
(wl) = __umul_ppmm__p0; \
} while (0)
#endif
#define mpn_udiv_qrnnd __MPN(udiv_qrnnd)
extern UWtype mpn_udiv_qrnnd _PROTO ((UWtype *, UWtype, UWtype, UWtype));
#if ! defined (udiv_qrnnd) && HAVE_NATIVE_mpn_udiv_qrnnd \
&& ! defined (LONGLONG_STANDALONE)
#define udiv_qrnnd(q, r, n1, n0, d) \
do { \
UWtype __udiv_qrnnd__r; \
(q) = mpn_udiv_qrnnd (&__udiv_qrnnd__r, \
(UWtype) (n1), (UWtype) (n0), (UWtype) d); \
(r) = __udiv_qrnnd__r; \
} while (0)
#endif
#define mpn_udiv_qrnnd_r __MPN(udiv_qrnnd_r)
extern UWtype mpn_udiv_qrnnd_r _PROTO ((UWtype, UWtype, UWtype, UWtype *));
#if ! defined (udiv_qrnnd) && HAVE_NATIVE_mpn_udiv_qrnnd_r \
&& ! defined (LONGLONG_STANDALONE)
#define udiv_qrnnd(q, r, n1, n0, d) \
do { \
UWtype __udiv_qrnnd__r; \
(q) = mpn_udiv_qrnnd_r ((UWtype) (n1), (UWtype) (n0), (UWtype) d, \
&__udiv_qrnnd__r); \
(r) = __udiv_qrnnd__r; \
} while (0)
#endif
/* If this machine has no inline assembler, use C macros. */
#if !defined (add_ssaaaa)
#define add_ssaaaa(sh, sl, ah, al, bh, bl) \
do { \
UWtype __x; \
__x = (al) + (bl); \
(sh) = (ah) + (bh) + (__x < (al)); \
(sl) = __x; \
} while (0)
#endif
#if !defined (sub_ddmmss)
#define sub_ddmmss(sh, sl, ah, al, bh, bl) \
do { \
UWtype __x; \
__x = (al) - (bl); \
(sh) = (ah) - (bh) - ((al) < (bl)); \
(sl) = __x; \
} while (0)
#endif
/* If we lack umul_ppmm but have smul_ppmm, define umul_ppmm in terms of
smul_ppmm. */
#if !defined (umul_ppmm) && defined (smul_ppmm)
#define umul_ppmm(w1, w0, u, v) \
do { \
UWtype __w1; \
UWtype __xm0 = (u), __xm1 = (v); \
smul_ppmm (__w1, w0, __xm0, __xm1); \
(w1) = __w1 + (-(__xm0 >> (W_TYPE_SIZE - 1)) & __xm1) \
+ (-(__xm1 >> (W_TYPE_SIZE - 1)) & __xm0); \
} while (0)
#endif
/* If we still don't have umul_ppmm, define it using plain C.
For reference, when this code is used for squaring (ie. u and v identical
expressions), gcc recognises __x1 and __x2 are the same and generates 3
multiplies, not 4. The subsequent additions could be optimized a bit,
but the only place GMP currently uses such a square is mpn_sqr_basecase,
and chips obliged to use this generic C umul will have plenty of worse
performance problems than a couple of extra instructions on the diagonal
of sqr_basecase. */
#if !defined (umul_ppmm)
#define umul_ppmm(w1, w0, u, v) \
do { \
UWtype __x0, __x1, __x2, __x3; \
UHWtype __ul, __vl, __uh, __vh; \
UWtype __u = (u), __v = (v); \
\
__ul = __ll_lowpart (__u); \
__uh = __ll_highpart (__u); \
__vl = __ll_lowpart (__v); \
__vh = __ll_highpart (__v); \
\
__x0 = (UWtype) __ul * __vl; \
__x1 = (UWtype) __ul * __vh; \
__x2 = (UWtype) __uh * __vl; \
__x3 = (UWtype) __uh * __vh; \
\
__x1 += __ll_highpart (__x0);/* this can't give carry */ \
__x1 += __x2; /* but this indeed can */ \
if (__x1 < __x2) /* did we get it? */ \
__x3 += __ll_B; /* yes, add it in the proper pos. */ \
\
(w1) = __x3 + __ll_highpart (__x1); \
(w0) = (__x1 << W_TYPE_SIZE/2) + __ll_lowpart (__x0); \
} while (0)
#endif
/* If we don't have smul_ppmm, define it using umul_ppmm (which surely will
exist in one form or another. */
#if !defined (smul_ppmm)
#define smul_ppmm(w1, w0, u, v) \
do { \
UWtype __w1; \
UWtype __xm0 = (u), __xm1 = (v); \
umul_ppmm (__w1, w0, __xm0, __xm1); \
(w1) = __w1 - (-(__xm0 >> (W_TYPE_SIZE - 1)) & __xm1) \
- (-(__xm1 >> (W_TYPE_SIZE - 1)) & __xm0); \
} while (0)
#endif
/* Define this unconditionally, so it can be used for debugging. */
#define __udiv_qrnnd_c(q, r, n1, n0, d) \
do { \
UWtype __d1, __d0, __q1, __q0, __r1, __r0, __m; \
\
ASSERT ((d) != 0); \
ASSERT ((n1) < (d)); \
\
__d1 = __ll_highpart (d); \
__d0 = __ll_lowpart (d); \
\
__q1 = (n1) / __d1; \
__r1 = (n1) - __q1 * __d1; \
__m = __q1 * __d0; \
__r1 = __r1 * __ll_B | __ll_highpart (n0); \
if (__r1 < __m) \
{ \
__q1--, __r1 += (d); \
if (__r1 >= (d)) /* i.e. we didn't get carry when adding to __r1 */\
if (__r1 < __m) \
__q1--, __r1 += (d); \
} \
__r1 -= __m; \
\
__q0 = __r1 / __d1; \
__r0 = __r1 - __q0 * __d1; \
__m = __q0 * __d0; \
__r0 = __r0 * __ll_B | __ll_lowpart (n0); \
if (__r0 < __m) \
{ \
__q0--, __r0 += (d); \
if (__r0 >= (d)) \
if (__r0 < __m) \
__q0--, __r0 += (d); \
} \
__r0 -= __m; \
\
(q) = __q1 * __ll_B | __q0; \
(r) = __r0; \
} while (0)
/* If the processor has no udiv_qrnnd but sdiv_qrnnd, go through
__udiv_w_sdiv (defined in libgcc or elsewhere). */
#if !defined (udiv_qrnnd) && defined (sdiv_qrnnd)
#define udiv_qrnnd(q, r, nh, nl, d) \
do { \
UWtype __r; \
(q) = __MPN(udiv_w_sdiv) (&__r, nh, nl, d); \
(r) = __r; \
} while (0)
#endif
/* If udiv_qrnnd was not defined for this processor, use __udiv_qrnnd_c. */
#if !defined (udiv_qrnnd)
#define UDIV_NEEDS_NORMALIZATION 1
#define udiv_qrnnd __udiv_qrnnd_c
#endif
#if !defined (count_leading_zeros)
#define count_leading_zeros(count, x) \
do { \
UWtype __xr = (x); \
UWtype __a; \
\
if (W_TYPE_SIZE == 32) \
{ \
__a = __xr < ((UWtype) 1 << 2*__BITS4) \
? (__xr < ((UWtype) 1 << __BITS4) ? 1 : __BITS4 + 1) \
: (__xr < ((UWtype) 1 << 3*__BITS4) ? 2*__BITS4 + 1 \
: 3*__BITS4 + 1); \
} \
else \
{ \
for (__a = W_TYPE_SIZE - 8; __a > 0; __a -= 8) \
if (((__xr >> __a) & 0xff) != 0) \
break; \
++__a; \
} \
\
(count) = W_TYPE_SIZE + 1 - __a - __clz_tab[__xr >> __a]; \
} while (0)
/* This version gives a well-defined value for zero. */
#define COUNT_LEADING_ZEROS_0 (W_TYPE_SIZE - 1)
#define COUNT_LEADING_ZEROS_NEED_CLZ_TAB
#endif
#ifdef COUNT_LEADING_ZEROS_NEED_CLZ_TAB
extern const unsigned char __GMP_DECLSPEC __clz_tab[128];
#endif
#if !defined (count_trailing_zeros)
/* Define count_trailing_zeros using count_leading_zeros. The latter might be
defined in asm, but if it is not, the C version above is good enough. */
#define count_trailing_zeros(count, x) \
do { \
UWtype __ctz_x = (x); \
UWtype __ctz_c; \
ASSERT (__ctz_x != 0); \
count_leading_zeros (__ctz_c, __ctz_x & -__ctz_x); \
(count) = W_TYPE_SIZE - 1 - __ctz_c; \
} while (0)
#endif
#ifndef UDIV_NEEDS_NORMALIZATION
#define UDIV_NEEDS_NORMALIZATION 0
#endif
/* Whether udiv_qrnnd is actually implemented with udiv_qrnnd_preinv, and
that hence the latter should always be used. */
#ifndef UDIV_PREINV_ALWAYS
#define UDIV_PREINV_ALWAYS 0
#endif
#ifdef _MSC_VER//!!!P
#define sub_333(sh, sm, sl, ah, am, al, bh, bm, bl) \
do { \
UWtype _bw; \
(sl) = (al) - (bl); \
_bw = (sl) > (al) ? 1 : 0; \
(sm) = (am) - (bm) - _bw; \
_bw = (sm) > (am) ? 1 : (sm) < (am) ? 0 : _bw; \
(sh) = (ah) - (bh) - _bw; \
} while (0)
#endif
| ufasoft/foreign | mpir/longlong.h | C | lgpl-2.1 | 10,218 |
/**
* DSS - Digital Signature Services
* Copyright (C) 2015 European Commission, provided under the CEF programme
*
* This file is part of the "DSS - Digital Signature Services" project.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
package eu.europa.esig.dss.asic.cades.signature.asics;
import eu.europa.esig.dss.asic.cades.ASiCWithCAdESContainerExtractor;
import eu.europa.esig.dss.asic.cades.ASiCWithCAdESSignatureParameters;
import eu.europa.esig.dss.asic.cades.ASiCWithCAdESTimestampParameters;
import eu.europa.esig.dss.asic.cades.signature.ASiCWithCAdESService;
import eu.europa.esig.dss.asic.common.ASiCContent;
import eu.europa.esig.dss.diagnostic.DiagnosticData;
import eu.europa.esig.dss.diagnostic.SignatureWrapper;
import eu.europa.esig.dss.diagnostic.jaxb.XmlDigestMatcher;
import eu.europa.esig.dss.enumerations.ASiCContainerType;
import eu.europa.esig.dss.enumerations.SignatureLevel;
import eu.europa.esig.dss.model.DSSDocument;
import eu.europa.esig.dss.model.InMemoryDocument;
import eu.europa.esig.dss.signature.DocumentSignatureService;
import eu.europa.esig.dss.utils.Utils;
import eu.europa.esig.dss.validation.SignedDocumentValidator;
import eu.europa.esig.dss.validation.reports.Reports;
import org.junit.jupiter.api.BeforeEach;
import java.util.Arrays;
import java.util.Date;
import java.util.List;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertTrue;
public class ASiCSCAdESLevelLTTest extends AbstractASiCSCAdESTestSignature {
private DocumentSignatureService<ASiCWithCAdESSignatureParameters, ASiCWithCAdESTimestampParameters> service;
private ASiCWithCAdESSignatureParameters signatureParameters;
private DSSDocument documentToSign;
@BeforeEach
public void init() throws Exception {
documentToSign = new InMemoryDocument("Hello World !".getBytes(), "test.text");
signatureParameters = new ASiCWithCAdESSignatureParameters();
signatureParameters.bLevel().setSigningDate(new Date());
signatureParameters.setSigningCertificate(getSigningCert());
signatureParameters.setCertificateChain(getCertificateChain());
signatureParameters.setSignatureLevel(SignatureLevel.CAdES_BASELINE_LT);
signatureParameters.aSiC().setContainerType(ASiCContainerType.ASiC_S);
service = new ASiCWithCAdESService(getCompleteCertificateVerifier());
service.setTspSource(getGoodTsa());
}
@Override
protected void onDocumentSigned(byte[] byteArray) {
super.onDocumentSigned(byteArray);
ASiCWithCAdESContainerExtractor containerExtractor = new ASiCWithCAdESContainerExtractor(new InMemoryDocument(byteArray));
ASiCContent result = containerExtractor.extract();
List<DSSDocument> signatureDocuments = result.getSignatureDocuments();
assertTrue(Utils.isCollectionNotEmpty(signatureDocuments));
for (DSSDocument signatureDocument : signatureDocuments) {
// validate with no detached content
DiagnosticData diagnosticData = validateDocument(signatureDocument);
SignatureWrapper signature = diagnosticData.getSignatureById(diagnosticData.getFirstSignatureId());
List<XmlDigestMatcher> digestMatchers = signature.getDigestMatchers();
assertEquals(1, digestMatchers.size());
assertFalse(digestMatchers.get(0).isDataFound());
assertFalse(digestMatchers.get(0).isDataIntact());
// with detached content
diagnosticData = validateDocument(signatureDocument, Arrays.asList(getSignedData(result)));
signature = diagnosticData.getSignatureById(diagnosticData.getFirstSignatureId());
digestMatchers = signature.getDigestMatchers();
assertEquals(1, digestMatchers.size());
assertTrue(digestMatchers.get(0).isDataFound());
assertTrue(digestMatchers.get(0).isDataIntact());
}
}
private DiagnosticData validateDocument(DSSDocument signatureDocument) {
return validateDocument(signatureDocument, null);
}
private DiagnosticData validateDocument(DSSDocument signatureDocument, List<DSSDocument> detachedContents) {
SignedDocumentValidator validator = SignedDocumentValidator.fromDocument(signatureDocument);
validator.setCertificateVerifier(getOfflineCertificateVerifier());
if (Utils.isCollectionNotEmpty(detachedContents)) {
validator.setDetachedContents(detachedContents);
}
Reports reports = validator.validateDocument();
return reports.getDiagnosticData();
}
@Override
protected DocumentSignatureService<ASiCWithCAdESSignatureParameters, ASiCWithCAdESTimestampParameters> getService() {
return service;
}
@Override
protected ASiCWithCAdESSignatureParameters getSignatureParameters() {
return signatureParameters;
}
@Override
protected DSSDocument getDocumentToSign() {
return documentToSign;
}
@Override
protected String getSigningAlias() {
return GOOD_USER;
}
}
| esig/dss | dss-asic-cades/src/test/java/eu/europa/esig/dss/asic/cades/signature/asics/ASiCSCAdESLevelLTTest.java | Java | lgpl-2.1 | 5,526 |
#!/usr/bin/env kjscmd5
function Calculator(ui)
{
// Setup entry functions
var display = ui.findChild('display');
this.display = display;
this.one = function() { display.intValue = display.intValue*10+1; }
this.two = function() { display.intValue = display.intValue*10+2; }
this.three = function() { display.intValue = display.intValue*10+3; }
this.four = function() { display.intValue = display.intValue*10+4; }
this.five = function() { display.intValue = display.intValue*10+5; }
this.six = function() { display.intValue = display.intValue*10+6; }
this.seven = function() { display.intValue = display.intValue*10+7; }
this.eight = function() { display.intValue = display.intValue*10+8; }
this.nine = function() { display.intValue = display.intValue*10+9; }
this.zero = function() { display.intValue = display.intValue*10+0; }
ui.connect( ui.findChild('one'), 'clicked()', this, 'one()' );
ui.connect( ui.findChild('two'), 'clicked()', this, 'two()' );
ui.connect( ui.findChild('three'), 'clicked()', this, 'three()' );
ui.connect( ui.findChild('four'), 'clicked()', this, 'four()' );
ui.connect( ui.findChild('five'), 'clicked()', this, 'five()' );
ui.connect( ui.findChild('six'), 'clicked()', this, 'six()' );
ui.connect( ui.findChild('seven'), 'clicked()', this, 'seven()' );
ui.connect( ui.findChild('eight'), 'clicked()', this, 'eight()' );
ui.connect( ui.findChild('nine'), 'clicked()', this, 'nine()' );
ui.connect( ui.findChild('zero'), 'clicked()', this, 'zero()' );
this.val = 0;
this.display.intValue = 0;
this.lastop = function() {}
this.plus = function()
{
this.val = display.intValue+this.val;
display.intValue = 0;
this.lastop=this.plus
}
this.minus = function()
{
this.val = display.intValue-this.val;
display.intValue = 0;
this.lastop=this.minus;
}
ui.connect( ui.findChild('plus'), 'clicked()', this, 'plus()' );
ui.connect( ui.findChild('minus'), 'clicked()', this, 'minus()' );
this.equals = function() { this.lastop(); display.intValue = this.val; }
this.clear = function() { this.lastop=function(){}; display.intValue = 0; this.val = 0; }
ui.connect( ui.findChild('equals'), 'clicked()', this, 'equals()' );
ui.connect( ui.findChild('clear'), 'clicked()', this, 'clear()' );
}
var loader = new QUiLoader();
var ui = loader.load('calc.ui', this);
var calc = new Calculator(ui);
ui.show();
exec();
| KDE/kjsembed | examples/calc/calc.js | JavaScript | lgpl-2.1 | 2,564 |
import { Keys } from '@ephox/agar';
import { describe, it } from '@ephox/bedrock-client';
import { TinyAssertions, TinyContentActions, TinyHooks, TinySelections } from '@ephox/mcagar';
import Editor from 'tinymce/core/api/Editor';
import Theme from 'tinymce/themes/silver/Theme';
describe('browser.tinymce.core.keyboard.TypeTextAtCef', () => {
const hook = TinyHooks.bddSetupLight<Editor>({
add_unload_trigger: false,
base_url: '/project/tinymce/js/tinymce'
}, [ Theme ], true);
it('Type text before cef inline element', () => {
const editor = hook.editor();
editor.setContent('<p><span contenteditable="false">a</span></p>');
TinySelections.select(editor, 'p', [ 1 ]);
TinyContentActions.keystroke(editor, Keys.left());
TinyContentActions.type(editor, 'bc');
TinyAssertions.assertCursor(editor, [ 0, 0 ], 2);
TinyAssertions.assertContent(editor, '<p>bc<span contenteditable="false">a</span></p>');
});
it('Type after cef inline element', () => {
const editor = hook.editor();
editor.setContent('<p><span contenteditable="false">a</span></p>');
TinySelections.select(editor, 'p', [ 1 ]);
TinyContentActions.keystroke(editor, Keys.right());
TinyContentActions.type(editor, 'bc');
TinyAssertions.assertCursor(editor, [ 0, 1 ], 3);
TinyAssertions.assertContent(editor, '<p><span contenteditable="false">a</span>bc</p>');
});
it('Type between cef inline elements', () => {
const editor = hook.editor();
editor.setContent('<p><span contenteditable="false">a</span> <span contenteditable="false">b</span></p>');
TinySelections.select(editor, 'p', [ 3 ]);
TinyContentActions.keystroke(editor, Keys.left());
TinyContentActions.keystroke(editor, Keys.left());
TinyContentActions.type(editor, 'bc');
TinyAssertions.assertSelection(editor, [ 0, 1 ], 3, [ 0, 1 ], 3);
TinyAssertions.assertContent(editor, '<p><span contenteditable="false">a</span>bc <span contenteditable="false">b</span></p>');
});
});
| TeamupCom/tinymce | modules/tinymce/src/core/test/ts/browser/keyboard/TypeTextAtCefTest.ts | TypeScript | lgpl-2.1 | 2,019 |
<?php
namespace wcf\acp\form;
use wcf\data\contact\option\ContactOption;
use wcf\data\contact\option\ContactOptionAction;
use wcf\data\contact\option\ContactOptionEditor;
/**
* Shows the contact option add form.
*
* @author Alexander Ebert
* @copyright 2001-2019 WoltLab GmbH
* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
* @package WoltLabSuite\Core\Acp\Form
* @since 3.1
*/
class ContactOptionAddForm extends AbstractCustomOptionForm {
/**
* @inheritDoc
*/
public $action = 'add';
/**
* @inheritDoc
*/
public $activeMenuItem = 'wcf.acp.menu.link.contact.settings';
/**
* @inheritDoc
*/
public $neededModules = ['MODULE_CONTACT_FORM'];
/**
* @inheritDoc
*/
public $neededPermissions = ['admin.contact.canManageContactForm'];
/**
* action class name
* @var string
*/
public $actionClass = ContactOptionAction::class;
/**
* base class name
* @var string
*/
public $baseClass = ContactOption::class;
/**
* editor class name
* @var string
*/
public $editorClass = ContactOptionEditor::class;
/**
* @inheritDoc
*/
public function readParameters() {
parent::readParameters();
$this->getI18nValue('optionTitle')->setLanguageItem('wcf.contact.option', 'wcf.contact', 'com.woltlab.wcf');
$this->getI18nValue('optionDescription')->setLanguageItem('wcf.contact.optionDescription', 'wcf.contact', 'com.woltlab.wcf');
}
}
| MenesesEvandro/WCF | wcfsetup/install/files/lib/acp/form/ContactOptionAddForm.class.php | PHP | lgpl-2.1 | 1,453 |
/**
* Copyright 2006-2017 the original author or authors.
*
* 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.
*/
package org.solmix.generator.plugin;
import static org.solmix.commons.util.StringUtils.stringHasValue;
import static org.solmix.generator.util.Messages.getString;
import java.util.List;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import org.solmix.generator.api.IntrospectedTable;
import org.solmix.generator.api.PluginAdapter;
/**
* This plugin demonstrates overriding the initialized() method to rename the
* generated example classes. Instead of xxxExample, the classes will be named
* xxxCriteria.
*
* <p>This plugin accepts two properties:
*
* <ul>
* <li><tt>searchString</tt> (required) the regular expression of the name
* search.</li>
* <li><tt>replaceString</tt> (required) the replacement String.</li>
* </ul>
*
* <p>For example, to change the name of the generated Example classes from
* xxxExample to xxxCriteria, specify the following:
*
* <dl>
* <dt>searchString</dt>
* <dd>Example$</dd>
* <dt>replaceString</dt>
* <dd>Criteria</dd>
* </dl>
*
*
* @author Jeff Butler
*
*/
public class RenameExampleClassPlugin extends PluginAdapter {
private String searchString;
private String replaceString;
private Pattern pattern;
public RenameExampleClassPlugin() {
}
@Override
public boolean validate(List<String> warnings) {
searchString = properties.getProperty("searchString");
replaceString = properties.getProperty("replaceString");
boolean valid = stringHasValue(searchString)
&& stringHasValue(replaceString);
if (valid) {
pattern = Pattern.compile(searchString);
} else {
if (!stringHasValue(searchString)) {
warnings.add(getString("ValidationError.18",
"RenameExampleClassPlugin",
"searchString"));
}
if (!stringHasValue(replaceString)) {
warnings.add(getString("ValidationError.18",
"RenameExampleClassPlugin",
"replaceString"));
}
}
return valid;
}
@Override
public void initialized(IntrospectedTable introspectedTable) {
String oldType = introspectedTable.getExampleType();
Matcher matcher = pattern.matcher(oldType);
oldType = matcher.replaceAll(replaceString);
introspectedTable.setExampleType(oldType);
}
}
| solmix/datax | generator/core/src/main/java/org/solmix/generator/plugin/RenameExampleClassPlugin.java | Java | lgpl-2.1 | 3,084 |
/******************************************************************************
* Copyright (C) 2010-2016 CERN. All rights not expressly granted are reserved.
*
* This file is part of the CERN Control and Monitoring Platform 'C2MON'.
* C2MON is free software: you can redistribute it and/or modify it under the
* terms of the GNU Lesser General Public License as published by the Free
* Software Foundation, either version 3 of the license.
*
* C2MON is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
* more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with C2MON. If not, see <http://www.gnu.org/licenses/>.
*****************************************************************************/
package cern.c2mon.client.ext.history.common;
import java.sql.Timestamp;
import cern.c2mon.client.ext.history.common.id.HistoryUpdateId;
/**
* This interface is used to keep track of the data which is from the history.
* It have a function to get the execution time of the update so the player will know
* when to execute the update. And it also have an identifier.
*
* @author vdeila
*
*/
public interface HistoryUpdate {
/**
*
* @return the id of the update
*/
HistoryUpdateId getUpdateId();
/**
*
* @return the time of when this update should execute
*/
Timestamp getExecutionTimestamp();
}
| c2mon/c2mon-client-ext-history | src/main/java/cern/c2mon/client/ext/history/common/HistoryUpdate.java | Java | lgpl-3.0 | 1,559 |
from __future__ import absolute_import
import json
class JSONRenderer:
"""
Renders a mystery as JSON
"""
def render(self, mystery):
return json.dumps(mystery.encode(), indent=4)
| chjacobsen/mystery-murder-generator | mmgen/renderers/json.py | Python | lgpl-3.0 | 204 |
/*
* SonarQube Java
* Copyright (C) 2012-2017 SonarSource SA
* mailto:info AT sonarsource DOT com
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3 of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
package org.sonar.maven.model;
import javax.xml.bind.annotation.adapters.XmlAdapter;
import javax.xml.stream.XMLStreamReader;
/**
* Adapter in charge of converting attributes from XML object, being String, to located attribute,
* storing information related to the location of the attribute.
*/
public class LocatedAttributeAdapter extends XmlAdapter<String, LocatedAttribute> {
private final XMLStreamReader reader;
public LocatedAttributeAdapter(XMLStreamReader reader) {
this.reader = reader;
}
@Override
public LocatedAttribute unmarshal(String value) throws Exception {
LocatedAttribute result = new LocatedAttribute(value);
result.setEndLocation(XmlLocation.getLocation(reader.getLocation()));
result.setStartLocation(XmlLocation.getStartLocation(value, reader.getLocation()));
return result;
}
@Override
public String marshal(LocatedAttribute attribute) throws Exception {
return attribute.getValue();
}
}
| mbring/sonar-java | java-maven-model/src/main/java/org/sonar/maven/model/LocatedAttributeAdapter.java | Java | lgpl-3.0 | 1,812 |
package com.silicolife.textmining.core.datastructures.dataaccess.database.dataaccess.implementation.model.core.entities;
// Generated 23/Mar/2015 16:36:00 by Hibernate Tools 4.3.1
import javax.persistence.Column;
import javax.persistence.Embeddable;
/**
* ClusterProcessHasLabelsId generated by hbm2java
*/
@Embeddable
public class ClusterProcessHasLabelsId implements java.io.Serializable {
private long cphClusterProcessId;
private long cphClusterLabelId;
public ClusterProcessHasLabelsId() {
}
public ClusterProcessHasLabelsId(long cphClusterProcessId, long cphClusterLabelId) {
this.cphClusterProcessId = cphClusterProcessId;
this.cphClusterLabelId = cphClusterLabelId;
}
@Column(name = "cph_cluster_process_id", nullable = false)
public long getCphClusterProcessId() {
return this.cphClusterProcessId;
}
public void setCphClusterProcessId(long cphClusterProcessId) {
this.cphClusterProcessId = cphClusterProcessId;
}
@Column(name = "cph_cluster_label_id", nullable = false)
public long getCphClusterLabelId() {
return this.cphClusterLabelId;
}
public void setCphClusterLabelId(long cphClusterLabelId) {
this.cphClusterLabelId = cphClusterLabelId;
}
public boolean equals(Object other) {
if ((this == other))
return true;
if ((other == null))
return false;
if (!(other instanceof ClusterProcessHasLabelsId))
return false;
ClusterProcessHasLabelsId castOther = (ClusterProcessHasLabelsId) other;
return (this.getCphClusterProcessId() == castOther.getCphClusterProcessId()) && (this.getCphClusterLabelId() == castOther.getCphClusterLabelId());
}
public int hashCode() {
int result = 17;
result = 37 * result + (int) this.getCphClusterProcessId();
result = 37 * result + (int) this.getCphClusterLabelId();
return result;
}
}
| biotextmining/core | src/main/java/com/silicolife/textmining/core/datastructures/dataaccess/database/dataaccess/implementation/model/core/entities/ClusterProcessHasLabelsId.java | Java | lgpl-3.0 | 1,802 |
/*
* Library signature type test program
*
* Copyright (C) 2014-2022, Joachim Metz <[email protected]>
*
* Refer to AUTHORS for acknowledgements.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#include <common.h>
#include <file_stream.h>
#include <types.h>
#if defined( HAVE_STDLIB_H ) || defined( WINAPI )
#include <stdlib.h>
#endif
#include "sigscan_test_libcerror.h"
#include "sigscan_test_libsigscan.h"
#include "sigscan_test_macros.h"
#include "sigscan_test_memory.h"
#include "sigscan_test_unused.h"
#include "../libsigscan/libsigscan_signature.h"
#if defined( __GNUC__ ) && !defined( LIBSIGSCAN_DLL_IMPORT )
/* Tests the libsigscan_signature_initialize function
* Returns 1 if successful or 0 if not
*/
int sigscan_test_signature_initialize(
void )
{
libcerror_error_t *error = NULL;
libsigscan_signature_t *signature = NULL;
int result = 0;
#if defined( HAVE_SIGSCAN_TEST_MEMORY )
int number_of_malloc_fail_tests = 1;
int number_of_memset_fail_tests = 1;
int test_number = 0;
#endif
/* Test regular cases
*/
result = libsigscan_signature_initialize(
&signature,
&error );
SIGSCAN_TEST_ASSERT_EQUAL_INT(
"result",
result,
1 );
SIGSCAN_TEST_ASSERT_IS_NOT_NULL(
"signature",
signature );
SIGSCAN_TEST_ASSERT_IS_NULL(
"error",
error );
result = libsigscan_signature_free(
&signature,
&error );
SIGSCAN_TEST_ASSERT_EQUAL_INT(
"result",
result,
1 );
SIGSCAN_TEST_ASSERT_IS_NULL(
"signature",
signature );
SIGSCAN_TEST_ASSERT_IS_NULL(
"error",
error );
/* Test error cases
*/
result = libsigscan_signature_initialize(
NULL,
&error );
SIGSCAN_TEST_ASSERT_EQUAL_INT(
"result",
result,
-1 );
SIGSCAN_TEST_ASSERT_IS_NOT_NULL(
"error",
error );
libcerror_error_free(
&error );
signature = (libsigscan_signature_t *) 0x12345678UL;
result = libsigscan_signature_initialize(
&signature,
&error );
SIGSCAN_TEST_ASSERT_EQUAL_INT(
"result",
result,
-1 );
SIGSCAN_TEST_ASSERT_IS_NOT_NULL(
"error",
error );
libcerror_error_free(
&error );
signature = NULL;
#if defined( HAVE_SIGSCAN_TEST_MEMORY )
for( test_number = 0;
test_number < number_of_malloc_fail_tests;
test_number++ )
{
/* Test libsigscan_signature_initialize with malloc failing
*/
sigscan_test_malloc_attempts_before_fail = test_number;
result = libsigscan_signature_initialize(
&signature,
&error );
if( sigscan_test_malloc_attempts_before_fail != -1 )
{
sigscan_test_malloc_attempts_before_fail = -1;
if( signature != NULL )
{
libsigscan_signature_free(
&signature,
NULL );
}
}
else
{
SIGSCAN_TEST_ASSERT_EQUAL_INT(
"result",
result,
-1 );
SIGSCAN_TEST_ASSERT_IS_NULL(
"signature",
signature );
SIGSCAN_TEST_ASSERT_IS_NOT_NULL(
"error",
error );
libcerror_error_free(
&error );
}
}
for( test_number = 0;
test_number < number_of_memset_fail_tests;
test_number++ )
{
/* Test libsigscan_signature_initialize with memset failing
*/
sigscan_test_memset_attempts_before_fail = test_number;
result = libsigscan_signature_initialize(
&signature,
&error );
if( sigscan_test_memset_attempts_before_fail != -1 )
{
sigscan_test_memset_attempts_before_fail = -1;
if( signature != NULL )
{
libsigscan_signature_free(
&signature,
NULL );
}
}
else
{
SIGSCAN_TEST_ASSERT_EQUAL_INT(
"result",
result,
-1 );
SIGSCAN_TEST_ASSERT_IS_NULL(
"signature",
signature );
SIGSCAN_TEST_ASSERT_IS_NOT_NULL(
"error",
error );
libcerror_error_free(
&error );
}
}
#endif /* defined( HAVE_SIGSCAN_TEST_MEMORY ) */
return( 1 );
on_error:
if( error != NULL )
{
libcerror_error_free(
&error );
}
if( signature != NULL )
{
libsigscan_signature_free(
&signature,
NULL );
}
return( 0 );
}
/* Tests the libsigscan_signature_free function
* Returns 1 if successful or 0 if not
*/
int sigscan_test_signature_free(
void )
{
libcerror_error_t *error = NULL;
int result = 0;
/* Test error cases
*/
result = libsigscan_signature_free(
NULL,
&error );
SIGSCAN_TEST_ASSERT_EQUAL_INT(
"result",
result,
-1 );
SIGSCAN_TEST_ASSERT_IS_NOT_NULL(
"error",
error );
libcerror_error_free(
&error );
return( 1 );
on_error:
if( error != NULL )
{
libcerror_error_free(
&error );
}
return( 0 );
}
/* Tests the libsigscan_signature_clone function
* Returns 1 if successful or 0 if not
*/
int sigscan_test_signature_clone(
void )
{
libcerror_error_t *error = NULL;
libsigscan_signature_t *destination_signature = NULL;
libsigscan_signature_t *source_signature = NULL;
int result = 0;
/* Initialize test
*/
result = libsigscan_signature_initialize(
&source_signature,
&error );
SIGSCAN_TEST_ASSERT_EQUAL_INT(
"result",
result,
1 );
SIGSCAN_TEST_ASSERT_IS_NOT_NULL(
"source_signature",
source_signature );
SIGSCAN_TEST_ASSERT_IS_NULL(
"error",
error );
/* Test regular cases
*/
result = libsigscan_signature_clone(
&destination_signature,
source_signature,
&error );
SIGSCAN_TEST_ASSERT_EQUAL_INT(
"result",
result,
1 );
SIGSCAN_TEST_ASSERT_IS_NOT_NULL(
"destination_signature",
destination_signature );
SIGSCAN_TEST_ASSERT_IS_NULL(
"error",
error );
/* TODO: move handling clones into the signature code */
result = libsigscan_signature_free_clone(
&destination_signature,
&error );
SIGSCAN_TEST_ASSERT_EQUAL_INT(
"result",
result,
1 );
SIGSCAN_TEST_ASSERT_IS_NULL(
"destination_signature",
destination_signature );
SIGSCAN_TEST_ASSERT_IS_NULL(
"error",
error );
result = libsigscan_signature_clone(
&destination_signature,
NULL,
&error );
SIGSCAN_TEST_ASSERT_EQUAL_INT(
"result",
result,
1 );
SIGSCAN_TEST_ASSERT_IS_NULL(
"destination_signature",
destination_signature );
SIGSCAN_TEST_ASSERT_IS_NULL(
"error",
error );
/* Test error cases
*/
result = libsigscan_signature_clone(
NULL,
source_signature,
&error );
SIGSCAN_TEST_ASSERT_EQUAL_INT(
"result",
result,
-1 );
SIGSCAN_TEST_ASSERT_IS_NOT_NULL(
"error",
error );
libcerror_error_free(
&error );
/* Clean up
*/
result = libsigscan_signature_free(
&source_signature,
&error );
SIGSCAN_TEST_ASSERT_EQUAL_INT(
"result",
result,
1 );
SIGSCAN_TEST_ASSERT_IS_NULL(
"source_signature",
source_signature );
SIGSCAN_TEST_ASSERT_IS_NULL(
"error",
error );
return( 1 );
on_error:
if( error != NULL )
{
libcerror_error_free(
&error );
}
if( destination_signature != NULL )
{
/* TODO: move handling clones into the signature code */
libsigscan_signature_free_clone(
&destination_signature,
NULL );
}
if( source_signature != NULL )
{
libsigscan_signature_free(
&source_signature,
NULL );
}
return( 0 );
}
/* Tests the libsigscan_signature_get_identifier_size function
* Returns 1 if successful or 0 if not
*/
int sigscan_test_signature_get_identifier_size(
void )
{
libcerror_error_t *error = NULL;
libsigscan_signature_t *signature = NULL;
size_t identifier_size = 0;
int identifier_size_is_set = 0;
int result = 0;
/* Initialize test
*/
result = libsigscan_signature_initialize(
&signature,
&error );
SIGSCAN_TEST_ASSERT_EQUAL_INT(
"result",
result,
1 );
SIGSCAN_TEST_ASSERT_IS_NOT_NULL(
"signature",
signature );
SIGSCAN_TEST_ASSERT_IS_NULL(
"error",
error );
/* Test regular cases
*/
result = libsigscan_signature_get_identifier_size(
signature,
&identifier_size,
&error );
SIGSCAN_TEST_ASSERT_NOT_EQUAL_INT(
"result",
result,
-1 );
SIGSCAN_TEST_ASSERT_IS_NULL(
"error",
error );
identifier_size_is_set = result;
/* Test error cases
*/
result = libsigscan_signature_get_identifier_size(
NULL,
&identifier_size,
&error );
SIGSCAN_TEST_ASSERT_EQUAL_INT(
"result",
result,
-1 );
SIGSCAN_TEST_ASSERT_IS_NOT_NULL(
"error",
error );
libcerror_error_free(
&error );
if( identifier_size_is_set != 0 )
{
result = libsigscan_signature_get_identifier_size(
signature,
NULL,
&error );
SIGSCAN_TEST_ASSERT_EQUAL_INT(
"result",
result,
-1 );
SIGSCAN_TEST_ASSERT_IS_NOT_NULL(
"error",
error );
libcerror_error_free(
&error );
}
/* Clean up
*/
result = libsigscan_signature_free(
&signature,
&error );
SIGSCAN_TEST_ASSERT_EQUAL_INT(
"result",
result,
1 );
SIGSCAN_TEST_ASSERT_IS_NULL(
"signature",
signature );
SIGSCAN_TEST_ASSERT_IS_NULL(
"error",
error );
return( 1 );
on_error:
if( error != NULL )
{
libcerror_error_free(
&error );
}
if( signature != NULL )
{
libsigscan_signature_free(
&signature,
NULL );
}
return( 0 );
}
#endif /* defined( __GNUC__ ) && !defined( LIBSIGSCAN_DLL_IMPORT ) */
/* The main program
*/
#if defined( HAVE_WIDE_SYSTEM_CHARACTER )
int wmain(
int argc SIGSCAN_TEST_ATTRIBUTE_UNUSED,
wchar_t * const argv[] SIGSCAN_TEST_ATTRIBUTE_UNUSED )
#else
int main(
int argc SIGSCAN_TEST_ATTRIBUTE_UNUSED,
char * const argv[] SIGSCAN_TEST_ATTRIBUTE_UNUSED )
#endif
{
SIGSCAN_TEST_UNREFERENCED_PARAMETER( argc )
SIGSCAN_TEST_UNREFERENCED_PARAMETER( argv )
#if defined( __GNUC__ ) && !defined( LIBSIGSCAN_DLL_IMPORT )
SIGSCAN_TEST_RUN(
"libsigscan_signature_initialize",
sigscan_test_signature_initialize );
SIGSCAN_TEST_RUN(
"libsigscan_signature_free",
sigscan_test_signature_free );
/* TODO: add tests for libsigscan_signature_free_clone */
SIGSCAN_TEST_RUN(
"libsigscan_signature_clone",
sigscan_test_signature_clone );
SIGSCAN_TEST_RUN(
"libsigscan_signature_get_identifier_size",
sigscan_test_signature_get_identifier_size );
/* TODO: add tests for libsigscan_signature_get_identifier */
/* TODO: add tests for libsigscan_signature_set */
#endif /* defined( __GNUC__ ) && !defined( LIBSIGSCAN_DLL_IMPORT ) */
return( EXIT_SUCCESS );
on_error:
return( EXIT_FAILURE );
}
| libyal/libsigscan | tests/sigscan_test_signature.c | C | lgpl-3.0 | 11,212 |
var namespaces =
[
[ "shyft", "namespaceshyft.html", "namespaceshyft" ]
]; | statkraft/shyft-doc | core/html/namespaces.js | JavaScript | lgpl-3.0 | 78 |
// Created file "Lib\src\Uuid\oledbdat"
typedef struct _GUID
{
unsigned long Data1;
unsigned short Data2;
unsigned short Data3;
unsigned char Data4[8];
} GUID;
#define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \
extern const GUID name = { l, w1, w2, { b1, b2, b3, b4, b5, b6, b7, b8 } }
DEFINE_GUID(DBROWCOL_ISROOT, 0x0c733ab6, 0x2a1c, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d);
| Frankie-PellesC/fSDK | Lib/src/Uuid/oledbdat0000005D.c | C | lgpl-3.0 | 448 |
/**
* Copyright (C) 2010-2012 Regis Montoya (aka r3gis - www.r3gis.fr)
* This file is part of CSipSimple.
*
* CSipSimple is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* If you own a pjsip commercial license you can also redistribute it
* and/or modify it under the terms of the GNU Lesser General Public License
* as an android library.
*
* CSipSimple is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with CSipSimple. If not, see <http://www.gnu.org/licenses/>.
*/
package com.csipsimple.ui.outgoingcall;
import android.app.PendingIntent;
import android.app.PendingIntent.CanceledException;
import android.database.Cursor;
import android.os.Bundle;
import android.os.RemoteException;
import android.support.v4.content.Loader;
import android.view.View;
import android.widget.ListView;
import com.csipsimple.api.ISipService;
import com.csipsimple.api.SipProfile;
import com.csipsimple.ui.account.AccountsLoader;
import com.csipsimple.utils.CallHandlerPlugin;
import com.csipsimple.utils.Log;
import com.csipsimple.widgets.CSSListFragment;
public class OutgoingCallListFragment extends CSSListFragment {
private static final String THIS_FILE = "OutgoingCallListFragment";
private OutgoingAccountsAdapter mAdapter;
private AccountsLoader accLoader;
private long startDate;
private boolean callMade = false;
@Override
public void onCreate(Bundle state) {
super.onCreate(state);
setHasOptionsMenu(true);
}
@Override
public void onResume() {
super.onResume();
callMade = false;
attachAdapter();
getLoaderManager().initLoader(0, null, this);
startDate = System.currentTimeMillis();
}
@Override
public void onActivityCreated(Bundle savedInstanceState) {
super.onActivityCreated(savedInstanceState);
}
private void attachAdapter() {
if(getListAdapter() == null) {
if(mAdapter == null) {
mAdapter = new OutgoingAccountsAdapter(this, null);
}
setListAdapter(mAdapter);
}
}
@Override
public Loader<Cursor> onCreateLoader(int loader, Bundle args) {
OutgoingCallChooser superActivity = ((OutgoingCallChooser) getActivity());
accLoader = new AccountsLoader(getActivity(), superActivity.getPhoneNumber(), superActivity.shouldIgnoreRewritingRules());
return accLoader;
}
final long MOBILE_CALL_DELAY_MS = 600;
/**
* Place the call for a given cursor positionned at right index in list
* @param c The cursor pointing the entry we'd like to call
* @return true if call performed, false else
*/
private boolean placeCall(Cursor c) {
OutgoingCallChooser superActivity = ((OutgoingCallChooser)getActivity());
ISipService service = superActivity.getConnectedService();
long accountId = c.getLong(c.getColumnIndex(SipProfile.FIELD_ID));
if(accountId > SipProfile.INVALID_ID) {
// Extra check for the account id.
if(service == null) {
return false;
}
boolean canCall = c.getInt(c.getColumnIndex(AccountsLoader.FIELD_STATUS_OUTGOING)) == 1;
if(!canCall) {
return false;
}
try {
String toCall = c.getString(c.getColumnIndex(AccountsLoader.FIELD_NBR_TO_CALL));
service.makeCall(toCall, (int) accountId);
superActivity.finishServiceIfNeeded(true);
return true;
} catch (RemoteException e) {
Log.e(THIS_FILE, "Unable to make the call", e);
}
}else if(accountId < SipProfile.INVALID_ID) {
// This is a plugin row.
if(accLoader != null) {
CallHandlerPlugin ch = accLoader.getCallHandlerWithAccountId(accountId);
if(ch == null) {
Log.w(THIS_FILE, "Call handler not anymore available in loader... something gone wrong");
return false;
}
String nextExclude = ch.getNextExcludeTelNumber();
long delay = 0;
if (nextExclude != null && service != null) {
try {
service.ignoreNextOutgoingCallFor(nextExclude);
} catch (RemoteException e) {
Log.e(THIS_FILE, "Ignore next outgoing number failed");
}
delay = MOBILE_CALL_DELAY_MS - (System.currentTimeMillis() - startDate);
}
if(ch.getIntent() != null) {
PluginCallRunnable pendingTask = new PluginCallRunnable(ch.getIntent(), delay);
Log.d(THIS_FILE, "Deferring call task of " + delay);
pendingTask.start();
}
return true;
}
}
return false;
}
private class PluginCallRunnable extends Thread {
private PendingIntent pendingIntent;
private long delay;
public PluginCallRunnable(PendingIntent pi, long d) {
pendingIntent = pi;
delay = d;
}
@Override
public void run() {
if(delay > 0) {
try {
sleep(delay);
} catch (InterruptedException e) {
Log.e(THIS_FILE, "Thread that fires outgoing call has been interrupted");
}
}
OutgoingCallChooser superActivity = ((OutgoingCallChooser)getActivity());
try {
pendingIntent.send();
} catch (CanceledException e) {
Log.e(THIS_FILE, "Pending intent cancelled", e);
}
superActivity.finishServiceIfNeeded(false);
}
}
@Override
public synchronized void changeCursor(Cursor c) {
if(c != null && callMade == false) {
OutgoingCallChooser superActivity = ((OutgoingCallChooser)getActivity());
Long accountToCall = superActivity.getAccountToCallTo();
// Move to first to search in this cursor
c.moveToFirst();
// First of all, if only one is available... try call with it
if(c.getCount() == 1) {
if(placeCall(c)) {
c.close();
callMade = true;
return;
}
}else {
// Now lets search for one in for call mode if service is ready
do {
if(c.getInt(c.getColumnIndex(AccountsLoader.FIELD_FORCE_CALL)) == 1) {
if(placeCall(c)) {
c.close();
callMade = true;
return;
}
}
if(accountToCall != SipProfile.INVALID_ID) {
if(accountToCall == c.getLong(c.getColumnIndex(SipProfile.FIELD_ID))) {
if(placeCall(c)) {
c.close();
callMade = true;
return;
}
}
}
} while(c.moveToNext());
}
}
// Set adapter content if nothing to force was found
if(mAdapter != null) {
mAdapter.changeCursor(c);
}
}
@Override
public synchronized void onListItemClick(ListView l, View v, int position, long id) {
if(mAdapter != null) {
placeCall((Cursor) mAdapter.getItem(position));
}
}
public AccountsLoader getAccountLoader() {
return accLoader;
}
}
| fingi/csipsimple | src/com/csipsimple/ui/outgoingcall/OutgoingCallListFragment.java | Java | lgpl-3.0 | 8,351 |
package fun.guruqu.portal.structures;
public class BlockStructure {
/**
* @param args
*/
public static void main(String[] args) {
}
}
| guruqu/BeaconTeleport | src/fun/guruqu/portal/structures/BlockStructure.java | Java | lgpl-3.0 | 149 |
// --------------------------------------------------------------------------------------------------------------------
// <copyright file="Profile.cs" company="Allors bvba">
// Copyright 2002-2012 Allors bvba.
// Dual Licensed under
// a) the Lesser General Public Licence v3 (LGPL)
// b) the Allors License
// The LGPL License is included in the file lgpl.txt.
// The Allors License is an addendum to your contract.
// Allors Platform is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// For more information visit http://www.allors.com/legal
// </copyright>
// --------------------------------------------------------------------------------------------------------------------
namespace Allors.Adapters.Object.SqlClient.ReadCommitted
{
using System;
using System.Collections.Generic;
using Allors.Meta;
using Adapters;
using Allors.Adapters.Object.SqlClient.Caching.Debugging;
using Allors.Adapters.Object.SqlClient.Debug;
public class Profile : SqlClient.Profile
{
private readonly Prefetchers prefetchers = new Prefetchers();
private readonly DebugConnectionFactory connectionFactory;
private readonly DebugCacheFactory cacheFactory;
public Profile()
{
}
public Profile(DebugConnectionFactory connectionFactory, DebugCacheFactory cacheFactory)
{
this.connectionFactory = connectionFactory;
this.cacheFactory = cacheFactory;
}
public override Action[] Markers
{
get
{
var markers = new List<Action>
{
() => { },
() => this.Session.Commit(),
};
if (Settings.ExtraMarkers)
{
markers.Add(
() =>
{
foreach (var @class in this.Session.Database.MetaPopulation.Classes)
{
var prefetchPolicy = this.prefetchers[@class];
this.Session.Prefetch(prefetchPolicy, this.Session.Extent(@class));
}
});
}
return markers.ToArray();
}
}
protected override string ConnectionString => System.Configuration.ConfigurationManager.ConnectionStrings["sqlclientobject"].ConnectionString;
public IDatabase CreateDatabase(IMetaPopulation metaPopulation, bool init)
{
var configuration = new SqlClient.Configuration
{
ObjectFactory = this.CreateObjectFactory(metaPopulation),
ConnectionString = this.ConnectionString,
ConnectionFactory = this.connectionFactory,
CacheFactory = this.cacheFactory
};
var database = new Database(configuration);
if (init)
{
database.Init();
}
return database;
}
public override IDatabase CreatePopulation()
{
return new Memory.Database(new Memory.Configuration { ObjectFactory = this.ObjectFactory });
}
public override IDatabase CreateDatabase()
{
var configuration = new SqlClient.Configuration
{
ObjectFactory = this.ObjectFactory,
ConnectionString = this.ConnectionString,
ConnectionFactory = this.connectionFactory,
CacheFactory = this.cacheFactory
};
var database = new Database(configuration);
return database;
}
protected override bool Match(ColumnTypes columnType, string dataType)
{
dataType = dataType.Trim().ToLowerInvariant();
switch (columnType)
{
case ColumnTypes.ObjectId:
return dataType.Equals("int");
case ColumnTypes.TypeId:
return dataType.Equals("uniqueidentifier");
case ColumnTypes.CacheId:
return dataType.Equals("int");
case ColumnTypes.Binary:
return dataType.Equals("varbinary");
case ColumnTypes.Boolean:
return dataType.Equals("bit");
case ColumnTypes.Decimal:
return dataType.Equals("decimal");
case ColumnTypes.Float:
return dataType.Equals("float");
case ColumnTypes.Integer:
return dataType.Equals("int");
case ColumnTypes.String:
return dataType.Equals("nvarchar");
case ColumnTypes.Unique:
return dataType.Equals("uniqueidentifier");
default:
throw new Exception("Unsupported columntype " + columnType);
}
}
}
} | Allors/allors1 | Adapters/Tests/Adapters/object/sqlclient/ReadCommitted/Profile.cs | C# | lgpl-3.0 | 5,350 |
/*
Copyright 2013-2021 Paul Colby
This file is part of QtAws.
QtAws is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
QtAws is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with the QtAws. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef QTAWS_DESCRIBEAPPINSTANCEUSERREQUEST_H
#define QTAWS_DESCRIBEAPPINSTANCEUSERREQUEST_H
#include "chimerequest.h"
namespace QtAws {
namespace Chime {
class DescribeAppInstanceUserRequestPrivate;
class QTAWSCHIME_EXPORT DescribeAppInstanceUserRequest : public ChimeRequest {
public:
DescribeAppInstanceUserRequest(const DescribeAppInstanceUserRequest &other);
DescribeAppInstanceUserRequest();
virtual bool isValid() const Q_DECL_OVERRIDE;
protected:
virtual QtAws::Core::AwsAbstractResponse * response(QNetworkReply * const reply) const Q_DECL_OVERRIDE;
private:
Q_DECLARE_PRIVATE(DescribeAppInstanceUserRequest)
};
} // namespace Chime
} // namespace QtAws
#endif
| pcolby/libqtaws | src/chime/describeappinstanceuserrequest.h | C | lgpl-3.0 | 1,435 |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace SphericalHarmonicAnalyze
{
class LUDenceMatrix:MathNet.Numerics.LinearAlgebra.Double.Factorization.LU
{
MathNet.Numerics.LinearAlgebra.Double.DenseMatrix dm { get; set; }
}
}
| vadimart92/SGG-TRF-Analyzer | SphericalHarmonicAnalyze/LUDenceMatrix.cs | C# | lgpl-3.0 | 295 |
/**************************************************************************
**
** This file is part of .
** https://github.com/HamedMasafi/
**
** is free software: you can redistribute it and/or modify
** it under the terms of the GNU Lesser General Public License as published by
** the Free Software Foundation, either version 3 of the License, or
** (at your option) any later version.
**
** is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
** GNU Lesser General Public License for more details.
**
** You should have received a copy of the GNU Lesser General Public License
** along with . If not, see <http://www.gnu.org/licenses/>.
**
**************************************************************************/
#include <QEventLoop>
#include <QtCore/QDebug>
#include <QtNetwork/QTcpSocket>
#include "abstracthub_p.h"
#include "serverhub.h"
#include "serverhub_p.h"
NEURON_BEGIN_NAMESPACE
ServerHubPrivate::ServerHubPrivate() : serverThread(nullptr), connectionEventLoop(nullptr)
{
}
ServerHub::ServerHub(QObject *parent) : AbstractHub(parent),
d(new ServerHubPrivate)
{
}
ServerHub::ServerHub(AbstractSerializer *serializer, QObject *parent) : AbstractHub(serializer, parent),
d(new ServerHubPrivate)
{
}
ServerHub::ServerHub(QTcpSocket *socket, QObject *parent) : AbstractHub(parent),
d(new ServerHubPrivate)
{
this->socket = socket;
}
ServerHub::~ServerHub()
{
// QList<SharedObject *> soList = sharedObjects();
// foreach (SharedObject *so, soList) {
// if(so)
// removeSharedObject(so);
// }
// while(sharedObjects().count()){
// removeSharedObject(sharedObjects().at(0));
// }
auto so = sharedObjectHash();
QHashIterator<const QString, SharedObject*> i(so);
while (i.hasNext()) {
i.next();
// cout << i.key() << ": " << i.value() << endl;
detachSharedObject(i.value());
}
}
ServerThread *ServerHub::serverThread() const
{
return d->serverThread;
}
qlonglong ServerHub::hi(qlonglong hubId)
{
initalizeMutex.lock();
setHubId(hubId);
// emit connected();
K_TRACE_DEBUG;
// invokeOnPeer(THIS_HUB, "hi", hubId);
if (d->connectionEventLoop) {
d->connectionEventLoop->quit();
d->connectionEventLoop->deleteLater();
}
initalizeMutex.unlock();
setStatus(Connected);
return this->hubId();
}
bool ServerHub::setSocketDescriptor(qintptr socketDescriptor, bool waitForConnect)
{
bool ok = socket->setSocketDescriptor(socketDescriptor);
if(waitForConnect)
socket->waitForReadyRead();
return ok;
}
void ServerHub::setServerThread(ServerThread *serverThread)
{
if(d->serverThread != serverThread)
d->serverThread = serverThread;
}
void ServerHub::beginConnection()
{
K_TRACE_DEBUG;
d->connectionEventLoop = new QEventLoop;
K_REG_OBJECT(d->connectionEventLoop);
d->connectionEventLoop->exec();
}
NEURON_END_NAMESPACE
| HamedMasafi/Noron | src/serverhub.cpp | C++ | lgpl-3.0 | 3,066 |
/* $Id$
* ===========================================================================
*
* PUBLIC DOMAIN NOTICE
* National Center for Biotechnology Information
*
* This software/database is a "United States Government Work" under the
* terms of the United States Copyright Act. It was written as part of
* the author's official duties as a United States Government employee and
* thus cannot be copyrighted. This software/database is freely available
* to the public for use. The National Library of Medicine and the U.S.
* Government have not placed any restriction on its use or reproduction.
*
* Although all reasonable efforts have been taken to ensure the accuracy
* and reliability of the software and data, the NLM and the U.S.
* Government do not and cannot warrant the performance or results that
* may be obtained by using this software or data. The NLM and the U.S.
* Government disclaim all warranties, express or implied, including
* warranties of performance, merchantability or fitness for any particular
* purpose.
*
* Please cite the author in any work or product based on this material.
*
* ===========================================================================
*
*/
/// @file Cn3d_backbone_style.hpp
/// User-defined methods of the data storage class.
///
/// This file was originally generated by application DATATOOL
/// using the following specifications:
/// 'cn3d.asn'.
///
/// New methods or data members can be added to it if needed.
/// See also: Cn3d_backbone_style_.hpp
#ifndef OBJECTS_CN3D_CN3D_BACKBONE_STYLE_HPP
#define OBJECTS_CN3D_CN3D_BACKBONE_STYLE_HPP
// generated includes
#include <objects/cn3d/Cn3d_backbone_style_.hpp>
// generated classes
BEGIN_NCBI_SCOPE
BEGIN_objects_SCOPE // namespace ncbi::objects::
/////////////////////////////////////////////////////////////////////////////
class NCBI_CN3D_EXPORT CCn3d_backbone_style : public CCn3d_backbone_style_Base
{
typedef CCn3d_backbone_style_Base Tparent;
public:
// constructor
CCn3d_backbone_style(void);
// destructor
~CCn3d_backbone_style(void);
private:
// Prohibit copy constructor and assignment operator
CCn3d_backbone_style(const CCn3d_backbone_style& value);
CCn3d_backbone_style& operator=(const CCn3d_backbone_style& value);
};
/////////////////// CCn3d_backbone_style inline methods
// constructor
inline
CCn3d_backbone_style::CCn3d_backbone_style(void)
{
}
/////////////////// end of CCn3d_backbone_style inline methods
END_objects_SCOPE // namespace ncbi::objects::
END_NCBI_SCOPE
#endif // OBJECTS_CN3D_CN3D_BACKBONE_STYLE_HPP
/* Original file checksum: lines: 86, chars: 2588, CRC32: dfafc7fa */
| kyungtaekLIM/PSI-BLASTexB | src/ncbi-blast-2.5.0+/c++/include/objects/cn3d/Cn3d_backbone_style.hpp | C++ | lgpl-3.0 | 2,744 |
package com.sirma.itt.seip.rest.handlers.readers;
import static com.sirma.itt.seip.rest.utils.request.params.RequestParams.PATH_ID;
import java.io.IOException;
import java.io.InputStream;
import java.lang.annotation.Annotation;
import java.lang.reflect.Type;
import javax.inject.Inject;
import javax.ws.rs.BeanParam;
import javax.ws.rs.Consumes;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.MultivaluedMap;
import javax.ws.rs.ext.MessageBodyReader;
import javax.ws.rs.ext.Provider;
import com.sirma.itt.seip.domain.instance.Instance;
import com.sirma.itt.seip.rest.exceptions.BadRequestException;
import com.sirma.itt.seip.rest.resources.instances.InstanceResourceParser;
import com.sirma.itt.seip.rest.utils.JSON;
import com.sirma.itt.seip.rest.utils.Versions;
import com.sirma.itt.seip.rest.utils.request.RequestInfo;
/**
* Converts a JSON object to {@link Instance}.
*
* @author yasko
*/
@Provider
@Consumes(Versions.V2_JSON)
public class InstanceBodyReader implements MessageBodyReader<Instance> {
@Inject
private InstanceResourceParser instanceResourceParser;
@BeanParam
private RequestInfo request;
@Override
public boolean isReadable(Class<?> type, Type genericType, Annotation[] annotations, MediaType mediaType) {
return Instance.class.isAssignableFrom(type);
}
@Override
public Instance readFrom(Class<Instance> type, Type genericType, Annotation[] annotations, MediaType mediaType,
MultivaluedMap<String, String> headers, InputStream stream) throws IOException {
String id = PATH_ID.get(request);
Instance instance = JSON.readObject(stream, instanceResourceParser.toSingleInstance(id));
if (instance != null) {
return instance;
}
throw new BadRequestException("There was a problem with the stream reading or instance resolving.");
}
}
| SirmaITT/conservation-space-1.7.0 | docker/sirma-platform/platform/seip-parent/platform/rest-api/src/main/java/com/sirma/itt/seip/rest/handlers/readers/InstanceBodyReader.java | Java | lgpl-3.0 | 1,803 |
<?php
namespace Web;
use BusinessLogic\Configuration\Configuration;
use BusinessLogic\Configuration\ConfigurationBook;
/* @var $this Settings */
?>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<span id="page-title">
Settings
</span>
<div class="btn-group" role="group" id="top-toolbar"></div>
<div id="content">
<div id="SubContainer">
<form method="post" class="form-horizontal">
<div class="panel panel-primary">
<div class="panel-heading">
<h3 class="panel-title">Google</h3>
</div>
<div class="panel-body">
<div class="form-group">
<label class="col-sm-2 control-label">Client ID:</label>
<div class="col-sm-10">
<input type="text" name="<?php echo Configuration::GOOGLE_CLIENT_ID ?>" class="form-control" value="<?php echo ConfigurationBook::getValue( Configuration::GOOGLE_CLIENT_ID ) ?>" placeholder="" />
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">Secret ID:</label>
<div class="col-sm-10">
<input type="text" name="<?php echo Configuration::GOOGLE_CLIENT_SECRET ?>" class="form-control" value="<?php echo ConfigurationBook::getValue( Configuration::GOOGLE_CLIENT_SECRET ) ?>" placeholder="" />
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">Redirect URL:</label>
<div class="col-sm-10">
<input type="text" name="<?php echo Configuration::GOOGLE_REDIRECT_URL ?>" class="form-control" value="<?php echo ConfigurationBook::getValue( Configuration::GOOGLE_REDIRECT_URL ) ?>" placeholder="" />
</div>
</div>
</div>
</div>
<div class="panel panel-primary">
<div class="panel-heading">
<h3 class="panel-title">Send notification handler</h3>
</div>
<div class="panel-body">
<div class="form-group">
<label class="col-sm-2 control-label">Username:</label>
<div class="col-sm-10">
<input type="text" name="<?php echo Configuration::SCRIPT_USERNAME ?>" class="form-control" value="<?php echo ConfigurationBook::getValue( Configuration::SCRIPT_USERNAME ) ?>" placeholder="" />
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">Password:</label>
<div class="col-sm-10">
<input type="text" name="<?php echo Configuration::SCRIPT_PASSWORD ?>" class="form-control" value="<?php echo ConfigurationBook::getValue( Configuration::SCRIPT_PASSWORD ) ?>" placeholder="" />
</div>
</div>
</div>
</div>
<div class="pull-right">
<button type="submit" class="btn btn-primary">
<!--<span class="glyphicon glyphicon-search"></span>-->
Save
</button>
</div>
</form>
</div>
</div> | MpStyle/NotificationManager | Web/Settings.view.php | PHP | lgpl-3.0 | 3,532 |
/***
Copyright (c) 2012 - 2021 Hércules S. S. José
Este arquivo é parte do programa Orçamento Doméstico.
Orçamento Doméstico é um software livre; você pode redistribui-lo e/ou
modificá-lo dentro dos termos da Licença Pública Geral Menor GNU como
publicada pela Fundação do Software Livre (FSF); na versão 3.0 da
Licença.
Este programa é distribuído na esperança que possa ser útil, mas SEM
NENHUMA GARANTIA; sem uma garantia implícita de ADEQUAÇÃO a qualquer
MERCADO ou APLICAÇÃO EM PARTICULAR. Veja a Licença Pública Geral Menor
GNU em português para maiores detalhes.
Você deve ter recebido uma cópia da Licença Pública Geral Menor GNU sob
o nome de "LICENSE" junto com este programa, se não, acesse o site do
projeto no endereco https://github.com/herculeshssj/orcamento ou escreva
para a Fundação do Software Livre(FSF) Inc., 51 Franklin St, Fifth Floor,
Boston, MA 02110-1301, USA.
Para mais informações sobre o programa Orçamento Doméstico e seu autor
entre em contato pelo e-mail [email protected], ou ainda escreva
para Hércules S. S. José, Rua José dos Anjos, 160 - Bl. 3 Apto. 304 -
Jardim Alvorada - CEP: 26261-130 - Nova Iguaçu, RJ, Brasil.
***/
package br.com.hslife.orcamento.entity;
import static org.junit.Assert.assertEquals;
import java.util.Date;
import org.junit.Before;
import org.junit.Test;
import br.com.hslife.orcamento.enumeration.TipoCategoria;
import br.com.hslife.orcamento.exception.ValidationException;
public class DividaTerceiroTest {
private DividaTerceiro entity;
@Before
public void setUp() throws Exception {
Usuario usuario = new Usuario();
usuario.setNome("Usuário de teste");
Favorecido favorecido = new Favorecido();
favorecido.setNome("Favorecido de teste");
Moeda moeda = new Moeda();
moeda.setNome("Real");
moeda.setSimboloMonetario("R$");
entity = new DividaTerceiro();
entity.setDataNegociacao(new Date());
entity.setFavorecido(favorecido);
entity.setJustificativa("Justificativa da dívida de teste");
entity.setTermoDivida("Termo da dívida de teste");
entity.setTermoQuitacao("Termo de quitação da dívida de teste");
entity.setTipoCategoria(TipoCategoria.CREDITO);
entity.setUsuario(usuario);
entity.setValorDivida(1000);
entity.setMoeda(moeda);
PagamentoDividaTerceiro pagamento;
for (int i = 0; i < 3; ++i) {
pagamento = new PagamentoDividaTerceiro();
pagamento.setComprovantePagamento("Comprovante de pagamento da dívida de teste " + i);
pagamento.setDataPagamento(new Date());
pagamento.setDividaTerceiro(entity);
pagamento.setValorPago(100);
entity.getPagamentos().add(pagamento);
}
}
@Test(expected=ValidationException.class)
public void testValidateDataNegociacao() {
entity.setDataNegociacao(null);
entity.validate();
}
@Test(expected=ValidationException.class)
public void testValidateJustificativa() {
entity.setJustificativa(null);
entity.validate();
}
@Test(expected=ValidationException.class)
public void testValidateTamanhoJustificativa() {
StringBuilder s = new StringBuilder(10000);
for (int i = 0; i < 10000; ++i)
s.append("a");
entity.setJustificativa(s.toString());
entity.validate();
}
@Test(expected=ValidationException.class)
public void testValidateCategoria() {
entity.setTipoCategoria(null);
entity.validate();
}
@Test(expected=ValidationException.class)
public void testValidateFavorecido() {
entity.setFavorecido(null);
entity.validate();
}
@Test(expected=ValidationException.class)
public void testValidateMoeda() {
entity.setMoeda(null);
entity.validate();
}
@Test
public void testLabel() {
assertEquals("Crédito com Favorecido de teste no valor de R$ 1000.0 - Registrado", entity.getLabel());
}
@Test
public void testTotalPago() {
assertEquals(300.0, entity.getTotalPago(), 0);
}
@Test
public void testTotalAPagar() {
assertEquals(700.0, entity.getTotalAPagar(), 0);
}
@Test(expected=ValidationException.class)
public void testValidateDataPagamento() {
for (PagamentoDividaTerceiro pagamento : entity.getPagamentos()) {
pagamento.setDataPagamento(null);
pagamento.validate();
}
}
}
| herculeshssj/orcamento | orcamento/src/test/java/br/com/hslife/orcamento/entity/DividaTerceiroTest.java | Java | lgpl-3.0 | 4,219 |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>Linux IRC-Bot: mybotv3.c File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
$(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
</head>
<body>
<div id="top"><!-- do not remove this div! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td style="padding-left: 0.5em;">
<div id="projectname">Linux IRC-Bot
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- Generated by Doxygen 1.7.6.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main Page</span></a></li>
<li><a href="annotated.html"><span>Classes</span></a></li>
<li class="current"><a href="files.html"><span>Files</span></a></li>
<li>
<div id="MSearchBox" class="MSearchBoxInactive">
<span class="left">
<img id="MSearchSelect" src="search/mag_sel.png"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
alt=""/>
<input type="text" id="MSearchField" value="Search" accesskey="S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"
onkeyup="searchBox.OnSearchFieldChange(event)"/>
</span><span class="right">
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
</span>
</div>
</li>
</ul>
</div>
<div id="navrow2" class="tabs2">
<ul class="tablist">
<li><a href="files.html"><span>File List</span></a></li>
<li><a href="globals.html"><span>File Members</span></a></li>
</ul>
</div>
</div>
<div class="header">
<div class="summary">
<a href="#define-members">Defines</a> |
<a href="#func-members">Functions</a> |
<a href="#var-members">Variables</a> </div>
<div class="headertitle">
<div class="title">mybotv3.c File Reference</div> </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><code>#include <stdio.h></code><br/>
<code>#include <stdarg.h></code><br/>
<code>#include <string.h></code><br/>
<code>#include <stdlib.h></code><br/>
<code>#include "libircclient.h"</code><br/>
<code>#include "<a class="el" href="callbk_8h_source.html">callbk.h</a>"</code><br/>
<code>#include <dlfcn.h></code><br/>
<code>#include <unistd.h></code><br/>
<code>#include <sys/types.h></code><br/>
<code>#include <sys/stat.h></code><br/>
<code>#include "<a class="el" href="daemon_8h_source.html">daemon.h</a>"</code><br/>
</div><table class="memberdecls">
<tr><td colspan="2"><h2><a name="define-members"></a>
Defines</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="mybotv3_8c.html#aee925031172607ff8d5cf8b68374bd7f">DB_FILE</a>   "test.db"</td></tr>
<tr><td colspan="2"><h2><a name="func-members"></a>
Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="mybotv3_8c.html#a3c04138a5bfe5d72780bb7e82a18e627">main</a> (int argc, char **argv)</td></tr>
<tr><td colspan="2"><h2><a name="var-members"></a>
Variables</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void * </td><td class="memItemRight" valign="bottom"><a class="el" href="mybotv3_8c.html#a0838f0661fcf38642ec573a9cbcd6230">mylib_handle</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">sqlite3 * </td><td class="memItemRight" valign="bottom"><a class="el" href="mybotv3_8c.html#aa57ee5872804735f49943cf9e9500b33">dbhandle</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void(* </td><td class="memItemRight" valign="bottom"><a class="el" href="mybotv3_8c.html#a3b99c68e016b9769eb219f9056635499">create_table</a> )()</td></tr>
</table>
<hr/><h2>Define Documentation</h2>
<a class="anchor" id="aee925031172607ff8d5cf8b68374bd7f"></a><!-- doxytag: member="mybotv3.c::DB_FILE" ref="aee925031172607ff8d5cf8b68374bd7f" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define <a class="el" href="mybotv3_8c.html#aee925031172607ff8d5cf8b68374bd7f">DB_FILE</a>   "test.db"</td>
</tr>
</table>
</div>
<div class="memdoc">
</div>
</div>
<hr/><h2>Function Documentation</h2>
<a class="anchor" id="a3c04138a5bfe5d72780bb7e82a18e627"></a><!-- doxytag: member="mybotv3.c::main" ref="a3c04138a5bfe5d72780bb7e82a18e627" args="(int argc, char **argv)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int <a class="el" href="mybotv3_8c.html#a3c04138a5bfe5d72780bb7e82a18e627">main</a> </td>
<td>(</td>
<td class="paramtype">int </td>
<td class="paramname"><em>argc</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">char ** </td>
<td class="paramname"><em>argv</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Main Funktion</p>
<p>Verweist die IRC Events auf die jeweiligen Funktionen. Nimmt die Benutzereingabe entgegen. Startet Endlossschleife.</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">argv[1]</td><td>irc server </td></tr>
<tr><td class="paramname">argv[2]</td><td>nickname </td></tr>
<tr><td class="paramname">argv[3]</td><td>channel </td></tr>
<tr><td class="paramname">argv[4]</td><td>logging-Plugins </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<hr/><h2>Variable Documentation</h2>
<a class="anchor" id="a3b99c68e016b9769eb219f9056635499"></a><!-- doxytag: member="mybotv3.c::create_table" ref="a3b99c68e016b9769eb219f9056635499" args=")()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void(* <a class="el" href="dbase_8h.html#addc31b4cf7d993be3efbf2704ebac49d">create_table</a>)()</td>
</tr>
</table>
</div>
<div class="memdoc">
</div>
</div>
<a class="anchor" id="aa57ee5872804735f49943cf9e9500b33"></a><!-- doxytag: member="mybotv3.c::dbhandle" ref="aa57ee5872804735f49943cf9e9500b33" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">sqlite3* <a class="el" href="mybotv3_8c.html#aa57ee5872804735f49943cf9e9500b33">dbhandle</a></td>
</tr>
</table>
</div>
<div class="memdoc">
</div>
</div>
<a class="anchor" id="a0838f0661fcf38642ec573a9cbcd6230"></a><!-- doxytag: member="mybotv3.c::mylib_handle" ref="a0838f0661fcf38642ec573a9cbcd6230" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void* <a class="el" href="mybotv3_8c.html#a0838f0661fcf38642ec573a9cbcd6230">mylib_handle</a></td>
</tr>
</table>
</div>
<div class="memdoc">
</div>
</div>
</div><!-- contents -->
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark"> </span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark"> </span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark"> </span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark"> </span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark"> </span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark"> </span>Defines</a></div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<hr class="footer"/><address class="footer"><small>
Generated on Mon Jun 25 2012 19:38:45 for Linux IRC-Bot by  <a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.7.6.1
</small></address>
</body>
</html>
| jehd/Linux-Bot | doxy-files/html/mybotv3_8c.html | HTML | lgpl-3.0 | 9,746 |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.3.1"/>
<title>Core3: Melee2hLunge1Command Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td style="padding-left: 0.5em;">
<div id="projectname">Core3
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.3.1 -->
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main Page</span></a></li>
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
<li class="current"><a href="annotated.html"><span>Classes</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<div id="navrow2" class="tabs2">
<ul class="tablist">
<li><a href="annotated.html"><span>Class List</span></a></li>
<li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li>
<li><a href="functions.html"><span>Class Members</span></a></li>
</ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#pub-methods">Public Member Functions</a> |
<a href="class_melee2h_lunge1_command-members.html">List of all members</a> </div>
<div class="headertitle">
<div class="title">Melee2hLunge1Command Class Reference</div> </div>
</div><!--header-->
<div class="contents">
<p><code>#include <<a class="el" href="_melee2h_lunge1_command_8h_source.html">Melee2hLunge1Command.h</a>></code></p>
<div class="dynheader">
Inheritance diagram for Melee2hLunge1Command:</div>
<div class="dyncontent">
<div class="center">
<img src="class_melee2h_lunge1_command.png" usemap="#Melee2hLunge1Command_map" alt=""/>
<map id="Melee2hLunge1Command_map" name="Melee2hLunge1Command_map">
<area href="class_combat_queue_command.html" alt="CombatQueueCommand" shape="rect" coords="178,112,524,136"/>
<area href="classserver_1_1zone_1_1objects_1_1creature_1_1commands_1_1_queue_command.html" alt="server::zone::objects::creature::commands::QueueCommand" shape="rect" coords="178,56,524,80"/>
</map>
</div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:ab24b1ee6aabf75142f01eeac24830aa2"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="class_melee2h_lunge1_command.html#ab24b1ee6aabf75142f01eeac24830aa2">Melee2hLunge1Command</a> (const String &<a class="el" href="classserver_1_1zone_1_1objects_1_1creature_1_1commands_1_1_queue_command.html#a0d8e1b60e830d42ee881e168d3fd0a62">name</a>, <a class="el" href="classserver_1_1zone_1_1_zone_process_server.html">ZoneProcessServer</a> *<a class="el" href="classserver_1_1zone_1_1objects_1_1creature_1_1commands_1_1_queue_command.html#aab0d7c550040a4e8811e270c57ff90a4">server</a>)</td></tr>
<tr class="separator:ab24b1ee6aabf75142f01eeac24830aa2"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:aa7f703ec51a11e4e580e21a571b65f46"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="class_melee2h_lunge1_command.html#aa7f703ec51a11e4e580e21a571b65f46">doQueueCommand</a> (<a class="el" href="classserver_1_1zone_1_1objects_1_1creature_1_1_creature_object.html">CreatureObject</a> *creature, const uint64 &target, const UnicodeString &arguments)</td></tr>
<tr class="separator:aa7f703ec51a11e4e580e21a571b65f46"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="inherit_header pub_methods_class_combat_queue_command"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_class_combat_queue_command')"><img src="closed.png" alt="-"/> Public Member Functions inherited from <a class="el" href="class_combat_queue_command.html">CombatQueueCommand</a></td></tr>
<tr class="memitem:acecfccfbb6b84b8a3f71cbadf67e40d5 inherit pub_methods_class_combat_queue_command"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="class_combat_queue_command.html#acecfccfbb6b84b8a3f71cbadf67e40d5">CombatQueueCommand</a> (const String &<a class="el" href="classserver_1_1zone_1_1objects_1_1creature_1_1commands_1_1_queue_command.html#a0d8e1b60e830d42ee881e168d3fd0a62">name</a>, <a class="el" href="classserver_1_1zone_1_1_zone_process_server.html">ZoneProcessServer</a> *<a class="el" href="classserver_1_1zone_1_1objects_1_1creature_1_1commands_1_1_queue_command.html#aab0d7c550040a4e8811e270c57ff90a4">server</a>)</td></tr>
<tr class="separator:acecfccfbb6b84b8a3f71cbadf67e40d5 inherit pub_methods_class_combat_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ad6028342db12dfd0ed5bc4b793fe3e5c inherit pub_methods_class_combat_queue_command"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="class_combat_queue_command.html#ad6028342db12dfd0ed5bc4b793fe3e5c">doCombatAction</a> (<a class="el" href="classserver_1_1zone_1_1objects_1_1creature_1_1_creature_object.html">CreatureObject</a> *creature, const uint64 &target, const UnicodeString &arguments="", ManagedReference< <a class="el" href="classserver_1_1zone_1_1objects_1_1tangible_1_1weapon_1_1_weapon_object.html">WeaponObject</a> * > weapon=NULL)</td></tr>
<tr class="separator:ad6028342db12dfd0ed5bc4b793fe3e5c inherit pub_methods_class_combat_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a4d02e00013ce91296028de2f50069329 inherit pub_methods_class_combat_queue_command"><td class="memItemLeft" align="right" valign="top">float </td><td class="memItemRight" valign="bottom"><a class="el" href="class_combat_queue_command.html#a4d02e00013ce91296028de2f50069329">getCommandDuration</a> (<a class="el" href="classserver_1_1zone_1_1objects_1_1creature_1_1_creature_object.html">CreatureObject</a> *object, const UnicodeString &arguments)</td></tr>
<tr class="separator:a4d02e00013ce91296028de2f50069329 inherit pub_methods_class_combat_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ab01e59f14e10a80d6ab864037e054538 inherit pub_methods_class_combat_queue_command"><td class="memItemLeft" align="right" valign="top">uint32 </td><td class="memItemRight" valign="bottom"><a class="el" href="class_combat_queue_command.html#ab01e59f14e10a80d6ab864037e054538">getDotDuration</a> () const </td></tr>
<tr class="separator:ab01e59f14e10a80d6ab864037e054538 inherit pub_methods_class_combat_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a13c713f692d4d3ba456be820cd9d66cf inherit pub_methods_class_combat_queue_command"><td class="memItemLeft" align="right" valign="top">uint64 </td><td class="memItemRight" valign="bottom"><a class="el" href="class_combat_queue_command.html#a13c713f692d4d3ba456be820cd9d66cf">getDotType</a> () const </td></tr>
<tr class="separator:a13c713f692d4d3ba456be820cd9d66cf inherit pub_methods_class_combat_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a944c691c15494fe1c2827baada51c174 inherit pub_methods_class_combat_queue_command"><td class="memItemLeft" align="right" valign="top">uint8 </td><td class="memItemRight" valign="bottom"><a class="el" href="class_combat_queue_command.html#a944c691c15494fe1c2827baada51c174">getDotPool</a> () const </td></tr>
<tr class="separator:a944c691c15494fe1c2827baada51c174 inherit pub_methods_class_combat_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a8c74a9ae1128d558724cb6fabe8baf1f inherit pub_methods_class_combat_queue_command"><td class="memItemLeft" align="right" valign="top">uint32 </td><td class="memItemRight" valign="bottom"><a class="el" href="class_combat_queue_command.html#a8c74a9ae1128d558724cb6fabe8baf1f">getDotStrength</a> () const </td></tr>
<tr class="separator:a8c74a9ae1128d558724cb6fabe8baf1f inherit pub_methods_class_combat_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:adb04e305d321710774a941f6f5d75a5b inherit pub_methods_class_combat_queue_command"><td class="memItemLeft" align="right" valign="top">float </td><td class="memItemRight" valign="bottom"><a class="el" href="class_combat_queue_command.html#adb04e305d321710774a941f6f5d75a5b">getDotPotency</a> () const </td></tr>
<tr class="separator:adb04e305d321710774a941f6f5d75a5b inherit pub_methods_class_combat_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ab7e328df957585d5d87a135a54f192e6 inherit pub_methods_class_combat_queue_command"><td class="memItemLeft" align="right" valign="top">float </td><td class="memItemRight" valign="bottom"><a class="el" href="class_combat_queue_command.html#ab7e328df957585d5d87a135a54f192e6">getHealthCostMultiplier</a> () const </td></tr>
<tr class="separator:ab7e328df957585d5d87a135a54f192e6 inherit pub_methods_class_combat_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a30781941b6e9bea799df27485964957b inherit pub_methods_class_combat_queue_command"><td class="memItemLeft" align="right" valign="top">float </td><td class="memItemRight" valign="bottom"><a class="el" href="class_combat_queue_command.html#a30781941b6e9bea799df27485964957b">getActionCostMultiplier</a> () const </td></tr>
<tr class="separator:a30781941b6e9bea799df27485964957b inherit pub_methods_class_combat_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a6cd0e77a1159bcc834e008f2182f645b inherit pub_methods_class_combat_queue_command"><td class="memItemLeft" align="right" valign="top">float </td><td class="memItemRight" valign="bottom"><a class="el" href="class_combat_queue_command.html#a6cd0e77a1159bcc834e008f2182f645b">getMindCostMultiplier</a> () const </td></tr>
<tr class="separator:a6cd0e77a1159bcc834e008f2182f645b inherit pub_methods_class_combat_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a740e5cf5bcfd184988b5230d164c32ca inherit pub_methods_class_combat_queue_command"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="class_combat_queue_command.html#a740e5cf5bcfd184988b5230d164c32ca">getRange</a> () const </td></tr>
<tr class="separator:a740e5cf5bcfd184988b5230d164c32ca inherit pub_methods_class_combat_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a32200dd89e456f459d6cc1cd7c62d8d7 inherit pub_methods_class_combat_queue_command"><td class="memItemLeft" align="right" valign="top">String </td><td class="memItemRight" valign="bottom"><a class="el" href="class_combat_queue_command.html#a32200dd89e456f459d6cc1cd7c62d8d7">getAccuracySkillMod</a> () const </td></tr>
<tr class="separator:a32200dd89e456f459d6cc1cd7c62d8d7 inherit pub_methods_class_combat_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a4f07aa43c56a48d7defb93952687c96a inherit pub_methods_class_combat_queue_command"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="class_combat_queue_command.html#a4f07aa43c56a48d7defb93952687c96a">getBlindChance</a> () const </td></tr>
<tr class="separator:a4f07aa43c56a48d7defb93952687c96a inherit pub_methods_class_combat_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a10bf1cd77bead7f26db42c394cfbb07a inherit pub_methods_class_combat_queue_command"><td class="memItemLeft" align="right" valign="top">float </td><td class="memItemRight" valign="bottom"><a class="el" href="class_combat_queue_command.html#a10bf1cd77bead7f26db42c394cfbb07a">getDamageMultiplier</a> () const </td></tr>
<tr class="separator:a10bf1cd77bead7f26db42c394cfbb07a inherit pub_methods_class_combat_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:af488f1ef0216b9984174a63ca2436700 inherit pub_methods_class_combat_queue_command"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="class_combat_queue_command.html#af488f1ef0216b9984174a63ca2436700">getAccuracyBonus</a> () const </td></tr>
<tr class="separator:af488f1ef0216b9984174a63ca2436700 inherit pub_methods_class_combat_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a51734a65ba9b8e97a1d080ae635e3f91 inherit pub_methods_class_combat_queue_command"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="class_combat_queue_command.html#a51734a65ba9b8e97a1d080ae635e3f91">getDizzyChance</a> () const </td></tr>
<tr class="separator:a51734a65ba9b8e97a1d080ae635e3f91 inherit pub_methods_class_combat_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a68aabaad090901af262bbc7991189b50 inherit pub_methods_class_combat_queue_command"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="class_combat_queue_command.html#a68aabaad090901af262bbc7991189b50">getIntimidateChance</a> () const </td></tr>
<tr class="separator:a68aabaad090901af262bbc7991189b50 inherit pub_methods_class_combat_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a63f93024901e84300181a9fe1dd2400b inherit pub_methods_class_combat_queue_command"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="class_combat_queue_command.html#a63f93024901e84300181a9fe1dd2400b">getKnockdownChance</a> () const </td></tr>
<tr class="separator:a63f93024901e84300181a9fe1dd2400b inherit pub_methods_class_combat_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a15e83fe46377c4adf517415ea6553cf4 inherit pub_methods_class_combat_queue_command"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="class_combat_queue_command.html#a15e83fe46377c4adf517415ea6553cf4">getPostureDownChance</a> () const </td></tr>
<tr class="separator:a15e83fe46377c4adf517415ea6553cf4 inherit pub_methods_class_combat_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a95e1b87fe34f75a0859a6944d3e594f7 inherit pub_methods_class_combat_queue_command"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="class_combat_queue_command.html#a95e1b87fe34f75a0859a6944d3e594f7">getPostureUpChance</a> () const </td></tr>
<tr class="separator:a95e1b87fe34f75a0859a6944d3e594f7 inherit pub_methods_class_combat_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a8317df999ba4ee5a32ef5972c1ea3e49 inherit pub_methods_class_combat_queue_command"><td class="memItemLeft" align="right" valign="top">float </td><td class="memItemRight" valign="bottom"><a class="el" href="class_combat_queue_command.html#a8317df999ba4ee5a32ef5972c1ea3e49">getSpeedMultiplier</a> () const </td></tr>
<tr class="separator:a8317df999ba4ee5a32ef5972c1ea3e49 inherit pub_methods_class_combat_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:af20632cbf8546613578fcebceeb07540 inherit pub_methods_class_combat_queue_command"><td class="memItemLeft" align="right" valign="top">float </td><td class="memItemRight" valign="bottom"><a class="el" href="class_combat_queue_command.html#af20632cbf8546613578fcebceeb07540">getSpeed</a> () const </td></tr>
<tr class="separator:af20632cbf8546613578fcebceeb07540 inherit pub_methods_class_combat_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a0140ece6a43b8d0a91952db471dbbe61 inherit pub_methods_class_combat_queue_command"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="class_combat_queue_command.html#a0140ece6a43b8d0a91952db471dbbe61">getStunChance</a> () const </td></tr>
<tr class="separator:a0140ece6a43b8d0a91952db471dbbe61 inherit pub_methods_class_combat_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a6ef535a6282fa8510b5253ab55bd2c1f inherit pub_methods_class_combat_queue_command"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="class_combat_queue_command.html#a6ef535a6282fa8510b5253ab55bd2c1f">isAreaAction</a> () const </td></tr>
<tr class="separator:a6ef535a6282fa8510b5253ab55bd2c1f inherit pub_methods_class_combat_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:afa5496c400c3dcc69388326684258d40 inherit pub_methods_class_combat_queue_command"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="class_combat_queue_command.html#afa5496c400c3dcc69388326684258d40">isConeAction</a> () const </td></tr>
<tr class="separator:afa5496c400c3dcc69388326684258d40 inherit pub_methods_class_combat_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a73b3af59d6587e8070e503deff86db5e inherit pub_methods_class_combat_queue_command"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="class_combat_queue_command.html#a73b3af59d6587e8070e503deff86db5e">isDotDamageOfHit</a> () const </td></tr>
<tr class="separator:a73b3af59d6587e8070e503deff86db5e inherit pub_methods_class_combat_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ad6feeaa1266e65dc15a4743c40977049 inherit pub_methods_class_combat_queue_command"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="class_combat_queue_command.html#ad6feeaa1266e65dc15a4743c40977049">getConeAngle</a> () const </td></tr>
<tr class="separator:ad6feeaa1266e65dc15a4743c40977049 inherit pub_methods_class_combat_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a5b6ba4d1dc286e5f4cac4ff62c42d692 inherit pub_methods_class_combat_queue_command"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="class_combat_queue_command.html#a5b6ba4d1dc286e5f4cac4ff62c42d692">getAreaRange</a> () const </td></tr>
<tr class="separator:a5b6ba4d1dc286e5f4cac4ff62c42d692 inherit pub_methods_class_combat_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a8532824cdd8a8eb7ae2e5db98be49959 inherit pub_methods_class_combat_queue_command"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="class_combat_queue_command.html#a8532824cdd8a8eb7ae2e5db98be49959">getDurationStateTime</a> () const </td></tr>
<tr class="separator:a8532824cdd8a8eb7ae2e5db98be49959 inherit pub_methods_class_combat_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a365025199b34c773a088922505fc5ac7 inherit pub_methods_class_combat_queue_command"><td class="memItemLeft" align="right" valign="top">float </td><td class="memItemRight" valign="bottom"><a class="el" href="class_combat_queue_command.html#a365025199b34c773a088922505fc5ac7">getForceCostMultiplier</a> () const </td></tr>
<tr class="separator:a365025199b34c773a088922505fc5ac7 inherit pub_methods_class_combat_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:acb71e34f634cb924b29cc76f08bb15b1 inherit pub_methods_class_combat_queue_command"><td class="memItemLeft" align="right" valign="top">float </td><td class="memItemRight" valign="bottom"><a class="el" href="class_combat_queue_command.html#acb71e34f634cb924b29cc76f08bb15b1">getForceCost</a> () const </td></tr>
<tr class="separator:acb71e34f634cb924b29cc76f08bb15b1 inherit pub_methods_class_combat_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a183f6bef5abfd43f0a633c1619c871fb inherit pub_methods_class_combat_queue_command"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="class_combat_queue_command.html#a183f6bef5abfd43f0a633c1619c871fb">getNextAttackDelayChance</a> () const </td></tr>
<tr class="separator:a183f6bef5abfd43f0a633c1619c871fb inherit pub_methods_class_combat_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a80d93dc11a17a0e7ed99586039d79599 inherit pub_methods_class_combat_queue_command"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_combat_queue_command.html#a80d93dc11a17a0e7ed99586039d79599">setBlindStateChance</a> (int <a class="el" href="class_combat_queue_command.html#a0a634d994fe3d1b8436a0e11cc9c0ab1">blindStateChance</a>)</td></tr>
<tr class="separator:a80d93dc11a17a0e7ed99586039d79599 inherit pub_methods_class_combat_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a96069eb0d6e692062fc3b6d6756cfeda inherit pub_methods_class_combat_queue_command"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_combat_queue_command.html#a96069eb0d6e692062fc3b6d6756cfeda">setDamageMultiplier</a> (float <a class="el" href="class_combat_queue_command.html#a0185bde574f3f7b47e54957a706c7c59">damageMultiplier</a>)</td></tr>
<tr class="separator:a96069eb0d6e692062fc3b6d6756cfeda inherit pub_methods_class_combat_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a0cd7f00e15e54fbff9ce37bf28f0ecd6 inherit pub_methods_class_combat_queue_command"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_combat_queue_command.html#a0cd7f00e15e54fbff9ce37bf28f0ecd6">setAccuracyBonus</a> (int <a class="el" href="class_combat_queue_command.html#a250b9f30d705ff9db8763145cd3c64c1">accuracyBonus</a>)</td></tr>
<tr class="separator:a0cd7f00e15e54fbff9ce37bf28f0ecd6 inherit pub_methods_class_combat_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a603012079ace1eb56713c7f55e58a5da inherit pub_methods_class_combat_queue_command"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_combat_queue_command.html#a603012079ace1eb56713c7f55e58a5da">setHealthCostMultiplier</a> (float f)</td></tr>
<tr class="separator:a603012079ace1eb56713c7f55e58a5da inherit pub_methods_class_combat_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:aec525d3d1c89ecb0ed51b326ee764f77 inherit pub_methods_class_combat_queue_command"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_combat_queue_command.html#aec525d3d1c89ecb0ed51b326ee764f77">setActionCostMultiplier</a> (float f)</td></tr>
<tr class="separator:aec525d3d1c89ecb0ed51b326ee764f77 inherit pub_methods_class_combat_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:aee667720cd3092eff9204d262360aa2c inherit pub_methods_class_combat_queue_command"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_combat_queue_command.html#aee667720cd3092eff9204d262360aa2c">setMindCostMultiplier</a> (float f)</td></tr>
<tr class="separator:aee667720cd3092eff9204d262360aa2c inherit pub_methods_class_combat_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a7cbd19461c331f007db3254329ed5e52 inherit pub_methods_class_combat_queue_command"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_combat_queue_command.html#a7cbd19461c331f007db3254329ed5e52">setForceCostMultiplier</a> (float f)</td></tr>
<tr class="separator:a7cbd19461c331f007db3254329ed5e52 inherit pub_methods_class_combat_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a32ce04675697f6c601d97be57e1e39f1 inherit pub_methods_class_combat_queue_command"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_combat_queue_command.html#a32ce04675697f6c601d97be57e1e39f1">setForceCost</a> (float f)</td></tr>
<tr class="separator:a32ce04675697f6c601d97be57e1e39f1 inherit pub_methods_class_combat_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a2813de9ff98e9acdc30af98bce81d980 inherit pub_methods_class_combat_queue_command"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_combat_queue_command.html#a2813de9ff98e9acdc30af98bce81d980">setDizzyStateChance</a> (int <a class="el" href="class_combat_queue_command.html#a4ec4557da87f7f2f2c89635c0b4b2441">dizzyStateChance</a>)</td></tr>
<tr class="separator:a2813de9ff98e9acdc30af98bce81d980 inherit pub_methods_class_combat_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:af99e322b2663acf92dc64876675b63f3 inherit pub_methods_class_combat_queue_command"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_combat_queue_command.html#af99e322b2663acf92dc64876675b63f3">setIntimidateStateChance</a> (int <a class="el" href="class_combat_queue_command.html#a0cc9682be2f14d1386fcaaa5c892d5f9">intimidateStateChance</a>)</td></tr>
<tr class="separator:af99e322b2663acf92dc64876675b63f3 inherit pub_methods_class_combat_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a08ea3ed31c57393ac89bcc687b671eb4 inherit pub_methods_class_combat_queue_command"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_combat_queue_command.html#a08ea3ed31c57393ac89bcc687b671eb4">setKnockdownStateChance</a> (int <a class="el" href="class_combat_queue_command.html#a7a3d3d3f2cbc8284b46cf02d57804516">knockdownStateChance</a>)</td></tr>
<tr class="separator:a08ea3ed31c57393ac89bcc687b671eb4 inherit pub_methods_class_combat_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a02527b44fa6a77be84069b0d54b2af10 inherit pub_methods_class_combat_queue_command"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_combat_queue_command.html#a02527b44fa6a77be84069b0d54b2af10">setPostureDownStateChance</a> (int <a class="el" href="class_combat_queue_command.html#a455a3511812b55e431af38ad4d746309">postureDownStateChance</a>)</td></tr>
<tr class="separator:a02527b44fa6a77be84069b0d54b2af10 inherit pub_methods_class_combat_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a252c7a7f68596e66ee0536349af87905 inherit pub_methods_class_combat_queue_command"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_combat_queue_command.html#a252c7a7f68596e66ee0536349af87905">setPostureUpStateChance</a> (int <a class="el" href="class_combat_queue_command.html#a82e12701eaf97c3aecb75dfd727f3d00">postureUpStateChance</a>)</td></tr>
<tr class="separator:a252c7a7f68596e66ee0536349af87905 inherit pub_methods_class_combat_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a7fac530a0ce1817aea19b7f895799b10 inherit pub_methods_class_combat_queue_command"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_combat_queue_command.html#a7fac530a0ce1817aea19b7f895799b10">setNextAttackDelayChance</a> (int i)</td></tr>
<tr class="separator:a7fac530a0ce1817aea19b7f895799b10 inherit pub_methods_class_combat_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a3f13ca3e7eb630166fec6f7d238b13c2 inherit pub_methods_class_combat_queue_command"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_combat_queue_command.html#a3f13ca3e7eb630166fec6f7d238b13c2">setDurationStateTime</a> (int i)</td></tr>
<tr class="separator:a3f13ca3e7eb630166fec6f7d238b13c2 inherit pub_methods_class_combat_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ac6b8337049ce40a7f08a0b46ea90ccb7 inherit pub_methods_class_combat_queue_command"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_combat_queue_command.html#ac6b8337049ce40a7f08a0b46ea90ccb7">setDotDuration</a> (uint32 i)</td></tr>
<tr class="separator:ac6b8337049ce40a7f08a0b46ea90ccb7 inherit pub_methods_class_combat_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ac24b88c7293655f1807b237ec93aacbd inherit pub_methods_class_combat_queue_command"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_combat_queue_command.html#ac24b88c7293655f1807b237ec93aacbd">setDotType</a> (uint64 l)</td></tr>
<tr class="separator:ac24b88c7293655f1807b237ec93aacbd inherit pub_methods_class_combat_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a1a65f02b1986deb2d3b1798c37363562 inherit pub_methods_class_combat_queue_command"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_combat_queue_command.html#a1a65f02b1986deb2d3b1798c37363562">setDotPool</a> (uint8 c)</td></tr>
<tr class="separator:a1a65f02b1986deb2d3b1798c37363562 inherit pub_methods_class_combat_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ac904a576ffb39da4d2cdd3a5bc6f5a02 inherit pub_methods_class_combat_queue_command"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_combat_queue_command.html#ac904a576ffb39da4d2cdd3a5bc6f5a02">setDotStrength</a> (uint32 i)</td></tr>
<tr class="separator:ac904a576ffb39da4d2cdd3a5bc6f5a02 inherit pub_methods_class_combat_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a96f83535da0bc2993f7b7e79190be039 inherit pub_methods_class_combat_queue_command"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_combat_queue_command.html#a96f83535da0bc2993f7b7e79190be039">setDotPotency</a> (float f)</td></tr>
<tr class="separator:a96f83535da0bc2993f7b7e79190be039 inherit pub_methods_class_combat_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:abf8a2b6189d53fe40686ca461e3b2c3f inherit pub_methods_class_combat_queue_command"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_combat_queue_command.html#abf8a2b6189d53fe40686ca461e3b2c3f">setConeAngle</a> (int i)</td></tr>
<tr class="separator:abf8a2b6189d53fe40686ca461e3b2c3f inherit pub_methods_class_combat_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ad881e2f1bbb882fc0a16ed92ae37dfb8 inherit pub_methods_class_combat_queue_command"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_combat_queue_command.html#ad881e2f1bbb882fc0a16ed92ae37dfb8">setDotDamageOfHit</a> (bool b)</td></tr>
<tr class="separator:ad881e2f1bbb882fc0a16ed92ae37dfb8 inherit pub_methods_class_combat_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a84593385278db7564c0e01ac80cdcd3c inherit pub_methods_class_combat_queue_command"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_combat_queue_command.html#a84593385278db7564c0e01ac80cdcd3c">setAreaAction</a> (bool b)</td></tr>
<tr class="separator:a84593385278db7564c0e01ac80cdcd3c inherit pub_methods_class_combat_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a994173fd6b25d46cc2462f18e99254a2 inherit pub_methods_class_combat_queue_command"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_combat_queue_command.html#a994173fd6b25d46cc2462f18e99254a2">setConeAction</a> (bool b)</td></tr>
<tr class="separator:a994173fd6b25d46cc2462f18e99254a2 inherit pub_methods_class_combat_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a6249c26d0f67995a550ecfbc89de6a01 inherit pub_methods_class_combat_queue_command"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_combat_queue_command.html#a6249c26d0f67995a550ecfbc89de6a01">setAreaRange</a> (int i)</td></tr>
<tr class="separator:a6249c26d0f67995a550ecfbc89de6a01 inherit pub_methods_class_combat_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a6a00277a7ab6735cb5484bbb8e760949 inherit pub_methods_class_combat_queue_command"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_combat_queue_command.html#a6a00277a7ab6735cb5484bbb8e760949">setEffectString</a> (String s)</td></tr>
<tr class="separator:a6a00277a7ab6735cb5484bbb8e760949 inherit pub_methods_class_combat_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a3adab009947ce273525938e85bbb09a5 inherit pub_methods_class_combat_queue_command"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_combat_queue_command.html#a3adab009947ce273525938e85bbb09a5">setSpeedMultiplier</a> (float <a class="el" href="class_combat_queue_command.html#a47a1f6e40b1a3d091ea05e790c668ec0">speedMultiplier</a>)</td></tr>
<tr class="separator:a3adab009947ce273525938e85bbb09a5 inherit pub_methods_class_combat_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a6b854326f51f8c3af577422e2cb45365 inherit pub_methods_class_combat_queue_command"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_combat_queue_command.html#a6b854326f51f8c3af577422e2cb45365">setSpeed</a> (float speedd)</td></tr>
<tr class="separator:a6b854326f51f8c3af577422e2cb45365 inherit pub_methods_class_combat_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a08a193b328b03a1a3d510b95f40b538c inherit pub_methods_class_combat_queue_command"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_combat_queue_command.html#a08a193b328b03a1a3d510b95f40b538c">setStunStateChance</a> (int <a class="el" href="class_combat_queue_command.html#ab509b0514e0acbba882abf8bab329b78">stunStateChance</a>)</td></tr>
<tr class="separator:a08a193b328b03a1a3d510b95f40b538c inherit pub_methods_class_combat_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:af375638948e00cbc79b3a5e96eb931e0 inherit pub_methods_class_combat_queue_command"><td class="memItemLeft" align="right" valign="top">uint32 </td><td class="memItemRight" valign="bottom"><a class="el" href="class_combat_queue_command.html#af375638948e00cbc79b3a5e96eb931e0">getAnimationCRC</a> () const </td></tr>
<tr class="separator:af375638948e00cbc79b3a5e96eb931e0 inherit pub_methods_class_combat_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a2b1c4b59c5610c3a254c65c38f5356a5 inherit pub_methods_class_combat_queue_command"><td class="memItemLeft" align="right" valign="top">String </td><td class="memItemRight" valign="bottom"><a class="el" href="class_combat_queue_command.html#a2b1c4b59c5610c3a254c65c38f5356a5">getEffectString</a> () const </td></tr>
<tr class="separator:a2b1c4b59c5610c3a254c65c38f5356a5 inherit pub_methods_class_combat_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:adb423dfd634dbdc9b4ffc66782ca30fe inherit pub_methods_class_combat_queue_command"><td class="memItemLeft" align="right" valign="top">String </td><td class="memItemRight" valign="bottom"><a class="el" href="class_combat_queue_command.html#adb423dfd634dbdc9b4ffc66782ca30fe">getCombatSpam</a> () const </td></tr>
<tr class="separator:adb423dfd634dbdc9b4ffc66782ca30fe inherit pub_methods_class_combat_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a9e019db89d5d353d33cd0d27e7dc04b0 inherit pub_methods_class_combat_queue_command"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="class_combat_queue_command.html#a9e019db89d5d353d33cd0d27e7dc04b0">getPoolsToDamage</a> () const </td></tr>
<tr class="separator:a9e019db89d5d353d33cd0d27e7dc04b0 inherit pub_methods_class_combat_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ab6b54036a10ff20c1bfcf1ed0f5c41f1 inherit pub_methods_class_combat_queue_command"><td class="memItemLeft" align="right" valign="top">VectorMap< uint64, <a class="el" href="class_state_effect.html">StateEffect</a> > * </td><td class="memItemRight" valign="bottom"><a class="el" href="class_combat_queue_command.html#ab6b54036a10ff20c1bfcf1ed0f5c41f1">getStateEffects</a> ()</td></tr>
<tr class="separator:ab6b54036a10ff20c1bfcf1ed0f5c41f1 inherit pub_methods_class_combat_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a8fe4c9d4d1cfe2efe86da0027a65ccfe inherit pub_methods_class_combat_queue_command"><td class="memItemLeft" align="right" valign="top">VectorMap< uint64, <a class="el" href="class_dot_effect.html">DotEffect</a> > * </td><td class="memItemRight" valign="bottom"><a class="el" href="class_combat_queue_command.html#a8fe4c9d4d1cfe2efe86da0027a65ccfe">getDotEffects</a> ()</td></tr>
<tr class="separator:a8fe4c9d4d1cfe2efe86da0027a65ccfe inherit pub_methods_class_combat_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a139d71703b06fdf6bdc807da10a0969e inherit pub_methods_class_combat_queue_command"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_combat_queue_command.html#a139d71703b06fdf6bdc807da10a0969e">setAnimationCRC</a> (uint32 <a class="el" href="class_combat_queue_command.html#abe8137dd3b82e8caee52b84263c90660">animationCRC</a>)</td></tr>
<tr class="separator:a139d71703b06fdf6bdc807da10a0969e inherit pub_methods_class_combat_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:aa13b67fe6f530913d0ea0c0f6ddbe03d inherit pub_methods_class_combat_queue_command"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_combat_queue_command.html#aa13b67fe6f530913d0ea0c0f6ddbe03d">setCombatSpam</a> (String <a class="el" href="class_combat_queue_command.html#a774f066eaafb8019d58b243b4d14688d">combatSpam</a>)</td></tr>
<tr class="separator:aa13b67fe6f530913d0ea0c0f6ddbe03d inherit pub_methods_class_combat_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a3ca36540f218bae77d8a2df95eabc41e inherit pub_methods_class_combat_queue_command"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_combat_queue_command.html#a3ca36540f218bae77d8a2df95eabc41e">setPoolsToDamage</a> (int <a class="el" href="class_combat_queue_command.html#a77355f2bed612a5304644cc0df4bb929">poolsToDamage</a>)</td></tr>
<tr class="separator:a3ca36540f218bae77d8a2df95eabc41e inherit pub_methods_class_combat_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a7dcd5267cd33e17ac6182595ff904eba inherit pub_methods_class_combat_queue_command"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_combat_queue_command.html#a7dcd5267cd33e17ac6182595ff904eba">setStateEffects</a> (VectorMap< uint64, <a class="el" href="class_state_effect.html">StateEffect</a> > <a class="el" href="class_combat_queue_command.html#ab0d1f4c7584c20ffba9dfd47cd230763">stateEffects</a>)</td></tr>
<tr class="separator:a7dcd5267cd33e17ac6182595ff904eba inherit pub_methods_class_combat_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:af63b5030420b48d98a32de247b0f55dc inherit pub_methods_class_combat_queue_command"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_combat_queue_command.html#af63b5030420b48d98a32de247b0f55dc">addStateEffect</a> (<a class="el" href="class_state_effect.html">StateEffect</a> stateEffect)</td></tr>
<tr class="separator:af63b5030420b48d98a32de247b0f55dc inherit pub_methods_class_combat_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a2a5232d2ce31c2a7283ddecc56cba9e0 inherit pub_methods_class_combat_queue_command"><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_state_effect.html">StateEffect</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="class_combat_queue_command.html#a2a5232d2ce31c2a7283ddecc56cba9e0">getStateEffect</a> (uint64 type)</td></tr>
<tr class="separator:a2a5232d2ce31c2a7283ddecc56cba9e0 inherit pub_methods_class_combat_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a76ba9bb782dca9e04028e09ce740979a inherit pub_methods_class_combat_queue_command"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_combat_queue_command.html#a76ba9bb782dca9e04028e09ce740979a">setDotEffects</a> (VectorMap< uint64, <a class="el" href="class_dot_effect.html">DotEffect</a> > <a class="el" href="class_combat_queue_command.html#a4cc595dc8dbb9abf5c77b3b12ea007af">dotEffects</a>)</td></tr>
<tr class="separator:a76ba9bb782dca9e04028e09ce740979a inherit pub_methods_class_combat_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a2ea917d7d865b4548b9ec7595bc89433 inherit pub_methods_class_combat_queue_command"><td class="memItemLeft" align="right" valign="top">float </td><td class="memItemRight" valign="bottom"><a class="el" href="class_combat_queue_command.html#a2ea917d7d865b4548b9ec7595bc89433">getDamage</a> () const </td></tr>
<tr class="separator:a2ea917d7d865b4548b9ec7595bc89433 inherit pub_methods_class_combat_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ade8869123366143c5620446c44d3b7ff inherit pub_methods_class_combat_queue_command"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_combat_queue_command.html#ade8869123366143c5620446c44d3b7ff">setDamage</a> (float dm)</td></tr>
<tr class="separator:ade8869123366143c5620446c44d3b7ff inherit pub_methods_class_combat_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:aff3d5c708f2d342169ad3466391c3910 inherit pub_methods_class_combat_queue_command"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_combat_queue_command.html#aff3d5c708f2d342169ad3466391c3910">addDotEffect</a> (<a class="el" href="class_dot_effect.html">DotEffect</a> dotEffect)</td></tr>
<tr class="separator:aff3d5c708f2d342169ad3466391c3910 inherit pub_methods_class_combat_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a67de6315073b542771051a30e8b28ad4 inherit pub_methods_class_combat_queue_command"><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_dot_effect.html">DotEffect</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="class_combat_queue_command.html#a67de6315073b542771051a30e8b28ad4">getDotEffect</a> (uint64 type)</td></tr>
<tr class="separator:a67de6315073b542771051a30e8b28ad4 inherit pub_methods_class_combat_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:af539aea8b9740a71d90086763e1b2c0d inherit pub_methods_class_combat_queue_command"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_combat_queue_command.html#af539aea8b9740a71d90086763e1b2c0d">setRange</a> (int i)</td></tr>
<tr class="separator:af539aea8b9740a71d90086763e1b2c0d inherit pub_methods_class_combat_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a8c5c0904ce4525d5b1534b4a51e06fdb inherit pub_methods_class_combat_queue_command"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_combat_queue_command.html#a8c5c0904ce4525d5b1534b4a51e06fdb">setAccuracySkillMod</a> (String acc)</td></tr>
<tr class="separator:a8c5c0904ce4525d5b1534b4a51e06fdb inherit pub_methods_class_combat_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a22498e69e3651f0fbbaa37e8e8daab44 inherit pub_methods_class_combat_queue_command"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="class_combat_queue_command.html#a22498e69e3651f0fbbaa37e8e8daab44">hasCombatSpam</a> ()</td></tr>
<tr class="separator:a22498e69e3651f0fbbaa37e8e8daab44 inherit pub_methods_class_combat_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a0e8d189cd1c1290025eeabfcbcb3694f inherit pub_methods_class_combat_queue_command"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="class_combat_queue_command.html#a0e8d189cd1c1290025eeabfcbcb3694f">isCombatCommand</a> ()</td></tr>
<tr class="separator:a0e8d189cd1c1290025eeabfcbcb3694f inherit pub_methods_class_combat_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:aadafbdef80f38eee66ab0d97d4338848 inherit pub_methods_class_combat_queue_command"><td class="memItemLeft" align="right" valign="top">virtual bool </td><td class="memItemRight" valign="bottom"><a class="el" href="class_combat_queue_command.html#aadafbdef80f38eee66ab0d97d4338848">isSquadLeaderCommand</a> ()</td></tr>
<tr class="separator:aadafbdef80f38eee66ab0d97d4338848 inherit pub_methods_class_combat_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a34a08db9d8525d4ee1fd0389db57b0b7 inherit pub_methods_class_combat_queue_command"><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_combat_queue_command.html#a34a08db9d8525d4ee1fd0389db57b0b7">applyEffect</a> (<a class="el" href="classserver_1_1zone_1_1objects_1_1creature_1_1_creature_object.html">CreatureObject</a> *creature, uint8 effectType, uint32 mod)</td></tr>
<tr class="separator:a34a08db9d8525d4ee1fd0389db57b0b7 inherit pub_methods_class_combat_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:afd9e91bfd64d696454714ad772d6ee41 inherit pub_methods_class_combat_queue_command"><td class="memItemLeft" align="right" valign="top">uint8 </td><td class="memItemRight" valign="bottom"><a class="el" href="class_combat_queue_command.html#afd9e91bfd64d696454714ad772d6ee41">getAttackType</a> () const </td></tr>
<tr class="separator:afd9e91bfd64d696454714ad772d6ee41 inherit pub_methods_class_combat_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:abfb9fdc1d857d13dd9a7345c01f8c7a1 inherit pub_methods_class_combat_queue_command"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_combat_queue_command.html#abfb9fdc1d857d13dd9a7345c01f8c7a1">setAttackType</a> (uint8 <a class="el" href="class_combat_queue_command.html#a2a6ca76131e03a59ec15db78afbf2c9b">attackType</a>)</td></tr>
<tr class="separator:abfb9fdc1d857d13dd9a7345c01f8c7a1 inherit pub_methods_class_combat_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a14bece1eae9d2b55280c461ebebd0744 inherit pub_methods_class_combat_queue_command"><td class="memItemLeft" align="right" valign="top">uint8 </td><td class="memItemRight" valign="bottom"><a class="el" href="class_combat_queue_command.html#a14bece1eae9d2b55280c461ebebd0744">getTrails</a> () const </td></tr>
<tr class="separator:a14bece1eae9d2b55280c461ebebd0744 inherit pub_methods_class_combat_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:aadc17bf73732ba01c724be6b24a2049a inherit pub_methods_class_combat_queue_command"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_combat_queue_command.html#aadc17bf73732ba01c724be6b24a2049a">setTrails</a> (uint8 <a class="el" href="class_combat_queue_command.html#a7039e32c1bd23b9a3b5ae06fb0c0002b">trails</a>)</td></tr>
<tr class="separator:aadc17bf73732ba01c724be6b24a2049a inherit pub_methods_class_combat_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="inherit_header pub_methods_classserver_1_1zone_1_1objects_1_1creature_1_1commands_1_1_queue_command"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classserver_1_1zone_1_1objects_1_1creature_1_1commands_1_1_queue_command')"><img src="closed.png" alt="-"/> Public Member Functions inherited from <a class="el" href="classserver_1_1zone_1_1objects_1_1creature_1_1commands_1_1_queue_command.html">server::zone::objects::creature::commands::QueueCommand</a></td></tr>
<tr class="memitem:aee543b3c03c6499283504b04241e46a2 inherit pub_methods_classserver_1_1zone_1_1objects_1_1creature_1_1commands_1_1_queue_command"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classserver_1_1zone_1_1objects_1_1creature_1_1commands_1_1_queue_command.html#aee543b3c03c6499283504b04241e46a2">QueueCommand</a> (const String &skillname, <a class="el" href="classserver_1_1zone_1_1_zone_process_server.html">ZoneProcessServer</a> *serv)</td></tr>
<tr class="separator:aee543b3c03c6499283504b04241e46a2 inherit pub_methods_classserver_1_1zone_1_1objects_1_1creature_1_1commands_1_1_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:aa418bcad148c8c133cf29f4cba994cc1 inherit pub_methods_classserver_1_1zone_1_1objects_1_1creature_1_1commands_1_1_queue_command"><td class="memItemLeft" align="right" valign="top">virtual </td><td class="memItemRight" valign="bottom"><a class="el" href="classserver_1_1zone_1_1objects_1_1creature_1_1commands_1_1_queue_command.html#aa418bcad148c8c133cf29f4cba994cc1">~QueueCommand</a> ()</td></tr>
<tr class="separator:aa418bcad148c8c133cf29f4cba994cc1 inherit pub_methods_classserver_1_1zone_1_1objects_1_1creature_1_1commands_1_1_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a1045fbe728bfd6c600e2e214ebb21406 inherit pub_methods_classserver_1_1zone_1_1objects_1_1creature_1_1commands_1_1_queue_command"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classserver_1_1zone_1_1objects_1_1creature_1_1commands_1_1_queue_command.html#a1045fbe728bfd6c600e2e214ebb21406">checkInvalidLocomotions</a> (<a class="el" href="classserver_1_1zone_1_1objects_1_1creature_1_1_creature_object.html">CreatureObject</a> *creature)</td></tr>
<tr class="separator:a1045fbe728bfd6c600e2e214ebb21406 inherit pub_methods_classserver_1_1zone_1_1objects_1_1creature_1_1commands_1_1_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:aaccbac3683d65967b188a2cb02e27266 inherit pub_methods_classserver_1_1zone_1_1objects_1_1creature_1_1commands_1_1_queue_command"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classserver_1_1zone_1_1objects_1_1creature_1_1commands_1_1_queue_command.html#aaccbac3683d65967b188a2cb02e27266">onStateFail</a> (<a class="el" href="classserver_1_1zone_1_1objects_1_1creature_1_1_creature_object.html">CreatureObject</a> *creature, uint32 actioncntr)</td></tr>
<tr class="separator:aaccbac3683d65967b188a2cb02e27266 inherit pub_methods_classserver_1_1zone_1_1objects_1_1creature_1_1commands_1_1_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a50137363429e07e6916e374e7b09348c inherit pub_methods_classserver_1_1zone_1_1objects_1_1creature_1_1commands_1_1_queue_command"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classserver_1_1zone_1_1objects_1_1creature_1_1commands_1_1_queue_command.html#a50137363429e07e6916e374e7b09348c">onLocomotionFail</a> (<a class="el" href="classserver_1_1zone_1_1objects_1_1creature_1_1_creature_object.html">CreatureObject</a> *creature, uint32 actioncntr)</td></tr>
<tr class="separator:a50137363429e07e6916e374e7b09348c inherit pub_methods_classserver_1_1zone_1_1objects_1_1creature_1_1commands_1_1_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ae0625a0b2ec52ec71fa1aa388bbd3bb1 inherit pub_methods_classserver_1_1zone_1_1objects_1_1creature_1_1commands_1_1_queue_command"><td class="memItemLeft" align="right" valign="top">virtual String </td><td class="memItemRight" valign="bottom"><a class="el" href="classserver_1_1zone_1_1objects_1_1creature_1_1commands_1_1_queue_command.html#ae0625a0b2ec52ec71fa1aa388bbd3bb1">getSyntax</a> () const </td></tr>
<tr class="separator:ae0625a0b2ec52ec71fa1aa388bbd3bb1 inherit pub_methods_classserver_1_1zone_1_1objects_1_1creature_1_1commands_1_1_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ab743f9da4076acd498cac33bd7d0d87f inherit pub_methods_classserver_1_1zone_1_1objects_1_1creature_1_1commands_1_1_queue_command"><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classserver_1_1zone_1_1objects_1_1creature_1_1commands_1_1_queue_command.html#ab743f9da4076acd498cac33bd7d0d87f">onFail</a> (uint32 actioncntr, <a class="el" href="classserver_1_1zone_1_1objects_1_1creature_1_1_creature_object.html">CreatureObject</a> *creature, uint32 errorNumber)</td></tr>
<tr class="separator:ab743f9da4076acd498cac33bd7d0d87f inherit pub_methods_classserver_1_1zone_1_1objects_1_1creature_1_1commands_1_1_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ab46aed30eadb11cc83b5dabbe8c77ebb inherit pub_methods_classserver_1_1zone_1_1objects_1_1creature_1_1commands_1_1_queue_command"><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classserver_1_1zone_1_1objects_1_1creature_1_1commands_1_1_queue_command.html#ab46aed30eadb11cc83b5dabbe8c77ebb">onComplete</a> (uint32 actioncntr, <a class="el" href="classserver_1_1zone_1_1objects_1_1creature_1_1_creature_object.html">CreatureObject</a> *creature, float commandDuration)</td></tr>
<tr class="separator:ab46aed30eadb11cc83b5dabbe8c77ebb inherit pub_methods_classserver_1_1zone_1_1objects_1_1creature_1_1commands_1_1_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a77282bd031eae09182e700ad4e2748ed inherit pub_methods_classserver_1_1zone_1_1objects_1_1creature_1_1commands_1_1_queue_command"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classserver_1_1zone_1_1objects_1_1creature_1_1commands_1_1_queue_command.html#a77282bd031eae09182e700ad4e2748ed">setInvalidLocomotions</a> (const String &lStr)</td></tr>
<tr class="separator:a77282bd031eae09182e700ad4e2748ed inherit pub_methods_classserver_1_1zone_1_1objects_1_1creature_1_1commands_1_1_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:aeba5f30530fcb890302b3bb8029197f6 inherit pub_methods_classserver_1_1zone_1_1objects_1_1creature_1_1commands_1_1_queue_command"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classserver_1_1zone_1_1objects_1_1creature_1_1commands_1_1_queue_command.html#aeba5f30530fcb890302b3bb8029197f6">addInvalidLocomotion</a> (int l)</td></tr>
<tr class="separator:aeba5f30530fcb890302b3bb8029197f6 inherit pub_methods_classserver_1_1zone_1_1objects_1_1creature_1_1commands_1_1_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a4f92f6905053c95feee0a3b18ef0adc1 inherit pub_methods_classserver_1_1zone_1_1objects_1_1creature_1_1commands_1_1_queue_command"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classserver_1_1zone_1_1objects_1_1creature_1_1commands_1_1_queue_command.html#a4f92f6905053c95feee0a3b18ef0adc1">checkStateMask</a> (<a class="el" href="classserver_1_1zone_1_1objects_1_1creature_1_1_creature_object.html">CreatureObject</a> *creature)</td></tr>
<tr class="separator:a4f92f6905053c95feee0a3b18ef0adc1 inherit pub_methods_classserver_1_1zone_1_1objects_1_1creature_1_1commands_1_1_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a38aa3c7e82142f193481c2b87d87e2fd inherit pub_methods_classserver_1_1zone_1_1objects_1_1creature_1_1commands_1_1_queue_command"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classserver_1_1zone_1_1objects_1_1creature_1_1commands_1_1_queue_command.html#a38aa3c7e82142f193481c2b87d87e2fd">setStateMask</a> (uint64 mask)</td></tr>
<tr class="separator:a38aa3c7e82142f193481c2b87d87e2fd inherit pub_methods_classserver_1_1zone_1_1objects_1_1creature_1_1commands_1_1_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:aae1bacdabf0deed3e8602f1c9a16f3ca inherit pub_methods_classserver_1_1zone_1_1objects_1_1creature_1_1commands_1_1_queue_command"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classserver_1_1zone_1_1objects_1_1creature_1_1commands_1_1_queue_command.html#aae1bacdabf0deed3e8602f1c9a16f3ca">setDefaultTime</a> (float time)</td></tr>
<tr class="separator:aae1bacdabf0deed3e8602f1c9a16f3ca inherit pub_methods_classserver_1_1zone_1_1objects_1_1creature_1_1commands_1_1_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a1e4d815d23394279258da799d7d82233 inherit pub_methods_classserver_1_1zone_1_1objects_1_1creature_1_1commands_1_1_queue_command"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classserver_1_1zone_1_1objects_1_1creature_1_1commands_1_1_queue_command.html#a1e4d815d23394279258da799d7d82233">setTargetType</a> (int num)</td></tr>
<tr class="separator:a1e4d815d23394279258da799d7d82233 inherit pub_methods_classserver_1_1zone_1_1objects_1_1creature_1_1commands_1_1_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ab2da68a4cd081031f996b97384bdefe0 inherit pub_methods_classserver_1_1zone_1_1objects_1_1creature_1_1commands_1_1_queue_command"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classserver_1_1zone_1_1objects_1_1creature_1_1commands_1_1_queue_command.html#ab2da68a4cd081031f996b97384bdefe0">setDisabled</a> (bool state)</td></tr>
<tr class="separator:ab2da68a4cd081031f996b97384bdefe0 inherit pub_methods_classserver_1_1zone_1_1objects_1_1creature_1_1commands_1_1_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:aefbacbb8e4e61020f774828c66246f88 inherit pub_methods_classserver_1_1zone_1_1objects_1_1creature_1_1commands_1_1_queue_command"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classserver_1_1zone_1_1objects_1_1creature_1_1commands_1_1_queue_command.html#aefbacbb8e4e61020f774828c66246f88">setDisabled</a> (int state)</td></tr>
<tr class="separator:aefbacbb8e4e61020f774828c66246f88 inherit pub_methods_classserver_1_1zone_1_1objects_1_1creature_1_1commands_1_1_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a94435de52a05b3b5d519c9c2f6764a89 inherit pub_methods_classserver_1_1zone_1_1objects_1_1creature_1_1commands_1_1_queue_command"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classserver_1_1zone_1_1objects_1_1creature_1_1commands_1_1_queue_command.html#a94435de52a05b3b5d519c9c2f6764a89">setAddToCombatQueue</a> (bool state)</td></tr>
<tr class="separator:a94435de52a05b3b5d519c9c2f6764a89 inherit pub_methods_classserver_1_1zone_1_1objects_1_1creature_1_1commands_1_1_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a538e5409f7f033b670e844f5c11503aa inherit pub_methods_classserver_1_1zone_1_1objects_1_1creature_1_1commands_1_1_queue_command"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classserver_1_1zone_1_1objects_1_1creature_1_1commands_1_1_queue_command.html#a538e5409f7f033b670e844f5c11503aa">setAddToCombatQueue</a> (int state)</td></tr>
<tr class="separator:a538e5409f7f033b670e844f5c11503aa inherit pub_methods_classserver_1_1zone_1_1objects_1_1creature_1_1commands_1_1_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a16c82a11bd6db08f30adb40799ce46ff inherit pub_methods_classserver_1_1zone_1_1objects_1_1creature_1_1commands_1_1_queue_command"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classserver_1_1zone_1_1objects_1_1creature_1_1commands_1_1_queue_command.html#a16c82a11bd6db08f30adb40799ce46ff">setCommandGroup</a> (int val)</td></tr>
<tr class="separator:a16c82a11bd6db08f30adb40799ce46ff inherit pub_methods_classserver_1_1zone_1_1objects_1_1creature_1_1commands_1_1_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a405e02cfa947f370c3b7f31601e0d1b1 inherit pub_methods_classserver_1_1zone_1_1objects_1_1creature_1_1commands_1_1_queue_command"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classserver_1_1zone_1_1objects_1_1creature_1_1commands_1_1_queue_command.html#a405e02cfa947f370c3b7f31601e0d1b1">setMaxRange</a> (float r)</td></tr>
<tr class="separator:a405e02cfa947f370c3b7f31601e0d1b1 inherit pub_methods_classserver_1_1zone_1_1objects_1_1creature_1_1commands_1_1_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ac7e00b0996c74ef9d533cca4e14d3406 inherit pub_methods_classserver_1_1zone_1_1objects_1_1creature_1_1commands_1_1_queue_command"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classserver_1_1zone_1_1objects_1_1creature_1_1commands_1_1_queue_command.html#ac7e00b0996c74ef9d533cca4e14d3406">setCharacterAbility</a> (const String &ability)</td></tr>
<tr class="separator:ac7e00b0996c74ef9d533cca4e14d3406 inherit pub_methods_classserver_1_1zone_1_1objects_1_1creature_1_1commands_1_1_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a970ef46896ca1c95dfd9fbc0f4e66430 inherit pub_methods_classserver_1_1zone_1_1objects_1_1creature_1_1commands_1_1_queue_command"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classserver_1_1zone_1_1objects_1_1creature_1_1commands_1_1_queue_command.html#a970ef46896ca1c95dfd9fbc0f4e66430">setDefaultPriority</a> (const String &priority)</td></tr>
<tr class="separator:a970ef46896ca1c95dfd9fbc0f4e66430 inherit pub_methods_classserver_1_1zone_1_1objects_1_1creature_1_1commands_1_1_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a39c088fb8808327a68b835178386ee37 inherit pub_methods_classserver_1_1zone_1_1objects_1_1creature_1_1commands_1_1_queue_command"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classserver_1_1zone_1_1objects_1_1creature_1_1commands_1_1_queue_command.html#a39c088fb8808327a68b835178386ee37">setDefaultPriority</a> (const int priority)</td></tr>
<tr class="separator:a39c088fb8808327a68b835178386ee37 inherit pub_methods_classserver_1_1zone_1_1objects_1_1creature_1_1commands_1_1_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ad13200cc9d86c468a117e7aab06484b2 inherit pub_methods_classserver_1_1zone_1_1objects_1_1creature_1_1commands_1_1_queue_command"><td class="memItemLeft" align="right" valign="top">uint64 </td><td class="memItemRight" valign="bottom"><a class="el" href="classserver_1_1zone_1_1objects_1_1creature_1_1commands_1_1_queue_command.html#ad13200cc9d86c468a117e7aab06484b2">getStateMask</a> ()</td></tr>
<tr class="separator:ad13200cc9d86c468a117e7aab06484b2 inherit pub_methods_classserver_1_1zone_1_1objects_1_1creature_1_1commands_1_1_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a04074ecdb676b92738efdbd908b9c8a8 inherit pub_methods_classserver_1_1zone_1_1objects_1_1creature_1_1commands_1_1_queue_command"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classserver_1_1zone_1_1objects_1_1creature_1_1commands_1_1_queue_command.html#a04074ecdb676b92738efdbd908b9c8a8">requiresAdmin</a> ()</td></tr>
<tr class="separator:a04074ecdb676b92738efdbd908b9c8a8 inherit pub_methods_classserver_1_1zone_1_1objects_1_1creature_1_1commands_1_1_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ade1ed7f353e7d2fc2df98eea29e0c3e3 inherit pub_methods_classserver_1_1zone_1_1objects_1_1creature_1_1commands_1_1_queue_command"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="classserver_1_1zone_1_1objects_1_1creature_1_1commands_1_1_queue_command.html#ade1ed7f353e7d2fc2df98eea29e0c3e3">getTargetType</a> ()</td></tr>
<tr class="separator:ade1ed7f353e7d2fc2df98eea29e0c3e3 inherit pub_methods_classserver_1_1zone_1_1objects_1_1creature_1_1commands_1_1_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:afbd63086121372382472a0e9d3c47f8a inherit pub_methods_classserver_1_1zone_1_1objects_1_1creature_1_1commands_1_1_queue_command"><td class="memItemLeft" align="right" valign="top">uint32 </td><td class="memItemRight" valign="bottom"><a class="el" href="classserver_1_1zone_1_1objects_1_1creature_1_1commands_1_1_queue_command.html#afbd63086121372382472a0e9d3c47f8a">getNameCRC</a> ()</td></tr>
<tr class="separator:afbd63086121372382472a0e9d3c47f8a inherit pub_methods_classserver_1_1zone_1_1objects_1_1creature_1_1commands_1_1_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:af3daeb2405e33fe3f260f868de072ed8 inherit pub_methods_classserver_1_1zone_1_1objects_1_1creature_1_1commands_1_1_queue_command"><td class="memItemLeft" align="right" valign="top">float </td><td class="memItemRight" valign="bottom"><a class="el" href="classserver_1_1zone_1_1objects_1_1creature_1_1commands_1_1_queue_command.html#af3daeb2405e33fe3f260f868de072ed8">getMaxRange</a> ()</td></tr>
<tr class="separator:af3daeb2405e33fe3f260f868de072ed8 inherit pub_methods_classserver_1_1zone_1_1objects_1_1creature_1_1commands_1_1_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:aed9455620c42f01ecffefac95f4c29a4 inherit pub_methods_classserver_1_1zone_1_1objects_1_1creature_1_1commands_1_1_queue_command"><td class="memItemLeft" align="right" valign="top">String & </td><td class="memItemRight" valign="bottom"><a class="el" href="classserver_1_1zone_1_1objects_1_1creature_1_1commands_1_1_queue_command.html#aed9455620c42f01ecffefac95f4c29a4">getQueueCommandName</a> ()</td></tr>
<tr class="separator:aed9455620c42f01ecffefac95f4c29a4 inherit pub_methods_classserver_1_1zone_1_1objects_1_1creature_1_1commands_1_1_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ac9fb813e49fdd81f0f8cf83f577184f1 inherit pub_methods_classserver_1_1zone_1_1objects_1_1creature_1_1commands_1_1_queue_command"><td class="memItemLeft" align="right" valign="top">String & </td><td class="memItemRight" valign="bottom"><a class="el" href="classserver_1_1zone_1_1objects_1_1creature_1_1commands_1_1_queue_command.html#ac9fb813e49fdd81f0f8cf83f577184f1">getCharacterAbility</a> ()</td></tr>
<tr class="separator:ac9fb813e49fdd81f0f8cf83f577184f1 inherit pub_methods_classserver_1_1zone_1_1objects_1_1creature_1_1commands_1_1_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ad3fce071e9617b34a0b30d7a0a240f1c inherit pub_methods_classserver_1_1zone_1_1objects_1_1creature_1_1commands_1_1_queue_command"><td class="memItemLeft" align="right" valign="top">float </td><td class="memItemRight" valign="bottom"><a class="el" href="classserver_1_1zone_1_1objects_1_1creature_1_1commands_1_1_queue_command.html#ad3fce071e9617b34a0b30d7a0a240f1c">getDefaultTime</a> ()</td></tr>
<tr class="separator:ad3fce071e9617b34a0b30d7a0a240f1c inherit pub_methods_classserver_1_1zone_1_1objects_1_1creature_1_1commands_1_1_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a957c26acde17ed68557a9e29c2dcede7 inherit pub_methods_classserver_1_1zone_1_1objects_1_1creature_1_1commands_1_1_queue_command"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="classserver_1_1zone_1_1objects_1_1creature_1_1commands_1_1_queue_command.html#a957c26acde17ed68557a9e29c2dcede7">getDefaultPriority</a> ()</td></tr>
<tr class="separator:a957c26acde17ed68557a9e29c2dcede7 inherit pub_methods_classserver_1_1zone_1_1objects_1_1creature_1_1commands_1_1_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a86676d71f0c5d03c14017269e5de78eb inherit pub_methods_classserver_1_1zone_1_1objects_1_1creature_1_1commands_1_1_queue_command"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classserver_1_1zone_1_1objects_1_1creature_1_1commands_1_1_queue_command.html#a86676d71f0c5d03c14017269e5de78eb">isDisabled</a> ()</td></tr>
<tr class="separator:a86676d71f0c5d03c14017269e5de78eb inherit pub_methods_classserver_1_1zone_1_1objects_1_1creature_1_1commands_1_1_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a87de733e49a13e2c859a1849db15cf67 inherit pub_methods_classserver_1_1zone_1_1objects_1_1creature_1_1commands_1_1_queue_command"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classserver_1_1zone_1_1objects_1_1creature_1_1commands_1_1_queue_command.html#a87de733e49a13e2c859a1849db15cf67">addToCombatQueue</a> ()</td></tr>
<tr class="separator:a87de733e49a13e2c859a1849db15cf67 inherit pub_methods_classserver_1_1zone_1_1objects_1_1creature_1_1commands_1_1_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a1a1b2e9c04459e9597469a5ba58a4ab7 inherit pub_methods_classserver_1_1zone_1_1objects_1_1creature_1_1commands_1_1_queue_command"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="classserver_1_1zone_1_1objects_1_1creature_1_1commands_1_1_queue_command.html#a1a1b2e9c04459e9597469a5ba58a4ab7">getSkillModSize</a> ()</td></tr>
<tr class="separator:a1a1b2e9c04459e9597469a5ba58a4ab7 inherit pub_methods_classserver_1_1zone_1_1objects_1_1creature_1_1commands_1_1_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ae542b5f30c92a074f2796c24dfa46a86 inherit pub_methods_classserver_1_1zone_1_1objects_1_1creature_1_1commands_1_1_queue_command"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="classserver_1_1zone_1_1objects_1_1creature_1_1commands_1_1_queue_command.html#ae542b5f30c92a074f2796c24dfa46a86">getSkillMod</a> (int index, String &skillMod)</td></tr>
<tr class="separator:ae542b5f30c92a074f2796c24dfa46a86 inherit pub_methods_classserver_1_1zone_1_1objects_1_1creature_1_1commands_1_1_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:abf81d98b541e7c08374f968aaad9cde3 inherit pub_methods_classserver_1_1zone_1_1objects_1_1creature_1_1commands_1_1_queue_command"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="classserver_1_1zone_1_1objects_1_1creature_1_1commands_1_1_queue_command.html#abf81d98b541e7c08374f968aaad9cde3">getCommandGroup</a> ()</td></tr>
<tr class="separator:abf81d98b541e7c08374f968aaad9cde3 inherit pub_methods_classserver_1_1zone_1_1objects_1_1creature_1_1commands_1_1_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a0ab37b0c86817d413a421d7a0304f338 inherit pub_methods_classserver_1_1zone_1_1objects_1_1creature_1_1commands_1_1_queue_command"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classserver_1_1zone_1_1objects_1_1creature_1_1commands_1_1_queue_command.html#a0ab37b0c86817d413a421d7a0304f338">addSkillMod</a> (const String &skillMod, const int value)</td></tr>
<tr class="separator:a0ab37b0c86817d413a421d7a0304f338 inherit pub_methods_classserver_1_1zone_1_1objects_1_1creature_1_1commands_1_1_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a36e282da7a7fc6e0e46376e29ccd240d inherit pub_methods_classserver_1_1zone_1_1objects_1_1creature_1_1commands_1_1_queue_command"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classserver_1_1zone_1_1objects_1_1creature_1_1commands_1_1_queue_command.html#a36e282da7a7fc6e0e46376e29ccd240d">isWearingArmor</a> (<a class="el" href="classserver_1_1zone_1_1objects_1_1creature_1_1_creature_object.html">CreatureObject</a> *creo)</td></tr>
<tr class="separator:a36e282da7a7fc6e0e46376e29ccd240d inherit pub_methods_classserver_1_1zone_1_1objects_1_1creature_1_1commands_1_1_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:acc4eccd9e29e787e37a529f2f53b779c inherit pub_methods_classserver_1_1zone_1_1objects_1_1creature_1_1commands_1_1_queue_command"><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classserver_1_1zone_1_1objects_1_1creature_1_1commands_1_1_queue_command.html#acc4eccd9e29e787e37a529f2f53b779c">handleBuff</a> (<a class="el" href="classserver_1_1zone_1_1objects_1_1scene_1_1_scene_object.html">SceneObject</a> *creature, ManagedObject *object, int64 param)</td></tr>
<tr class="separator:acc4eccd9e29e787e37a529f2f53b779c inherit pub_methods_classserver_1_1zone_1_1objects_1_1creature_1_1commands_1_1_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="inherited"></a>
Additional Inherited Members</h2></td></tr>
<tr class="inherit_header pub_static_attribs_classserver_1_1zone_1_1objects_1_1creature_1_1commands_1_1_queue_command"><td colspan="2" onclick="javascript:toggleInherit('pub_static_attribs_classserver_1_1zone_1_1objects_1_1creature_1_1commands_1_1_queue_command')"><img src="closed.png" alt="-"/> Static Public Attributes inherited from <a class="el" href="classserver_1_1zone_1_1objects_1_1creature_1_1commands_1_1_queue_command.html">server::zone::objects::creature::commands::QueueCommand</a></td></tr>
<tr class="memitem:a4ccdfb3dc7dffe69e4160ca2544af916 inherit pub_static_attribs_classserver_1_1zone_1_1objects_1_1creature_1_1commands_1_1_queue_command"><td class="memItemLeft" align="right" valign="top">static const int </td><td class="memItemRight" valign="bottom"><a class="el" href="classserver_1_1zone_1_1objects_1_1creature_1_1commands_1_1_queue_command.html#a4ccdfb3dc7dffe69e4160ca2544af916">IMMEDIATE</a> = 0</td></tr>
<tr class="separator:a4ccdfb3dc7dffe69e4160ca2544af916 inherit pub_static_attribs_classserver_1_1zone_1_1objects_1_1creature_1_1commands_1_1_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ac6bcbc2c480605f1d41ebeb7b054946a inherit pub_static_attribs_classserver_1_1zone_1_1objects_1_1creature_1_1commands_1_1_queue_command"><td class="memItemLeft" align="right" valign="top">static const int </td><td class="memItemRight" valign="bottom"><a class="el" href="classserver_1_1zone_1_1objects_1_1creature_1_1commands_1_1_queue_command.html#ac6bcbc2c480605f1d41ebeb7b054946a">FRONT</a> = 1</td></tr>
<tr class="separator:ac6bcbc2c480605f1d41ebeb7b054946a inherit pub_static_attribs_classserver_1_1zone_1_1objects_1_1creature_1_1commands_1_1_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:af62d1c3e32b5ced7ac93eedfa35843cf inherit pub_static_attribs_classserver_1_1zone_1_1objects_1_1creature_1_1commands_1_1_queue_command"><td class="memItemLeft" align="right" valign="top">static const int </td><td class="memItemRight" valign="bottom"><a class="el" href="classserver_1_1zone_1_1objects_1_1creature_1_1commands_1_1_queue_command.html#af62d1c3e32b5ced7ac93eedfa35843cf">NORMAL</a> = 2</td></tr>
<tr class="separator:af62d1c3e32b5ced7ac93eedfa35843cf inherit pub_static_attribs_classserver_1_1zone_1_1objects_1_1creature_1_1commands_1_1_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:afd765e7bc64680a59d6628ba9151c83c inherit pub_static_attribs_classserver_1_1zone_1_1objects_1_1creature_1_1commands_1_1_queue_command"><td class="memItemLeft" align="right" valign="top">static const int </td><td class="memItemRight" valign="bottom"><a class="el" href="classserver_1_1zone_1_1objects_1_1creature_1_1commands_1_1_queue_command.html#afd765e7bc64680a59d6628ba9151c83c">SUCCESS</a> = 0</td></tr>
<tr class="separator:afd765e7bc64680a59d6628ba9151c83c inherit pub_static_attribs_classserver_1_1zone_1_1objects_1_1creature_1_1commands_1_1_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a8434ab9cdcb60a0e0c3b79d99ea8c9f3 inherit pub_static_attribs_classserver_1_1zone_1_1objects_1_1creature_1_1commands_1_1_queue_command"><td class="memItemLeft" align="right" valign="top">static const int </td><td class="memItemRight" valign="bottom"><a class="el" href="classserver_1_1zone_1_1objects_1_1creature_1_1commands_1_1_queue_command.html#a8434ab9cdcb60a0e0c3b79d99ea8c9f3">GENERALERROR</a> = 1</td></tr>
<tr class="separator:a8434ab9cdcb60a0e0c3b79d99ea8c9f3 inherit pub_static_attribs_classserver_1_1zone_1_1objects_1_1creature_1_1commands_1_1_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a5349733d0c0ec84bd0d2bf654f81c72f inherit pub_static_attribs_classserver_1_1zone_1_1objects_1_1creature_1_1commands_1_1_queue_command"><td class="memItemLeft" align="right" valign="top">static const int </td><td class="memItemRight" valign="bottom"><a class="el" href="classserver_1_1zone_1_1objects_1_1creature_1_1commands_1_1_queue_command.html#a5349733d0c0ec84bd0d2bf654f81c72f">INVALIDLOCOMOTION</a> = 2</td></tr>
<tr class="separator:a5349733d0c0ec84bd0d2bf654f81c72f inherit pub_static_attribs_classserver_1_1zone_1_1objects_1_1creature_1_1commands_1_1_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a7c214ae0c5729e3edc6554121ccb0f61 inherit pub_static_attribs_classserver_1_1zone_1_1objects_1_1creature_1_1commands_1_1_queue_command"><td class="memItemLeft" align="right" valign="top">static const int </td><td class="memItemRight" valign="bottom"><a class="el" href="classserver_1_1zone_1_1objects_1_1creature_1_1commands_1_1_queue_command.html#a7c214ae0c5729e3edc6554121ccb0f61">INVALIDSTATE</a> = 3</td></tr>
<tr class="separator:a7c214ae0c5729e3edc6554121ccb0f61 inherit pub_static_attribs_classserver_1_1zone_1_1objects_1_1creature_1_1commands_1_1_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a1cb8815a7624dd8bd181950d7a748bf1 inherit pub_static_attribs_classserver_1_1zone_1_1objects_1_1creature_1_1commands_1_1_queue_command"><td class="memItemLeft" align="right" valign="top">static const int </td><td class="memItemRight" valign="bottom"><a class="el" href="classserver_1_1zone_1_1objects_1_1creature_1_1commands_1_1_queue_command.html#a1cb8815a7624dd8bd181950d7a748bf1">INVALIDTARGET</a> = 4</td></tr>
<tr class="separator:a1cb8815a7624dd8bd181950d7a748bf1 inherit pub_static_attribs_classserver_1_1zone_1_1objects_1_1creature_1_1commands_1_1_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:afc459f7595d765766944b16a13966ab3 inherit pub_static_attribs_classserver_1_1zone_1_1objects_1_1creature_1_1commands_1_1_queue_command"><td class="memItemLeft" align="right" valign="top">static const int </td><td class="memItemRight" valign="bottom"><a class="el" href="classserver_1_1zone_1_1objects_1_1creature_1_1commands_1_1_queue_command.html#afc459f7595d765766944b16a13966ab3">INVALIDWEAPON</a> = 5</td></tr>
<tr class="separator:afc459f7595d765766944b16a13966ab3 inherit pub_static_attribs_classserver_1_1zone_1_1objects_1_1creature_1_1commands_1_1_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ae0519be3ffdbfcc7c876d1429dffe511 inherit pub_static_attribs_classserver_1_1zone_1_1objects_1_1creature_1_1commands_1_1_queue_command"><td class="memItemLeft" align="right" valign="top">static const int </td><td class="memItemRight" valign="bottom"><a class="el" href="classserver_1_1zone_1_1objects_1_1creature_1_1commands_1_1_queue_command.html#ae0519be3ffdbfcc7c876d1429dffe511">TOOFAR</a> = 6</td></tr>
<tr class="separator:ae0519be3ffdbfcc7c876d1429dffe511 inherit pub_static_attribs_classserver_1_1zone_1_1objects_1_1creature_1_1commands_1_1_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a9d22318a492ca394a7c062505838377f inherit pub_static_attribs_classserver_1_1zone_1_1objects_1_1creature_1_1commands_1_1_queue_command"><td class="memItemLeft" align="right" valign="top">static const int </td><td class="memItemRight" valign="bottom"><a class="el" href="classserver_1_1zone_1_1objects_1_1creature_1_1commands_1_1_queue_command.html#a9d22318a492ca394a7c062505838377f">INSUFFICIENTHAM</a> = 7</td></tr>
<tr class="separator:a9d22318a492ca394a7c062505838377f inherit pub_static_attribs_classserver_1_1zone_1_1objects_1_1creature_1_1commands_1_1_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a0a4a84c90d5a9c3a80d52386c8d0c46d inherit pub_static_attribs_classserver_1_1zone_1_1objects_1_1creature_1_1commands_1_1_queue_command"><td class="memItemLeft" align="right" valign="top">static const int </td><td class="memItemRight" valign="bottom"><a class="el" href="classserver_1_1zone_1_1objects_1_1creature_1_1commands_1_1_queue_command.html#a0a4a84c90d5a9c3a80d52386c8d0c46d">INVALIDPARAMETERS</a> = 8</td></tr>
<tr class="separator:a0a4a84c90d5a9c3a80d52386c8d0c46d inherit pub_static_attribs_classserver_1_1zone_1_1objects_1_1creature_1_1commands_1_1_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a78116a3e3454208ad791c5847dd88145 inherit pub_static_attribs_classserver_1_1zone_1_1objects_1_1creature_1_1commands_1_1_queue_command"><td class="memItemLeft" align="right" valign="top">static const int </td><td class="memItemRight" valign="bottom"><a class="el" href="classserver_1_1zone_1_1objects_1_1creature_1_1commands_1_1_queue_command.html#a78116a3e3454208ad791c5847dd88145">NOPRONE</a> = 9</td></tr>
<tr class="separator:a78116a3e3454208ad791c5847dd88145 inherit pub_static_attribs_classserver_1_1zone_1_1objects_1_1creature_1_1commands_1_1_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a61cf7f5c522494a6bd50328efd57ee1a inherit pub_static_attribs_classserver_1_1zone_1_1objects_1_1creature_1_1commands_1_1_queue_command"><td class="memItemLeft" align="right" valign="top">static const int </td><td class="memItemRight" valign="bottom"><a class="el" href="classserver_1_1zone_1_1objects_1_1creature_1_1commands_1_1_queue_command.html#a61cf7f5c522494a6bd50328efd57ee1a">NOKNEELING</a> = 10</td></tr>
<tr class="separator:a61cf7f5c522494a6bd50328efd57ee1a inherit pub_static_attribs_classserver_1_1zone_1_1objects_1_1creature_1_1commands_1_1_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:aec92ef3c13daec29232fd1f14f5df89b inherit pub_static_attribs_classserver_1_1zone_1_1objects_1_1creature_1_1commands_1_1_queue_command"><td class="memItemLeft" align="right" valign="top">static const int </td><td class="memItemRight" valign="bottom"><a class="el" href="classserver_1_1zone_1_1objects_1_1creature_1_1commands_1_1_queue_command.html#aec92ef3c13daec29232fd1f14f5df89b">INSUFFICIENTPERMISSION</a> = 11</td></tr>
<tr class="separator:aec92ef3c13daec29232fd1f14f5df89b inherit pub_static_attribs_classserver_1_1zone_1_1objects_1_1creature_1_1commands_1_1_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a870493a775b4dd5c77db7364feba8238 inherit pub_static_attribs_classserver_1_1zone_1_1objects_1_1creature_1_1commands_1_1_queue_command"><td class="memItemLeft" align="right" valign="top">static const int </td><td class="memItemRight" valign="bottom"><a class="el" href="classserver_1_1zone_1_1objects_1_1creature_1_1commands_1_1_queue_command.html#a870493a775b4dd5c77db7364feba8238">NOJEDIARMOR</a> = 12</td></tr>
<tr class="separator:a870493a775b4dd5c77db7364feba8238 inherit pub_static_attribs_classserver_1_1zone_1_1objects_1_1creature_1_1commands_1_1_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a46ec04d345ff426cde0bdb8dd63397a6 inherit pub_static_attribs_classserver_1_1zone_1_1objects_1_1creature_1_1commands_1_1_queue_command"><td class="memItemLeft" align="right" valign="top">static const int </td><td class="memItemRight" valign="bottom"><a class="el" href="classserver_1_1zone_1_1objects_1_1creature_1_1commands_1_1_queue_command.html#a46ec04d345ff426cde0bdb8dd63397a6">INVALIDSYNTAX</a> = 13</td></tr>
<tr class="separator:a46ec04d345ff426cde0bdb8dd63397a6 inherit pub_static_attribs_classserver_1_1zone_1_1objects_1_1creature_1_1commands_1_1_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="inherit_header pro_attribs_class_combat_queue_command"><td colspan="2" onclick="javascript:toggleInherit('pro_attribs_class_combat_queue_command')"><img src="closed.png" alt="-"/> Protected Attributes inherited from <a class="el" href="class_combat_queue_command.html">CombatQueueCommand</a></td></tr>
<tr class="memitem:adb86ea0dba0fd52e289fc90b4bcf5471 inherit pro_attribs_class_combat_queue_command"><td class="memItemLeft" align="right" valign="top">float </td><td class="memItemRight" valign="bottom"><a class="el" href="class_combat_queue_command.html#adb86ea0dba0fd52e289fc90b4bcf5471">damage</a></td></tr>
<tr class="separator:adb86ea0dba0fd52e289fc90b4bcf5471 inherit pro_attribs_class_combat_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a0185bde574f3f7b47e54957a706c7c59 inherit pro_attribs_class_combat_queue_command"><td class="memItemLeft" align="right" valign="top">float </td><td class="memItemRight" valign="bottom"><a class="el" href="class_combat_queue_command.html#a0185bde574f3f7b47e54957a706c7c59">damageMultiplier</a></td></tr>
<tr class="separator:a0185bde574f3f7b47e54957a706c7c59 inherit pro_attribs_class_combat_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a250b9f30d705ff9db8763145cd3c64c1 inherit pro_attribs_class_combat_queue_command"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="class_combat_queue_command.html#a250b9f30d705ff9db8763145cd3c64c1">accuracyBonus</a></td></tr>
<tr class="separator:a250b9f30d705ff9db8763145cd3c64c1 inherit pro_attribs_class_combat_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a47a1f6e40b1a3d091ea05e790c668ec0 inherit pro_attribs_class_combat_queue_command"><td class="memItemLeft" align="right" valign="top">float </td><td class="memItemRight" valign="bottom"><a class="el" href="class_combat_queue_command.html#a47a1f6e40b1a3d091ea05e790c668ec0">speedMultiplier</a></td></tr>
<tr class="separator:a47a1f6e40b1a3d091ea05e790c668ec0 inherit pro_attribs_class_combat_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a10ecb71b0ff0420c132f2d0ac18e1bbd inherit pro_attribs_class_combat_queue_command"><td class="memItemLeft" align="right" valign="top">float </td><td class="memItemRight" valign="bottom"><a class="el" href="class_combat_queue_command.html#a10ecb71b0ff0420c132f2d0ac18e1bbd">speed</a></td></tr>
<tr class="separator:a10ecb71b0ff0420c132f2d0ac18e1bbd inherit pro_attribs_class_combat_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a77355f2bed612a5304644cc0df4bb929 inherit pro_attribs_class_combat_queue_command"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="class_combat_queue_command.html#a77355f2bed612a5304644cc0df4bb929">poolsToDamage</a></td></tr>
<tr class="separator:a77355f2bed612a5304644cc0df4bb929 inherit pro_attribs_class_combat_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a34c0a077c8c3ae64ec23d0c7abad781d inherit pro_attribs_class_combat_queue_command"><td class="memItemLeft" align="right" valign="top">float </td><td class="memItemRight" valign="bottom"><a class="el" href="class_combat_queue_command.html#a34c0a077c8c3ae64ec23d0c7abad781d">healthCostMultiplier</a></td></tr>
<tr class="separator:a34c0a077c8c3ae64ec23d0c7abad781d inherit pro_attribs_class_combat_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:aebfcf5f8f1ea9d882f7a7a87907ec4ba inherit pro_attribs_class_combat_queue_command"><td class="memItemLeft" align="right" valign="top">float </td><td class="memItemRight" valign="bottom"><a class="el" href="class_combat_queue_command.html#aebfcf5f8f1ea9d882f7a7a87907ec4ba">actionCostMultiplier</a></td></tr>
<tr class="separator:aebfcf5f8f1ea9d882f7a7a87907ec4ba inherit pro_attribs_class_combat_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:aedc5f15c4138de629d15e54df52f9788 inherit pro_attribs_class_combat_queue_command"><td class="memItemLeft" align="right" valign="top">float </td><td class="memItemRight" valign="bottom"><a class="el" href="class_combat_queue_command.html#aedc5f15c4138de629d15e54df52f9788">mindCostMultiplier</a></td></tr>
<tr class="separator:aedc5f15c4138de629d15e54df52f9788 inherit pro_attribs_class_combat_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a62f22e1698a233b4a55cb3b93b2b7920 inherit pro_attribs_class_combat_queue_command"><td class="memItemLeft" align="right" valign="top">float </td><td class="memItemRight" valign="bottom"><a class="el" href="class_combat_queue_command.html#a62f22e1698a233b4a55cb3b93b2b7920">forceCostMultiplier</a></td></tr>
<tr class="separator:a62f22e1698a233b4a55cb3b93b2b7920 inherit pro_attribs_class_combat_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a6f5bcbba6c1e3605ffd54c57297dd418 inherit pro_attribs_class_combat_queue_command"><td class="memItemLeft" align="right" valign="top">float </td><td class="memItemRight" valign="bottom"><a class="el" href="class_combat_queue_command.html#a6f5bcbba6c1e3605ffd54c57297dd418">forceCost</a></td></tr>
<tr class="separator:a6f5bcbba6c1e3605ffd54c57297dd418 inherit pro_attribs_class_combat_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a7a3d3d3f2cbc8284b46cf02d57804516 inherit pro_attribs_class_combat_queue_command"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="class_combat_queue_command.html#a7a3d3d3f2cbc8284b46cf02d57804516">knockdownStateChance</a></td></tr>
<tr class="separator:a7a3d3d3f2cbc8284b46cf02d57804516 inherit pro_attribs_class_combat_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a455a3511812b55e431af38ad4d746309 inherit pro_attribs_class_combat_queue_command"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="class_combat_queue_command.html#a455a3511812b55e431af38ad4d746309">postureDownStateChance</a></td></tr>
<tr class="separator:a455a3511812b55e431af38ad4d746309 inherit pro_attribs_class_combat_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a82e12701eaf97c3aecb75dfd727f3d00 inherit pro_attribs_class_combat_queue_command"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="class_combat_queue_command.html#a82e12701eaf97c3aecb75dfd727f3d00">postureUpStateChance</a></td></tr>
<tr class="separator:a82e12701eaf97c3aecb75dfd727f3d00 inherit pro_attribs_class_combat_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a4ec4557da87f7f2f2c89635c0b4b2441 inherit pro_attribs_class_combat_queue_command"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="class_combat_queue_command.html#a4ec4557da87f7f2f2c89635c0b4b2441">dizzyStateChance</a></td></tr>
<tr class="separator:a4ec4557da87f7f2f2c89635c0b4b2441 inherit pro_attribs_class_combat_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a0a634d994fe3d1b8436a0e11cc9c0ab1 inherit pro_attribs_class_combat_queue_command"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="class_combat_queue_command.html#a0a634d994fe3d1b8436a0e11cc9c0ab1">blindStateChance</a></td></tr>
<tr class="separator:a0a634d994fe3d1b8436a0e11cc9c0ab1 inherit pro_attribs_class_combat_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ab509b0514e0acbba882abf8bab329b78 inherit pro_attribs_class_combat_queue_command"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="class_combat_queue_command.html#ab509b0514e0acbba882abf8bab329b78">stunStateChance</a></td></tr>
<tr class="separator:ab509b0514e0acbba882abf8bab329b78 inherit pro_attribs_class_combat_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a0cc9682be2f14d1386fcaaa5c892d5f9 inherit pro_attribs_class_combat_queue_command"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="class_combat_queue_command.html#a0cc9682be2f14d1386fcaaa5c892d5f9">intimidateStateChance</a></td></tr>
<tr class="separator:a0cc9682be2f14d1386fcaaa5c892d5f9 inherit pro_attribs_class_combat_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:afa16ecc0a418b89d99450e49736fb7b3 inherit pro_attribs_class_combat_queue_command"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="class_combat_queue_command.html#afa16ecc0a418b89d99450e49736fb7b3">nextAttackDelayChance</a></td></tr>
<tr class="separator:afa16ecc0a418b89d99450e49736fb7b3 inherit pro_attribs_class_combat_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:aeb6be6f3d11def633c53e3777d7235d3 inherit pro_attribs_class_combat_queue_command"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="class_combat_queue_command.html#aeb6be6f3d11def633c53e3777d7235d3">durationStateTime</a></td></tr>
<tr class="separator:aeb6be6f3d11def633c53e3777d7235d3 inherit pro_attribs_class_combat_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a470762476c47012ef35d666c14e9d8bf inherit pro_attribs_class_combat_queue_command"><td class="memItemLeft" align="right" valign="top">uint32 </td><td class="memItemRight" valign="bottom"><a class="el" href="class_combat_queue_command.html#a470762476c47012ef35d666c14e9d8bf">dotDuration</a></td></tr>
<tr class="separator:a470762476c47012ef35d666c14e9d8bf inherit pro_attribs_class_combat_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a648018c562cb769d9f8b7b57ce737024 inherit pro_attribs_class_combat_queue_command"><td class="memItemLeft" align="right" valign="top">uint64 </td><td class="memItemRight" valign="bottom"><a class="el" href="class_combat_queue_command.html#a648018c562cb769d9f8b7b57ce737024">dotType</a></td></tr>
<tr class="separator:a648018c562cb769d9f8b7b57ce737024 inherit pro_attribs_class_combat_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a572592c425cb5ea0ea750ffa81aeda5b inherit pro_attribs_class_combat_queue_command"><td class="memItemLeft" align="right" valign="top">uint8 </td><td class="memItemRight" valign="bottom"><a class="el" href="class_combat_queue_command.html#a572592c425cb5ea0ea750ffa81aeda5b">dotPool</a></td></tr>
<tr class="separator:a572592c425cb5ea0ea750ffa81aeda5b inherit pro_attribs_class_combat_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a49cfcb02c46eae3051fa3a0d0ede5270 inherit pro_attribs_class_combat_queue_command"><td class="memItemLeft" align="right" valign="top">uint32 </td><td class="memItemRight" valign="bottom"><a class="el" href="class_combat_queue_command.html#a49cfcb02c46eae3051fa3a0d0ede5270">dotStrength</a></td></tr>
<tr class="separator:a49cfcb02c46eae3051fa3a0d0ede5270 inherit pro_attribs_class_combat_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a67033de394b9bd640061e2b41221aa16 inherit pro_attribs_class_combat_queue_command"><td class="memItemLeft" align="right" valign="top">float </td><td class="memItemRight" valign="bottom"><a class="el" href="class_combat_queue_command.html#a67033de394b9bd640061e2b41221aa16">dotPotency</a></td></tr>
<tr class="separator:a67033de394b9bd640061e2b41221aa16 inherit pro_attribs_class_combat_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a86b12060d8a942ac7a7319eb8331f3ce inherit pro_attribs_class_combat_queue_command"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="class_combat_queue_command.html#a86b12060d8a942ac7a7319eb8331f3ce">dotDamageOfHit</a></td></tr>
<tr class="separator:a86b12060d8a942ac7a7319eb8331f3ce inherit pro_attribs_class_combat_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:adef8cfd693f19f158716eb399057f6b1 inherit pro_attribs_class_combat_queue_command"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="class_combat_queue_command.html#adef8cfd693f19f158716eb399057f6b1">range</a></td></tr>
<tr class="separator:adef8cfd693f19f158716eb399057f6b1 inherit pro_attribs_class_combat_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a556964805e24a7436413b2f9008f0436 inherit pro_attribs_class_combat_queue_command"><td class="memItemLeft" align="right" valign="top">String </td><td class="memItemRight" valign="bottom"><a class="el" href="class_combat_queue_command.html#a556964805e24a7436413b2f9008f0436">accuracySkillMod</a></td></tr>
<tr class="separator:a556964805e24a7436413b2f9008f0436 inherit pro_attribs_class_combat_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ac948865b2164bb8ffd1d46b6c2981d8f inherit pro_attribs_class_combat_queue_command"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="class_combat_queue_command.html#ac948865b2164bb8ffd1d46b6c2981d8f">areaAction</a></td></tr>
<tr class="separator:ac948865b2164bb8ffd1d46b6c2981d8f inherit pro_attribs_class_combat_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a9164efa493abe6d3be46caa537301cf2 inherit pro_attribs_class_combat_queue_command"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="class_combat_queue_command.html#a9164efa493abe6d3be46caa537301cf2">coneAction</a></td></tr>
<tr class="separator:a9164efa493abe6d3be46caa537301cf2 inherit pro_attribs_class_combat_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a4b7efb149d918f7c64948c9d4557d77c inherit pro_attribs_class_combat_queue_command"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="class_combat_queue_command.html#a4b7efb149d918f7c64948c9d4557d77c">coneAngle</a></td></tr>
<tr class="separator:a4b7efb149d918f7c64948c9d4557d77c inherit pro_attribs_class_combat_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:abd3c8dc3b25cb8644fa9f85a507a0cd4 inherit pro_attribs_class_combat_queue_command"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="class_combat_queue_command.html#abd3c8dc3b25cb8644fa9f85a507a0cd4">areaRange</a></td></tr>
<tr class="separator:abd3c8dc3b25cb8644fa9f85a507a0cd4 inherit pro_attribs_class_combat_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a774f066eaafb8019d58b243b4d14688d inherit pro_attribs_class_combat_queue_command"><td class="memItemLeft" align="right" valign="top">String </td><td class="memItemRight" valign="bottom"><a class="el" href="class_combat_queue_command.html#a774f066eaafb8019d58b243b4d14688d">combatSpam</a></td></tr>
<tr class="separator:a774f066eaafb8019d58b243b4d14688d inherit pro_attribs_class_combat_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a8a107ca895e7b2043006577d925a46c9 inherit pro_attribs_class_combat_queue_command"><td class="memItemLeft" align="right" valign="top">String </td><td class="memItemRight" valign="bottom"><a class="el" href="class_combat_queue_command.html#a8a107ca895e7b2043006577d925a46c9">stateSpam</a></td></tr>
<tr class="separator:a8a107ca895e7b2043006577d925a46c9 inherit pro_attribs_class_combat_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:abe8137dd3b82e8caee52b84263c90660 inherit pro_attribs_class_combat_queue_command"><td class="memItemLeft" align="right" valign="top">uint32 </td><td class="memItemRight" valign="bottom"><a class="el" href="class_combat_queue_command.html#abe8137dd3b82e8caee52b84263c90660">animationCRC</a></td></tr>
<tr class="separator:abe8137dd3b82e8caee52b84263c90660 inherit pro_attribs_class_combat_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ad9ca6dde8c24b7c19d3f199427bc2c83 inherit pro_attribs_class_combat_queue_command"><td class="memItemLeft" align="right" valign="top">String </td><td class="memItemRight" valign="bottom"><a class="el" href="class_combat_queue_command.html#ad9ca6dde8c24b7c19d3f199427bc2c83">effectString</a></td></tr>
<tr class="separator:ad9ca6dde8c24b7c19d3f199427bc2c83 inherit pro_attribs_class_combat_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ab0d1f4c7584c20ffba9dfd47cd230763 inherit pro_attribs_class_combat_queue_command"><td class="memItemLeft" align="right" valign="top">VectorMap< uint64, <a class="el" href="class_state_effect.html">StateEffect</a> > </td><td class="memItemRight" valign="bottom"><a class="el" href="class_combat_queue_command.html#ab0d1f4c7584c20ffba9dfd47cd230763">stateEffects</a></td></tr>
<tr class="separator:ab0d1f4c7584c20ffba9dfd47cd230763 inherit pro_attribs_class_combat_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a4cc595dc8dbb9abf5c77b3b12ea007af inherit pro_attribs_class_combat_queue_command"><td class="memItemLeft" align="right" valign="top">VectorMap< uint64, <a class="el" href="class_dot_effect.html">DotEffect</a> > </td><td class="memItemRight" valign="bottom"><a class="el" href="class_combat_queue_command.html#a4cc595dc8dbb9abf5c77b3b12ea007af">dotEffects</a></td></tr>
<tr class="separator:a4cc595dc8dbb9abf5c77b3b12ea007af inherit pro_attribs_class_combat_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a2a6ca76131e03a59ec15db78afbf2c9b inherit pro_attribs_class_combat_queue_command"><td class="memItemLeft" align="right" valign="top">uint8 </td><td class="memItemRight" valign="bottom"><a class="el" href="class_combat_queue_command.html#a2a6ca76131e03a59ec15db78afbf2c9b">attackType</a></td></tr>
<tr class="separator:a2a6ca76131e03a59ec15db78afbf2c9b inherit pro_attribs_class_combat_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a7039e32c1bd23b9a3b5ae06fb0c0002b inherit pro_attribs_class_combat_queue_command"><td class="memItemLeft" align="right" valign="top">uint8 </td><td class="memItemRight" valign="bottom"><a class="el" href="class_combat_queue_command.html#a7039e32c1bd23b9a3b5ae06fb0c0002b">trails</a></td></tr>
<tr class="separator:a7039e32c1bd23b9a3b5ae06fb0c0002b inherit pro_attribs_class_combat_queue_command"><td class="memSeparator" colspan="2"> </td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock">
<p>Definition at line <a class="el" href="_melee2h_lunge1_command_8h_source.html#l00051">51</a> of file <a class="el" href="_melee2h_lunge1_command_8h_source.html">Melee2hLunge1Command.h</a>.</p>
</div><h2 class="groupheader">Constructor & Destructor Documentation</h2>
<a class="anchor" id="ab24b1ee6aabf75142f01eeac24830aa2"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">Melee2hLunge1Command::Melee2hLunge1Command </td>
<td>(</td>
<td class="paramtype">const String & </td>
<td class="paramname"><em>name</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="classserver_1_1zone_1_1_zone_process_server.html">ZoneProcessServer</a> * </td>
<td class="paramname"><em>server</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Definition at line <a class="el" href="_melee2h_lunge1_command_8h_source.html#l00054">54</a> of file <a class="el" href="_melee2h_lunge1_command_8h_source.html">Melee2hLunge1Command.h</a>.</p>
</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="aa7f703ec51a11e4e580e21a571b65f46"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">int Melee2hLunge1Command::doQueueCommand </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classserver_1_1zone_1_1objects_1_1creature_1_1_creature_object.html">CreatureObject</a> * </td>
<td class="paramname"><em>creature</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const uint64 & </td>
<td class="paramname"><em>target</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const UnicodeString & </td>
<td class="paramname"><em>arguments</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Reimplemented from <a class="el" href="classserver_1_1zone_1_1objects_1_1creature_1_1commands_1_1_queue_command.html#a833e25691f9f7ea158519db34b47c0f6">server::zone::objects::creature::commands::QueueCommand</a>.</p>
<p>Definition at line <a class="el" href="_melee2h_lunge1_command_8h_source.html#l00058">58</a> of file <a class="el" href="_melee2h_lunge1_command_8h_source.html">Melee2hLunge1Command.h</a>.</p>
<p>References <a class="el" href="_queue_command_8cpp_source.html#l00060">server::zone::objects::creature::commands::QueueCommand::checkInvalidLocomotions()</a>, <a class="el" href="_queue_command_8h_source.html#l00170">server::zone::objects::creature::commands::QueueCommand::checkStateMask()</a>, <a class="el" href="_combat_queue_command_8h_source.html#l00134">CombatQueueCommand::doCombatAction()</a>, <a class="el" href="server_2zone_2objects_2creature_2_creature_object_8cpp_source.html#l03038">server::zone::objects::creature::CreatureObject::getWeapon()</a>, <a class="el" href="_queue_command_8h_source.html#l00105">server::zone::objects::creature::commands::QueueCommand::INVALIDLOCOMOTION</a>, <a class="el" href="_queue_command_8h_source.html#l00106">server::zone::objects::creature::commands::QueueCommand::INVALIDSTATE</a>, and <a class="el" href="_queue_command_8h_source.html#l00108">server::zone::objects::creature::commands::QueueCommand::INVALIDWEAPON</a>.</p>
</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>/Users/victor/git/Core3Mda/MMOCoreORB/src/server/zone/objects/creature/commands/<a class="el" href="_melee2h_lunge1_command_8h_source.html">Melee2hLunge1Command.h</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Tue Oct 15 2013 17:29:32 for Core3 by  <a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.3.1
</small></address>
</body>
</html>
| kidaa/Awakening-Core3 | doc/html/class_melee2h_lunge1_command.html | HTML | lgpl-3.0 | 114,883 |
/*
Copyright 2013-2021 Paul Colby
This file is part of QtAws.
QtAws is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
QtAws is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with the QtAws. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef QTAWS_DESCRIBESERVICESRESPONSE_H
#define QTAWS_DESCRIBESERVICESRESPONSE_H
#include "pricingresponse.h"
#include "describeservicesrequest.h"
namespace QtAws {
namespace Pricing {
class DescribeServicesResponsePrivate;
class QTAWSPRICING_EXPORT DescribeServicesResponse : public PricingResponse {
Q_OBJECT
public:
DescribeServicesResponse(const DescribeServicesRequest &request, QNetworkReply * const reply, QObject * const parent = 0);
virtual const DescribeServicesRequest * request() const Q_DECL_OVERRIDE;
protected slots:
virtual void parseSuccess(QIODevice &response) Q_DECL_OVERRIDE;
private:
Q_DECLARE_PRIVATE(DescribeServicesResponse)
Q_DISABLE_COPY(DescribeServicesResponse)
};
} // namespace Pricing
} // namespace QtAws
#endif
| pcolby/libqtaws | src/pricing/describeservicesresponse.h | C | lgpl-3.0 | 1,512 |
/**
* GetAllUsersResponse.java
* Created by pgirard at 2:07:29 PM on Aug 19, 2010
* in the com.qagwaai.starmalaccamax.shared.services.action package
* for the JobMalaccamax project
*/
package com.qagwaai.starmalaccamax.client.service.action;
import java.util.ArrayList;
import com.google.gwt.user.client.rpc.IsSerializable;
import com.qagwaai.starmalaccamax.shared.model.JobDTO;
/**
* @author pgirard
*
*/
public final class GetAllJobsResponse extends AbstractResponse implements IsSerializable {
/**
*
*/
private ArrayList<JobDTO> jobs;
/**
*
*/
private int totalJobs;
/**
* @return the users
*/
public ArrayList<JobDTO> getJobs() {
return jobs;
}
/**
* @return the totalJobs
*/
public int getTotalJobs() {
return totalJobs;
}
/**
* @param jobs
* the users to set
*/
public void setJobs(final ArrayList<JobDTO> jobs) {
this.jobs = jobs;
}
/**
* @param totalJobs
* the totalJobs to set
*/
public void setTotalJobs(final int totalJobs) {
this.totalJobs = totalJobs;
}
/**
* {@inheritDoc}
*/
@Override
public String toString() {
return "GetAllJobsResponse [jobs=" + jobs + ", totalJobs=" + totalJobs + "]";
}
}
| qagwaai/StarMalaccamax | src/com/qagwaai/starmalaccamax/client/service/action/GetAllJobsResponse.java | Java | lgpl-3.0 | 1,407 |
/*
* Copyright (C) 2021 Inera AB (http://www.inera.se)
*
* This file is part of sklintyg (https://github.com/sklintyg).
*
* sklintyg is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* sklintyg is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
angular.module('StatisticsApp.treeMultiSelector.controller', [])
.controller('treeMultiSelectorCtrl', ['$scope', '$uibModal',
function($scope, $uibModal) {
'use strict';
$scope.openDialogClicked = function() {
if (angular.isFunction($scope.onOpen)) {
$scope.onOpen();
}
var modalInstance = $uibModal.open({
animation: false,
templateUrl: '/app/shared/treemultiselector/modal/modal.html',
controller: 'TreeMultiSelectorModalCtrl',
windowTopClass: 'tree-multi-selector',
size: 'lg',
backdrop: 'true',
resolve: {
directiveScope: $scope
}
});
modalInstance.result.then(function() {
$scope.doneClicked();
}, function() {
});
};
}]);
| sklintyg/statistik | web/src/main/webapp/app/shared/treemultiselector/treeMultiSelectorCtrl.js | JavaScript | lgpl-3.0 | 1,547 |
P1Charts
========
Projeto da disciplina de programação 1 de 2013.2
Gera um gráfico em Pizza ou em Barras com até 5 parâmetros.
Instalar os seguintes arquivos:
* CMake
* git
* Biblioteca cairo
* Biblioteca Jansson
Dica do malandro
----------------
Usem linux!
| lfelipev/P1Charts | README.md | Markdown | lgpl-3.0 | 270 |
/*
* Copyright (c) 2001-2003 Swedish Institute of Computer Science.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* 2. 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.
* 3. The name of the author may not be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
*
* This file is part of the lwIP TCP/IP stack.
*
* Author: Adam Dunkels <[email protected]>
*
*/
/* lwIP includes. */
#include "lwip/debug.h"
#include "lwip/def.h"
#include "lwip/sys.h"
#include "lwip/mem.h"
#include "lwip/stats.h"
#include "os_common.h"
#include "os_supervise.h"
#include "os_debug.h"
#include "os_mailbox.h"
static u16_t s_nextthread = 0;
/*-----------------------------------------------------------------------------------*/
// Creates an empty mailbox.
err_t sys_mbox_new(sys_mbox_t *mbox, int size)
{
OS_QueueConfig que_cfg = {
.len = archMESG_QUEUE_LENGTH,
.item_size = sizeof(OS_Message*) //sizeof(void*)
};
(void)size;
IF_STATUS(OS_QueueCreate(&que_cfg, OS_TaskGet(), mbox)) {
return ERR_MEM;
}
#if SYS_STATS
++lwip_stats.sys.mbox.used;
if (lwip_stats.sys.mbox.max < lwip_stats.sys.mbox.used) {
lwip_stats.sys.mbox.max = lwip_stats.sys.mbox.used;
}
#endif /* SYS_STATS */
if (NULL == *mbox) {
return ERR_MEM;
}
return ERR_OK;
}
/*-----------------------------------------------------------------------------------*/
/*
Deallocates a mailbox. If there are messages still present in the
mailbox when the mailbox is deallocated, it is an indication of a
programming error in lwIP and the developer should be notified.
*/
void sys_mbox_free(sys_mbox_t *mbox)
{
if (OS_QueueItemsCountGet(*mbox)) {
/* Line for breakpoint. Should never break here! */
portNOP();
#if SYS_STATS
lwip_stats.sys.mbox.err++;
#endif /* SYS_STATS */
// TODO notify the user of failure.
OS_ASSERT(OS_FALSE);
}
OS_QueueDelete(*mbox);
#if SYS_STATS
--lwip_stats.sys.mbox.used;
#endif /* SYS_STATS */
}
/*-----------------------------------------------------------------------------------*/
// Posts the "msg" to the mailbox.
void sys_mbox_post(sys_mbox_t *mbox, void *data)
{
OS_MessageSend(*mbox, (const OS_Message*)data, OS_BLOCK, OS_MSG_PRIO_NORMAL);
}
/*-----------------------------------------------------------------------------------*/
// Try to post the "msg" to the mailbox.
err_t sys_mbox_trypost(sys_mbox_t *mbox, void *msg)
{
err_t result;
IF_OK(OS_MessageSend(*mbox, (const OS_Message*)msg, OS_NO_BLOCK, OS_MSG_PRIO_NORMAL)) {
result = ERR_OK;
} else {
// could not post, queue must be full
result = ERR_MEM;
#if SYS_STATS
lwip_stats.sys.mbox.err++;
#endif /* SYS_STATS */
}
return result;
}
/*-----------------------------------------------------------------------------------*/
/*
Blocks the thread until a message arrives in the mailbox, but does
not block the thread longer than "timeout" milliseconds (similar to
the sys_arch_sem_wait() function). The "msg" argument is a result
parameter that is set by the function (i.e., by doing "*msg =
ptr"). The "msg" parameter maybe NULL to indicate that the message
should be dropped.
The return values are the same as for the sys_arch_sem_wait() function:
Number of milliseconds spent waiting or SYS_ARCH_TIMEOUT if there was a
timeout.
Note that a function with a similar name, sys_mbox_fetch(), is
implemented by lwIP.
*/
u32_t sys_arch_mbox_fetch(sys_mbox_t *mbox, void **msg, u32_t timeout)
{
void *dummyptr;
OS_Tick StartTime, EndTime, Elapsed;
StartTime = OS_TickCountGet();
if (NULL == msg) {
msg = &dummyptr;
}
if (0 != timeout) {
IF_OK(OS_MessageReceive(*mbox, (OS_Message**)&(*msg), timeout)) {
EndTime = OS_TickCountGet();
Elapsed = OS_TICKS_TO_MS(EndTime - StartTime);
return (Elapsed);
} else { // timed out blocking for message
*msg = NULL;
return SYS_ARCH_TIMEOUT;
}
} else { // block forever for a message.
OS_MessageReceive(*mbox, (OS_Message**)&(*msg), OS_BLOCK); // time is arbitrary
EndTime = OS_TickCountGet();
Elapsed = OS_TICKS_TO_MS(EndTime - StartTime);
return (Elapsed); // return time blocked TODO test
}
}
/*-----------------------------------------------------------------------------------*/
/*
Similar to sys_arch_mbox_fetch, but if message is not ready immediately, we'll
return with SYS_MBOX_EMPTY. On success, 0 is returned.
*/
u32_t sys_arch_mbox_tryfetch(sys_mbox_t *mbox, void **msg)
{
void *dummyptr;
if (NULL == msg) {
msg = &dummyptr;
}
IF_OK(OS_MessageReceive(*mbox, (OS_Message**)&(*msg), OS_NO_BLOCK)) {
return ERR_OK;
} else {
return SYS_MBOX_EMPTY;
}
}
/*----------------------------------------------------------------------------------*/
int sys_mbox_valid(sys_mbox_t *mbox)
{
if (OS_NULL == *mbox) {
return 0;
}
return 1;
}
/*-----------------------------------------------------------------------------------*/
void sys_mbox_set_invalid(sys_mbox_t *mbox)
{
*mbox = SYS_MBOX_NULL;
}
///*-----------------------------------------------------------------------------------*/
//// Creates a new semaphore. The "count" argument specifies
//// the initial state of the semaphore.
//err_t sys_sem_new(sys_sem_t *sem, u8_t count)
//{
// *sem = OS_SemaphoreCountingCreate(count, 0);
// if(!*sem) {
//#if SYS_STATS
// ++lwip_stats.sys.sem.err;
//#endif /* SYS_STATS */
// return ERR_MEM;
// }
//
// if (!count) { // Means it can't be taken
// OS_SemaphoreLock(*sem, OS_NO_BLOCK);
// }
//#if SYS_STATS
// ++lwip_stats.sys.sem.used;
// if (lwip_stats.sys.sem.max < lwip_stats.sys.sem.used) {
// lwip_stats.sys.sem.max = lwip_stats.sys.sem.used;
// }
//#endif /* SYS_STATS */
// return ERR_OK;
//}
//
///*-----------------------------------------------------------------------------------*/
///*
// Blocks the thread while waiting for the semaphore to be
// signaled. If the "timeout" argument is non-zero, the thread should
// only be blocked for the specified time (measured in
// milliseconds).
//
// If the timeout argument is non-zero, the return value is the number of
// milliseconds spent waiting for the semaphore to be signaled. If the
// semaphore wasn't signaled within the specified time, the return value is
// SYS_ARCH_TIMEOUT. If the thread didn't have to wait for the semaphore
// (i.e., it was already signaled), the function may return zero.
//
// Notice that lwIP implements a function with a similar name,
// sys_sem_wait(), that uses the sys_arch_sem_wait() function.
//*/
//u32_t sys_arch_sem_wait(sys_sem_t *sem, u32_t timeout)
//{
//OS_Tick StartTime, EndTime, Elapsed;
//
// StartTime = OS_TickCountGet();
// if (timeout) {
// IF_OK(OS_SemaphoreLock(*sem, timeout)) {
// EndTime = OS_TickCountGet();
// Elapsed = OS_TICKS_TO_MS(EndTime - StartTime);
// return (Elapsed); // return time blocked TODO test
// } else {
// return SYS_ARCH_TIMEOUT;
// }
// } else { // must block without a timeout
// OS_SemaphoreLock(*sem, OS_BLOCK);
// EndTime = OS_TickCountGet();
// Elapsed = OS_TICKS_TO_MS(EndTime - StartTime);
// return (Elapsed); // return time blocked
// }
//}
//
///*-----------------------------------------------------------------------------------*/
//// Signals a semaphore
//void sys_sem_signal(sys_sem_t *sem)
//{
// OS_SemaphoreUnlock(*sem);
//}
//
///*-----------------------------------------------------------------------------------*/
//// Deallocates a semaphore
//void sys_sem_free(sys_sem_t *sem)
//{
//#if SYS_STATS
// --lwip_stats.sys.sem.used;
//#endif /* SYS_STATS */
// OS_SemaphoreDelete(*sem);
//}
//
///*-----------------------------------------------------------------------------------*/
//int sys_sem_valid(sys_sem_t *sem)
//{
// if (SYS_SEM_NULL == *sem) {
// return 0;
// }
// return 1;
//}
//
///*-----------------------------------------------------------------------------------*/
//void sys_sem_set_invalid(sys_sem_t *sem)
//{
// *sem = SYS_SEM_NULL;
//}
/*-----------------------------------------------------------------------------------*/
// Initialize sys arch
void sys_init(void)
{
// keep track of how many threads have been created
s_nextthread = 0;
}
/*-----------------------------------------------------------------------------------*/
/* Mutexes*/
/*-----------------------------------------------------------------------------------*/
/*-----------------------------------------------------------------------------------*/
#if LWIP_COMPAT_MUTEX == 0
/* Create a new mutex*/
err_t sys_mutex_new(sys_mutex_t *mutex) {
*mutex = OS_MutexCreate();
if (*mutex == NULL) {
#if SYS_STATS
++lwip_stats.sys.mutex.err;
#endif /* SYS_STATS */
return ERR_MEM;
}
#if SYS_STATS
++lwip_stats.sys.mutex.used;
if (lwip_stats.sys.mutex.max < lwip_stats.sys.mutex.used) {
lwip_stats.sys.mutex.max = lwip_stats.sys.mutex.used;
}
#endif /* SYS_STATS */
return ERR_OK;
}
/*-----------------------------------------------------------------------------------*/
/* Deallocate a mutex*/
void sys_mutex_free(sys_mutex_t *mutex)
{
#if SYS_STATS
--lwip_stats.sys.mutex.used;
#endif /* SYS_STATS */
OS_MutexDelete(*mutex);
}
/*-----------------------------------------------------------------------------------*/
/* Lock a mutex*/
void sys_mutex_lock(sys_mutex_t *mutex)
{
OS_MutexLock(*mutex, OS_BLOCK);
}
/*-----------------------------------------------------------------------------------*/
/* Unlock a mutex*/
void sys_mutex_unlock(sys_mutex_t *mutex)
{
OS_MutexUnlock(*mutex);
}
#endif /*LWIP_COMPAT_MUTEX*/
/*-----------------------------------------------------------------------------------*/
// TODO
/*-----------------------------------------------------------------------------------*/
/*
Starts a new thread with priority "prio" that will begin its execution in the
function "thread()". The "arg" argument will be passed as an argument to the
thread() function. The id of the new thread is returned. Both the id and
the priority are system dependent.
*/
sys_thread_t sys_thread_new(const char *name, lwip_thread_fn thread , void *arg, int stacksize, int prio)
{
OS_TaskHd CreatedTask = OS_NULL;
if (s_nextthread < OS_NETWORK_SYS_THREAD_MAX) {
OS_TaskConfig* task_lwip_cfg_p = (OS_TaskConfig*)OS_Malloc(sizeof(OS_TaskConfig)); //no free for this allocation!
if (task_lwip_cfg_p) {
task_lwip_cfg_p->func_main = (void(*)(OS_TaskArgs*))thread;
task_lwip_cfg_p->func_power = OS_NULL;
task_lwip_cfg_p->args_p = OS_NULL;
task_lwip_cfg_p->attrs = 0;
task_lwip_cfg_p->timeout = 0;
task_lwip_cfg_p->prio_init = (DEFAULT_THREAD_PRIO + prio);
task_lwip_cfg_p->prio_power = OS_PWR_PRIO_MAX;
task_lwip_cfg_p->storage_size = 0;
task_lwip_cfg_p->stack_size = stacksize;
task_lwip_cfg_p->stdin_len = 0;
OS_StrNCpy((StrP)task_lwip_cfg_p->name, name, (OS_TASK_NAME_LEN - 1));
IF_OK(OS_TaskCreate(arg, task_lwip_cfg_p, &CreatedTask)) {
++s_nextthread;
}
}
}
return CreatedTask;
}
/*
This optional function does a "fast" critical region protection and returns
the previous protection level. This function is only called during very short
critical regions. An embedded system which supports ISR-based drivers might
want to implement this function by disabling interrupts. Task-based systems
might want to implement this by using a mutex or disabling tasking. This
function should support recursive calls from the same task or interrupt. In
other words, sys_arch_protect() could be called while already protected. In
that case the return value indicates that it is already protected.
sys_arch_protect() is only required if your port is supporting an operating
system.
*/
sys_prot_t sys_arch_protect(void)
{
OS_CriticalSectionEnter();
return 1;
}
/*
This optional function does a "fast" set of critical region protection to the
value specified by pval. See the documentation for sys_arch_protect() for
more information. This function is only required if your port is supporting
an operating system.
*/
void sys_arch_unprotect(sys_prot_t pval)
{
(void)pval;
OS_CriticalSectionExit();
}
/*
* Prints an assertion messages and aborts execution.
*/
void sys_assert( const char *msg )
{
OS_TRACE(D_CRITICAL, msg, OS_NULL);
OS_ASSERT(OS_FALSE);
}
/******************************************************************************/
u32_t sys_jiffies(void)
{
return HAL_GetTick();
}
/******************************************************************************/
u32_t sys_now(void)
{
return OS_TICKS_TO_MS(sys_jiffies());
} | PheeL79/diOS | src/osal/network/lwip/sys_arch.c | C | lgpl-3.0 | 14,130 |
// node/this-3.js
var object = {
id: "xyz",
printId: function() {
console.log('The id is '+
this.id + ' ' +
this.toString());
}
};
// setTimeout(object.printId, 100);
var callback = object.printId;
callback();
| sistemas-web/nodejs-exemplos | node/this-3.js | JavaScript | lgpl-3.0 | 238 |
package Genome::Sys;
use strict;
use warnings;
use Genome;
use Genome::Carp qw(croakf);
use Genome::Utility::File::Mode qw(mode);
use autodie qw(chown);
use Carp;
use Cwd;
use Digest::MD5;
use Errno qw();
use File::Basename;
use File::Copy qw();
use File::Path;
use File::Spec;
use File::stat qw(stat lstat);
use IO::File;
use JSON;
use List::MoreUtils "each_array";
use LWP::Simple qw(getstore RC_OK);
use Params::Validate qw(:types validate_pos);
use POSIX qw(EEXIST);
use Set::Scalar;
use Scalar::Util qw(blessed reftype);
use feature qw(state);
our @CARP_NOT = qw(Genome::Model::Build::Command::DetermineError);
# these are optional but should load immediately when present
# until we can make the Genome::Utility::Instrumentation optional (Net::Statsd deps)
for my $opt (qw/Genome::Sys::Lock Genome::Sys::Log/) {
eval "use $opt";
}
our $VERSION = $Genome::VERSION;
class Genome::Sys {};
sub concatenate_files {
my ($self,$inputs,$output) = @_;
unless (ref($inputs) and $output) {
die 'expected \\@input_files $output_file as parameters';
}
my ($quoted_output_file, @quoted_input_files) = $self->quote_for_shell($output,@$inputs);
Genome::Sys->shellcmd(cmd => "cat @quoted_input_files >$quoted_output_file");
}
sub quote_for_shell {
require String::ShellQuote;
# this is needed until shellcmd supports an array form,
# which is difficult because we go to a bash sub-shell by default
my $class = shift;
my @quoted = map String::ShellQuote::shell_quote($_), @_;
if (wantarray) {
return @quoted
}
else {
return $quoted[0];
}
}
sub disk_usage_for_path {
my $self = shift;
my $path = shift;
my %params = @_;
# Normally disk_usage_for_path returns nothing if it encounters an error;
# this allows the caller to override the default behavior, returning a
# number even if du emits errors (for instance, because the user does not
# have read permissions for a single subfolder out of many).
my $allow_errors = delete $params{allow_errors};
if (keys %params) {
die $self->error_message("Unknown parameters for disk_usage_for_path(): " . join(', ', keys %params));
}
unless (-d $path) {
$self->error_message("Path $path does not exist!");
return;
}
return unless -d $path;
my $cmd = "du -sk $path 2>&1";
my @du_output = split( /\n/, qx{$cmd} );
my $last_line = pop @du_output;
my $kb_used = ( split( ' ', $last_line, 2 ) )[0];
# if we couldn't parse the size count, print all output and return nothing
unless (Scalar::Util::looks_like_number($kb_used)) {
push @du_output, $last_line;
$self->error_message("du output is not a number:\n" . join("\n", @du_output));
return;
}
# if there were lines besides the size count, emit warnings and (potentially) return nothing
if (@du_output) {
$self->warning_message($_) for (@du_output);
unless ($allow_errors) {
$self->error_message("du encountered errors");
return;
}
}
return $kb_used;
}
# directory manipulation
sub validate_existing_directory {
my ($self, $directory) = @_;
unless ( defined $directory ) {
Carp::croak("Can't validate_existing_directory: No directory given");
}
unless ( -e $directory ) {
Carp::croak("Can't validate_existing_directory: $directory: Path does not exist");
}
unless ( -d $directory ) {
Carp::croak("Can't validate_existing_directory: $directory: path exists but is not a directory");
}
return 1;
}
sub validate_directory_for_read_access {
my ($self, $directory) = @_;
# Both underlying methods throw their own exceptions
$self->validate_existing_directory($directory)
or return;
return $self->_can_read_from_directory($directory);
}
sub validate_directory_for_write_access {
my ($self, $directory) = @_;
# Both underlying methods throw their own exceptions
$self->validate_existing_directory($directory)
or return;
return $self->_can_write_to_directory($directory);
}
sub validate_directory_for_read_write_access {
my ($self, $directory) = @_;
# All three underlying methods throw their own exceptions
$self->validate_existing_directory($directory)
or return;
$self->_can_read_from_directory($directory)
or return;
return $self->_can_write_to_directory($directory);
}
sub recursively_validate_directory_for_read_write_access {
my ($self, $directory) = @_;
my $wanted = sub {
my $full_path = $File::Find::name;
if (-f $full_path) {
eval {
Genome::Sys->validate_file_for_reading($full_path);
Genome::Sys->validate_file_for_writing_overwrite($full_path);
};
if ($@) {
Carp::croak "Cannot read or write $full_path in $directory!";
}
}
};
find($wanted, $directory);
return 1;
}
sub _can_read_from_directory {
my ($self, $directory) = @_;
unless ( -r $directory ) {
Carp::croak("Directory ($directory) is not readable");
}
return 1;
}
sub _can_write_to_directory {
my ($self, $directory) = @_;
unless ( -w $directory ) {
Carp::croak("Directory ($directory) is not writable");
}
return 1;
}
sub abs_path {
my ($self, $path) = @_;
return Cwd::abs_path($path);
}
# MD5
sub md5sum {
my ($self, $file) = @_;
my $digest;
my $fh = IO::File->new($file);
unless ($fh) {
Carp::croak("Can't open file ($file) to md5sum: $!");
}
my $d = Digest::MD5->new;
$d->addfile($fh);
$digest = $d->hexdigest;
$fh->close;
return $digest;
}
sub md5sum_data {
my ($self, $data) = @_;
unless (defined $data) {
Carp::croak('No data passed to md5sum_data');
}
my $digest = Digest::MD5->new;
$digest->add($data);
return $digest->hexdigest;
}
# API for accessing software and data by version
sub snapshot_revision {
my $class = shift;
# Previously we just used UR::Util::used_libs_perl5lib_prefix but this did not
# "detect" a software revision when using code from PERL5LIB or compile-time
# lib paths. Since it is common for developers to run just Genome from a Git
# checkout we really want to record what versions of UR, Genome, etc.
# were used.
my @orig_inc = @INC;
my @libs = ($INC{'UR.pm'}, $INC{'Genome.pm'});
die $class->error_message('Did not find both modules loaded (UR and Genome).') unless @libs == 2;
# assemble list of "important" libs
@libs = map { File::Basename::dirname($class->abs_path($_)) } @libs;
push @libs, UR::Util->used_libs;
# remove trailing slashes
map { $_ =~ s/\/+$// } (@libs, @orig_inc);
@libs = $class->_uniq(@libs);
# preserve the list order as appeared @INC
my @inc;
for my $inc (@orig_inc) {
push @inc, grep { $inc eq $_ } @libs;
}
@inc = $class->_uniq(@inc);
@inc = $class->_simplify_inc(@inc) if $class->can('_simplify_inc');
return join(':', @inc);
}
sub _uniq {
my $self = shift;
my @list = @_;
my %seen = ();
my @unique = grep { ! $seen{$_} ++ } @list;
return @unique;
}
# access to paths to code and data
sub dbpath {
my ($class, $name, $version) = @_;
my $dbpath = $class->lookup_dbpath($name);
if ($dbpath) {
print STDERR "Using '$dbpath' from config.\n";
} else {
unless ($version) {
die "Genome::Sys dbpath must be called with a database name and a version. " .
"Use 'latest' for the latest installed version.";
}
$dbpath = $class->_find_in_genome_db_paths($name, $version);
}
return $dbpath;
}
sub lookup_dbpath {
my ($class, $name) = @_;
my %config_key = (
'genome-music-testdata' => 'db_music_testdata',
'cosmic' => 'db_cosmic',
'omim' => 'db_omim',
'pfam' => 'db_pfam',
);
my $key = $config_key{$name};
return unless ($key);
return Genome::Config::get($key);
}
sub _find_in_genome_db_paths {
my ($class, $name, $version) = @_;
my $base_dirs = Genome::Config::get('db');
my $subdir = "$name/$version";
my @base_dirs = split(':',$base_dirs);
my @dirs =
map { -l $_ ? $class->abs_path($_) : ($_) }
map {
my $path = join("/",$_,$subdir);
(-e $path ? ($path) : ())
}
@base_dirs;
return $dirs[0];
}
# renamed for consistency with a variety of sw_ methods.
*swpath = \&sw_path;
sub sw_path {
my ($class, $pkg_name, $version, $app_name) = @_;
$app_name ||= $pkg_name;
unless ($version) {
die "Genome::Sys swpath must be called with a pkg name and a version. The optional executable name defaults to the pkg_name. " .
"Use the version 'latest' for the latest installed version.";
}
# check the default path for the app
my %map = $class->sw_version_path_map($pkg_name, $app_name);
my $path = $map{$version};
if ($path) {
return $path;
}
# older legacy software has an unversioned executable
# this is only supported if the version passed in is "latest"
$path = `which $app_name`;
if ($path = `which $app_name`) {
# unversioned install
# see if it's a symlink to something in a versioned tree
chomp $path;
$path = readlink($path) while -l $path;
if ($version eq 'latest') {
return $path;
}
else {
die $class->error_message("Failed to find $pkg_name at version $version. " .
"The default version is at $path.");
}
}
die $class->error_message("Failed to find app $app_name (package $pkg_name) at version $version!");
}
sub java_executable_path {
my ($class, $version, $bin) = @_;
my $java_path = $class->java_path($version);
$bin ||= 'java';
my $exe_path = File::Spec->join($java_path, 'bin', $bin);
unless(-x $exe_path) {
die $class->error_message('No java executable found in bin of <%s> for version: %s', $java_path, $version);
}
return $exe_path;
}
sub java_path {
my ($class, $version) = @_;
unless(version->parse($version)) {
die $class->error_message('Version does not appear to be valid: %s', $version);
}
my @available_versions = glob(File::Spec->join(Genome::Config::get('java_path'), "jre$version*"));
if (@available_versions == 0) {
die $class->error_message('No java path found for version: %s', $version);
} elsif (@available_versions == 1) {
return $available_versions[0];
} else {
my $most_recent_path;
my $most_recent_version = 0;
for my $next_path (@available_versions) {
my ($next_version) = $next_path =~ /jre(.+)$/;
if(version->parse($next_version) > version->parse($most_recent_version)) {
$most_recent_path = $next_path;
$most_recent_version = $next_version;
}
}
return $most_recent_path;
}
}
sub jar_path {
my ($class, $jar_name, $version) = @_;
# check the default path
my %map = $class->jar_version_path_map($jar_name);
my $path = $map{$version};
if ($path) {
return $path;
}
die $class->error_message("Failed to find jar $jar_name at version $version");
}
sub jar_version_path_map {
my ($class, $pkg_name) = @_;
my %versions;
my @dirs = split(':', Genome::Config::get('jar_path'));
for my $dir (@dirs) {
my $prefix = "$dir/$pkg_name-";
my @version_paths = grep { -e $_ } glob("$prefix*");
next unless @version_paths;
my $prefix_len = length($prefix);
for my $version_path (@version_paths) {
my $version = substr($version_path,$prefix_len);
$version =~ s/.jar$//;
if (substr($version,0,1) eq '-') {
$version = substr($version,1);
}
next unless $version =~ /[0-9\.]/;
next if -l $version_path;
$versions{$version} = $version_path;
}
}
return %versions;
}
sub sw_version_path_map {
my ($class, $pkg_name, $app_name) = @_;
$app_name ||= $pkg_name;
# find software installed as .debs with versioned packages
# packaged software should have a versioned executable like /usr/bin/myapp1.2.3 or /usr/bin/mypackage-myapp1.2.3 in the bin.
my %versions1;
my @dirs1 = (split(':',$ENV{PATH}), "~/gsc-pkg-bio/");
my @sw_ignore = split(':', Genome::Config::get('sw_ignore') || '');
for my $dir1 (@dirs1) {
if (grep { index($dir1,$_) == 0 } @sw_ignore) {
# skip directories starting with something in @sw_ignore
next;
}
for my $prefix ("$dir1/$pkg_name-$app_name-", "$dir1/$app_name-", "$dir1/$pkg_name-$app_name", "$dir1/$app_name") {
my @version_paths = grep { -e $_ } glob("$prefix*");
next unless @version_paths;
my $prefix_len = length($prefix);
for my $version_path (@version_paths) {
my $version = substr($version_path,$prefix_len);
if (substr($version,0,1) eq '-') {
$version = substr($version,1);
}
next unless $version =~ /[0-9\.]/;
if (grep { index($version_path,$_) == 0 } @sw_ignore) {
next;
}
$versions1{$version} = $version_path;
}
}
}
sub _common_prefix_length {
my ($first,@rest) = @_;
my $len;
for ($len = 1; $len <= length($first); $len++) {
for my $other (@rest) {
if (substr($first,0,$len) ne substr($other,0,$len)) {
return $len-1;
}
}
}
return $len-1;
}
my %pkgdirs;
my @dirs2 = split(':',Genome::Config::get('sw')); #most of the system expects this to be one value not-colon separated currently
for my $dir2 (@dirs2) {
# one subdir will exist per application
my @app_subdirs = glob("$dir2/$pkg_name");
for my $app_subdir (@app_subdirs) {
# one subdir under that will exist per version
my @version_subdirs = grep { -e $_ and not -l $_ and $_ !~ /README/ and /\d/ } glob("$app_subdir/*");
next unless @version_subdirs;
# if some subdirectories repeat the pkg name, all of those we consider must
my @some = grep { index(File::Basename::basename($_),$pkg_name) == 0 } @version_subdirs;
@version_subdirs = @some if @some;
my $len = _common_prefix_length(@version_subdirs);
my $prefix = substr($version_subdirs[0],0,$len);
if ($prefix =~ /(-|)(v|)([\d\.pa]+)$/) {
$len = $len - length($3);
}
for my $version_subdir (@version_subdirs) {
if (grep { index($version_subdir,$_) == 0 } @sw_ignore) {
next;
}
my $version = substr($version_subdir,$len);
if (substr($version,0,1) =~ /[0-9]/) {
$pkgdirs{$version} = $version_subdir;
}
}
}
}
# When a version number ends in -64, we are just saying it is 64-bit,
# which is default for everything now. We don't want to even return
# the 32-bit only versions.
# Trim the version number down, and have that key point to the path of the 64-bit version.
# This will sometimes stomp on a 32-bit version directory if it exists (hopefully).
# If 32-bit directories exist and there is no 64-bit version to stomp on them,
# we never know for sure they are not just new installs which presume to be 64-bit.
my @v64 = grep { /[-_]64$/ } keys %pkgdirs;
for my $version_64 (@v64) {
my ($version_no64) = ($version_64 =~ /^(.*?)([\.-_][^\.]+)64$/);
$pkgdirs{$version_no64} = delete $pkgdirs{$version_64};
}
# now resolve the actual path to the executable $app_name
my %versions2;
for my $version (keys %pkgdirs) {
my $dir = $pkgdirs{$version};
my @subdirs = qw/. bin scripts/;
my @basenames = ("$app_name-$version","$app_name$version",$app_name);
if ($pkg_name ne $app_name) {
@basenames = map { ("$pkg_name-$_", "$pkg_name$_", $_) } @basenames;
}
for my $basename (@basenames) {
for my $subdir (@subdirs) {
my $path = "$dir/$subdir/$basename";
if (-e $path) {
$path =~ s|/\./|/|m;
$versions2{$version} = $path;
last;
}
}
last if $versions2{$version};
}
unless ($versions2{$version}) {
$class->debug_message("Found $pkg_name at version $version at $dir, but no executable (named any of: @basenames) in subdirs: @subdirs!");
}
}
# prefer packaged versions over unpackaged
my %all_versions = (%versions2,%versions1);
# return sorted
return map { $_ => $all_versions{$_} } sort keys %all_versions;
}
sub sw_versions {
my ($self,$pkg_name,$app_name) = @_;
my @map = ($self->sw_version_path_map($pkg_name,$app_name));
my $n = 0;
return map { $n++; ($n % 2 ? $_ : ()) } @map;
}
#####
# Temp file management
#####
sub _temp_directory_prefix {
my $self = shift;
my $base = join("_", map { lc($_) } split('::',$self->class));
return $base;
}
our $base_temp_directory;
sub base_temp_directory {
my $self = shift;
my $class = ref($self) || $self;
my $template = shift;
my $id;
if (ref($self)) {
return $self->{base_temp_directory} if $self->{base_temp_directory};
$id = $self->id;
}
else {
# work as a class method
return $base_temp_directory if $base_temp_directory;
$id = '';
}
unless ($template) {
my $prefix = $self->_temp_directory_prefix();
$prefix ||= $class;
my $time = $self->__context__->now;
$time =~ s/[\s\: ]/_/g;
$template = "/gm-$prefix-$time-$id-XXXX";
$template =~ s/ /-/g;
}
# See if we're running under LSF and LSF gave us a directory that will be
# auto-cleaned up when the job terminates
my $tmp_location = $ENV{'TMPDIR'} || File::Spec->tmpdir();
if ($ENV{'LSB_JOBID'}) {
my $lsf_possible_tempdir = sprintf("%s/%s.tmpdir", $tmp_location, $ENV{'LSB_JOBID'});
if (-d $lsf_possible_tempdir) {
$tmp_location = $lsf_possible_tempdir;
#open up the temporary directory to those with data access for easier debugging
my $gid = gidgrnam(Genome::Config::get('sys_group'));
set_gid($gid, $tmp_location);
my $mode = mode($tmp_location);
$mode->add_group_readable;
$mode->add_group_executable;
$mode->rm_other_rwx;
}
}
# tempdir() thows its own exception if there's a problem
# For debugging purposes, allow cleanup to be disabled
my $cleanup = 1;
if (Genome::Config::get('sys_no_cleanup')) {
$cleanup = 0;
}
my $dir = File::Temp::tempdir($template, DIR=>$tmp_location, CLEANUP => $cleanup);
$self->create_directory($dir);
if (ref($self)) {
return $self->{base_temp_directory} = $dir;
}
else {
# work as a class method
return $base_temp_directory = $dir;
}
unless ($dir) {
Carp::croak("Unable to determine base_temp_directory");
}
return $dir;
}
our $anonymous_temp_file_count = 0;
sub create_temp_file_path {
my $self = shift;
my $name = shift;
unless ($name) {
$name = 'anonymous' . $anonymous_temp_file_count++;
}
my $dir = $self->base_temp_directory;
my $path = $dir .'/'. $name;
if (-e $path) {
Carp::croak "temp path '$path' already exists!";
}
if (!$path or $path eq '/') {
Carp::croak("create_temp_file_path() failed");
}
return $path;
}
sub create_temp_file {
my $self = shift;
my $path = $self->create_temp_file_path(@_);
my $fh = IO::File->new($path, '>');
unless ($fh) {
Carp::croak "Failed to create temp file $path: $!";
}
return ($fh,$path) if wantarray;
return $fh;
}
sub create_temp_directory {
my $self = shift;
my $path = $self->create_temp_file_path(@_);
$self->create_directory($path);
return $path;
}
#####
# Basic filesystem operations
#####
sub copy_file {
my ($self, $file, $dest) = @_;
$self->validate_file_for_reading($file)
or Carp::croak("Cannot open input file ($file) for reading!");
$self->validate_file_for_writing($dest)
or Carp::croak("Cannot open output file ($dest) for writing!");
# Note: since the file is validate_file_for_reading, and the dest is validate_file_for_writing,
# the files can never be exactly the same.
unless ( File::Copy::copy($file, $dest) ) {
# It is unclear whether File::Copy::copy intends to remove $dest but we
# definitely have cases where it's not.
unlink $dest;
Carp::croak("Can't copy $file to $dest: $!");
}
return 1;
}
sub move_file {
my ($self, $file, $dest) = @_;
$self->validate_file_for_reading($file)
or Carp::croak("Cannot open input file ($file) for reading!");
$self->validate_file_for_writing($dest)
or Carp::croak("Cannot open output file ($dest) for writing!");
# Note: since the file is validate_file_for_reading, and the dest is validate_file_for_writing,
# the files can never be exactly the same.
unless ( $self->move($file, $dest) ) {
Carp::croak("Can't move $file to $dest: $!");
}
return 1;
}
sub tar {
my ($class, %params) = @_;
my $tar_path = delete $params{tar_path};
my $input_directory = delete $params{input_directory};
my $input_pattern = delete $params{input_pattern};
$input_pattern = '*' unless defined $input_pattern;
my $options = delete $params{options};
$options = '-cf' unless defined $options;
if (%params) {
Carp::confess "Extra parameters given to tar method: " . join(', ', sort keys %params);
}
unless ($tar_path) {
Carp::confess "Not given path at which tar should be created!";
}
if (-e $tar_path) {
Carp::confess "File exists at $tar_path, refusing to overwrite with new tarball!";
}
unless ($input_directory) {
Carp::confess "Not given directory containing input files!";
}
unless (-d $input_directory) {
Carp::confess "No input directory found at $input_directory";
}
my $current_directory = getcwd;
unless (chdir $input_directory) {
Carp::confess "Could not change directory to $input_directory";
}
if (Genome::Sys->directory_is_empty($input_directory)) {
Carp::confess "Cannot create tarball for empty directory $input_directory!";
}
my $cmd = "tar $options $tar_path $input_pattern";
my $rv = Genome::Sys->shellcmd(
cmd => $cmd,
);
unless ($rv) {
Carp::confess "Could not create tar file at $tar_path containing files in " .
"$input_directory matching pattern $input_pattern";
}
unless (chdir $current_directory) {
Carp::confess "Could not change directory back to $current_directory";
}
return 1;
}
sub untar {
my ($class, %params) = @_;
my $tar_path = delete $params{tar_path};
my $target_directory = delete $params{target_directory};
my $delete_tar = delete $params{delete_tar};
if (%params) {
Carp::confess "Extra parameters given to untar method: " . join(', ', sort keys %params);
}
unless ($tar_path) {
Carp::confess "Not given path to tar file to be untarred!";
}
unless (-e $tar_path) {
Carp::confess "No file found at $tar_path!";
}
$target_directory = getcwd unless $target_directory;
$delete_tar = 0 unless defined $delete_tar;
my $current_directory = getcwd;
unless (chdir $target_directory) {
Carp::confess "Could not change directory to $target_directory";
}
my $rv = Genome::Sys->shellcmd(
cmd => "tar -xf $tar_path",
);
unless ($rv) {
Carp::confess "Could not untar $tar_path into $target_directory";
}
unless (chdir $current_directory) {
Carp::confess "Could not change directory back to $current_directory";
}
if ($delete_tar) {
unlink $tar_path;
}
return 1;
}
sub directory_is_empty {
my ($class, $directory) = @_;
my @files = glob("$directory/*");
if (@files) {
return 0;
}
return 1;
}
sub rsync_directory {
my ($class, %params) = @_;
my $source_dir = delete $params{source_directory};
my $target_dir = delete $params{target_directory};
my $pattern = delete $params{file_pattern};
unless ($source_dir) {
Carp::confess "Not given directory to copy from!";
}
unless (-d $source_dir) {
Carp::confess "No directory found at $source_dir";
}
unless ($target_dir) {
Carp::confess "Not given directory to copy to!";
}
unless (-d $target_dir) {
Genome::Sys->create_directory($target_dir);
}
$pattern = '' unless $pattern;
my $source = join('/', $source_dir, $pattern);
my $rv = Genome::Sys->shellcmd(
cmd => "rsync -rlHpgt $source $target_dir",
);
unless ($rv) {
confess "Could not copy data matching pattern $source to $target_dir";
}
return 1;
}
sub line_count {
my ($self, $path) = @_;
my $line_count;
if ($self->file_is_gzipped($path)) {
($line_count) = qx(zcat $path | wc -l) =~ /^(\d+)/;
} else {
($line_count) = qx(wc -l $path) =~ /^(\d+)/;
}
return $line_count;
}
sub create_directory {
my ($self, $directory) = @_;
unless ( defined $directory ) {
Carp::croak("Can't create_directory: No path given");
}
# FIXME do we want to throw an exception here? What if the user expected
# the directory to be created, not that it already existed
return $directory if -d $directory;
# have to set umask, make_path's mode/umask option is not sufficient
my $umask = umask;
umask oct(Genome::Config::get('sys_umask'));
make_path($directory); # not from File::Path
umask $umask;
return $directory;
}
# File::Path::make_path says it lets you specify group but it always seemed
# to be overrided by setgid. So we are implenting the recursive mkdir here.
sub make_path {
my ($path) = validate_pos(@_, {type => SCALAR});
return 1 if -d $path; #This also triggers the automounter so mkdir() gets EEXIST instead of EACCES.
my $gid = gidgrnam(Genome::Config::get('sys_group'));
my @dirs = File::Spec->splitdir($path);
for (my $i = 0; $i < @dirs; $i++) {
my $subpath = File::Spec->catdir(@dirs[0..$i]);
next if -d $subpath;
my $rv = mkdir $subpath;
my $mkdir_errno = $!;
if ($rv) {
my $stat = stat($subpath);
if ($stat->gid != $gid) {
set_gid($gid, $subpath);
}
} else {
if ($mkdir_errno != EEXIST) {
Carp::confess("While creating path ($path), failed to create " .
"directory ($subpath) because ($mkdir_errno)");
}
}
}
unless (-d $path) {
die "directory does not exist: $path";
}
}
sub set_gid {
my $gid = shift;
my $path = shift;
# chown removes the setgid bit on root_squashed NFS volumes so preserve manually
my $mode = mode($path);
my $had_setgid = $mode->is_setgid;
chown -1, $gid, $path;
if ($had_setgid) {
$mode->add_setgid();
}
}
sub gidgrnam {
my $group_name = shift;
#LSF: Try 2 times to group information.
# LDAP something fail to return at
# first request.
for ( 1 .. 2 ) {
if ( my @group_info = ( getgrnam($group_name) ) ) {
return $group_info[2];
}
}
die "Not able to find the group info for $group_name.";
}
sub create_symlink {
my ($class, $target, $link) = @_;
unless ( defined($target) && length($target) ) {
Carp::croak("Can't create_symlink: no target given");
}
unless ( defined($link) && length($link) ) {
Carp::croak("Can't create_symlink: no 'link' given");
}
unless (symlink($target, $link)) {
my $symlink_error = $!;
if ($symlink_error == Errno::EEXIST) {
my $current_target = readlink($link);
if (! defined($current_target) or $current_target ne $target) {
Carp::croak("Link ($link) for target ($target) already exists.");
}
} else {
Carp::croak("Can't create link ($link) to $target\: $symlink_error");
}
}
return 1;
}
# Return a list of strings representing the filenames/directories in a given directory.
sub list_directory {
my ($class, $directory_name) = @_;
opendir my($dh), $directory_name or die "Couldn't open dir '$directory_name': $!";
my @children = readdir $dh;
closedir $dh;
# remove . and .. if they are in the list
my @results = grep(!/^[\.]*$/, @children);
return @results
}
# create symlinks of the contents of the target_dir.
# BEFORE:
# target_dir/foo/bar
# target_dir/baz
# link_dir/ (no foo or baz)
# AFTER:
# link_dir/foo -> target_dir/foo
# link_dir/baz -> target_dir/baz
sub symlink_directory {
my ($class, $target_dir, $link_dir) = @_;
if(-e $link_dir) {
Carp::croak("The link_dir ($link_dir) exists and is not a directory!") unless(-d $link_dir);
my $target_filenames = Set::Scalar->new(Genome::Sys->list_directory($target_dir));
my $link_filenames = Set::Scalar->new(Genome::Sys->list_directory($link_dir));
# check for intersection of link_filenames with target_filenames and die.
my $intersection = $target_filenames->intersection($link_filenames);
if(@$intersection) {
Carp::croak("Cannot symlink directory because the following\n" .
"are in both the target_dir and the link_dir:\n" .
Data::Dumper::Dumper(@$intersection));
}
# symlink all the things in $target_dir
my @target_fullpaths = map("$target_dir/$_", @$target_filenames);
my @link_fullpaths = map("$link_dir/$_", @$target_filenames);
my $ea = each_array(@target_fullpaths, @link_fullpaths);
while( my ($target, $link) = $ea->() ) {
Genome::Sys->create_symlink($target, $link);
}
} else {
Carp::croak("The link_dir ($link_dir) doesn't exist.");
}
}
sub create_symlink_and_log_change {
my $class = shift || die;
my $owner = shift || die;
my $target = shift || die;
my $link = shift || die;
$class->create_symlink($target, $link);
# create a change record so that if the databse change is undone this symlink will be removed
my $symlink_undo = sub {
$owner->status_message("Removing symlink ($link) due to database rollback.");
unlink $link;
};
my $symlink_change = UR::Context::Transaction->log_change(
$owner, 'UR::Value', $link, 'external_change', $symlink_undo
);
unless ($symlink_change) {
die $owner->error_message("Failed to log symlink change.");
}
return 1;
}
sub read_file {
my ($self, $fname) = @_;
my $fh = $self->open_file_for_reading($fname);
Carp::croak "Failed to open file $fname! " . $self->error_message() . ": $!" unless $fh;
if (wantarray) {
my @lines = $fh->getlines;
return @lines;
}
else {
return( do { local( $/ ) ; <$fh> }); # slurp mode
}
}
sub write_file {
my ($self, $fname, @content) = @_;
my $fh = $self->open_file_for_writing($fname);
Carp::croak "Failed to open file $fname! " . $self->error_message() . ": $!" unless $fh;
for (@content) {
$fh->print($_) or Carp::croak "Failed to write to file $fname! $!";
}
if ( $fname ne '-' ) {
$fh->close or Carp::croak "Failed to close file $fname! $!";
}
return $fname;
}
sub write_temp_file {
my ($self, @content) = @_;
my $filename = $self->create_temp_file_path();
return $self->write_file($filename, @content);
}
sub _open_file {
my ($self, $file, $rw) = @_;
if ($file eq '-') {
if ($rw eq 'r') {
return 'STDIN';
}
elsif ($rw eq 'w') {
return 'STDOUT';
}
else {
die "cannot open '-' with access '$rw': r = STDIN, w = STDOUT!!!";
}
}
my $fh = (defined $rw) ? IO::File->new($file, $rw) : IO::File->new($file);
return $fh if $fh;
Carp::croak("Can't open file ($file) with access '$rw': $!");
}
sub validate_file_for_reading {
my ($self, $file) = @_;
unless ( defined $file ) {
Carp::croak("Can't validate_file_for_reading: No file given");
}
if ($file eq '-') {
return 1;
}
unless (-e $file ) {
Carp::croak("File ($file) does not exist");
}
unless (-f $file) {
Carp::croak("File ($file) exists but is not a plain file");
}
unless ( -r $file ) {
Carp::croak("Do not have READ access to file ($file)");
}
return 1;
}
sub validate_file_for_writing {
my ($self, $file) = @_;
unless ( defined $file ) {
Carp::croak("Can't validate_file_for_writing: No file given");
}
if ($file eq '-') {
return 1;
}
if ( -s $file ) {
Carp::croak("Can't validate_file_for_writing: File ($file) has non-zero size, refusing to write to it");
}
# FIXME there is a race condition where the path could go away or become non-writable
# between the time this method returns and the time we actually try opening the file
# for writing
# validate_file_for_writing_overwrite throws its own exceptions if there are problems
return $self->validate_file_for_writing_overwrite($file);
}
sub validate_file_for_writing_overwrite {
my ($self, $file) = @_;
unless ( defined $file ) {
Carp::croak("Can't validate_file_for_writing_overwrite: No file given");
}
my ($name, $dir) = File::Basename::fileparse($file);
unless ( $dir ) {
Carp::croak("Can't validate_file_for_writing_overwrite: Can't determine directory from pathname ($file)");
}
unless ( -w $dir ) {
Carp::croak("Can't validate_file_for_writing_overwrite: Do not have WRITE access to directory ($dir) to create file ($name)");
}
# FIXME same problem with the race condition as noted at the end of validate_file_for_writing()
return 1;
}
sub open_file_for_reading {
my ($self, $file) = @_;
$self->validate_file_for_reading($file)
or return;
# _open_file throws its own exception if it doesn't work
return $self->_open_file($file, 'r');
}
sub download_file_to_directory {
my ($self, $url, $destination_dir) = @_;
unless (-d $destination_dir){
Carp::croak("You wanted to download $url to $destination_dir but that directory doesn't exist!");
}
my $resp = getstore($url, $destination_dir . "/" . (split("/", $url))[-1]);
if($resp =~ /4\d\d/){
Carp::croak("You wanted to download $url but it doesn't exist or you don't have access! ($resp)");
}
if($resp =~/5\d\d/){
Carp::croak("You wanted to download $url but there appears to be a problem with the host! ($resp)");
}
return RC_OK eq $resp;
}
sub open_file_for_writing {
my ($self, $file) = @_;
$self->validate_file_for_writing($file)
or return;
if (-e $file) {
unless (unlink $file) {
Carp::croak("Can't unlink $file: $!");
}
}
return $self->_open_file($file, 'w');
}
sub open_gzip_file_for_reading {
my ($self, $file) = @_;
$self->validate_file_for_reading($file)
or return;
unless ($self->file_is_gzipped($file)) {
Carp::croak("File ($file) is not a gzip file");
}
my $pipe = "zcat ".$file." |";
# _open_file throws its own exception if it doesn't work
return $self->_open_file($pipe);
}
# Returns the file type, following any symlinks along the way to their target
sub file_type {
my $self = shift;
my $file = shift;
$self->validate_file_for_reading($file);
$file = $self->follow_symlink($file);
my $result = `file -b $file`;
my @answer = split /\s+/, $result;
return $answer[0];
}
sub file_is_gzipped {
my ($self, $filename) = @_;
my $file_type = $self->file_type($filename);
#NOTE: debian bug #522441 - `file` can report gzip files as any of these....
if ($file_type eq "gzip" or $file_type eq "Sun" or $file_type eq "Minix" or $file_type eq 'GRand') {
return 1;
} else {
return 0;
}
}
sub gzip_file {
my ($class, $input_file, $target_file) = @_;
unless (-e $input_file) {
die $class->error_message("Input file ($input_file) does not exist");
}
Genome::Sys->validate_file_for_writing($target_file);
my $bgzip_cmd = "bgzip -c $input_file > $target_file";
Genome::Sys->shellcmd(cmd => $bgzip_cmd);
unless (-e $target_file) {
die $class->error_message("Target file ($target_file) does not exist after bgzipping");
}
return $target_file;
}
# Follows a symlink chain to reach the final file, accounting for relative symlinks along the way
sub follow_symlink {
my $self = shift;
my $file = shift;
# Follow the chain of symlinks
while (-l $file) {
my $original_file = $file;
$file = readlink($file);
# If the symlink was relative, repair that
unless (File::Spec->file_name_is_absolute($file)) {
my $path = dirname($original_file);
$file = join ("/", ($path, $file));
}
$self->validate_file_for_reading($file);
}
return $file;
}
sub get_file_extension_for_path {
my $self = shift;
my $path = shift;
my ($extension) = $path =~ /(\.[^.]+)$/;
return $extension;
}
sub iterate_file_lines {
my $class = shift;
my $fh = shift;
Carp::croak('File handle or name required as the first param of iterate_file_lines')
unless ($fh);
if (!ref($fh) or ! $fh->can('getline')) {
$fh = $class->open_file_for_reading($fh);
}
my @line_cb;
my $line_preprocessor = sub {};
while( my $arg = shift ) {
if ($arg eq 'line_preprocessor') {
$line_preprocessor = shift;
Carp::croak('The line_preprocessor must be a CODE ref') unless reftype($line_preprocessor) eq 'CODE';
} elsif (blessed($arg) and blessed($arg) eq 'Regexp') { # reftype() returns SCALAR for regexes on perl5.10
my $re = $arg;
my $cb = shift;
Carp::croak("Expected CODE ref after regex $re, but got " . ref($cb))
unless (reftype($cb) eq 'CODE');
my $wrapped_cb = sub {
if ($_[0] =~ $re) {
$cb->(@_);
}
};
push @line_cb, $wrapped_cb;
} elsif (reftype($arg) eq 'CODE') {
push @line_cb, $arg;
} else {
Carp::croak("Unexpected argument to iterate_file_lines: $arg");
}
}
my $lines_read = 0;
while(my $line = $fh->getline) {
$lines_read++;
my @preprocessed = $line_preprocessor->($line);
foreach my $cb (@line_cb) {
$cb->($line, @preprocessed);
}
}
return($lines_read || '0 but true');
}
####
####
my $arch_os;
sub arch_os {
unless ($arch_os) {
$arch_os = `uname -m`;
chomp($arch_os);
}
return $arch_os;
}
#####
# Methods dealing with user names, groups, etc
#####
sub user_id {
return $<;
}
sub username {
my $class = shift;
state $username = $ENV{'REMOTE_USER'};
return $username if $username;
my $user_id = $class->user_id;
for my $try (1..5) {
$username = getpwuid($user_id);
return $username if $username;
#This is a hack!
#Sometimes our machines fail to get a result from getpwuid() on the first try.
#If we wait a second, it tends to work on subsequent attempts!
$class->warning_message('Failed attempt %s to resolve username for user ID %s', $try, $user_id);
sleep 1;
}
$class->fatal_message('Could not determine name for user ID %s' , $user_id);
}
my $sudo_username = undef;
sub sudo_username {
my $class = shift;
unless(defined $sudo_username) {
$sudo_username = $class->_sudo_username;
}
$sudo_username;
}
#split out for ease of testing
sub _sudo_username {
my $class = shift;
my $who_output = $class->cmd_output_who_dash_m || '';
my $who_username = (split(/\s/,$who_output))[0] || '';
my $sudo_username = $who_username eq $class->username ? '' : $who_username;
$sudo_username ||= $ENV{'SUDO_USER'};
return ($sudo_username || '');
}
sub current_user_is_admin {
my $class = shift;
return Genome::Sys->current_user_has_role('admin');
}
sub current_user_has_role {
my ($class, $role_name) = @_;
my $user = $class->current_user;
return $class->_user_has_role($user, $role_name);
}
sub user_has_role {
my ($class, $username, $role_name) = @_;
my $user = Genome::Sys::User->get(username => $username);
return $class->_user_has_role($user, $role_name);
}
sub _user_has_role {
my ($class, $user, $role_name) = @_;
return 0 unless $user;
return $user->has_role_by_name($role_name);
}
sub current_user {
my $class = shift;
return Genome::Sys::User->get(username => $class->username);
}
sub cmd_output_who_dash_m {
return `who -m`;
}
sub user_is_member_of_group {
my ($class, $group_name) = @_;
my $user = Genome::Sys->username;
my $members = (getgrnam($group_name))[3];
return ($members && $user && $members =~ /\b$user\b/);
}
#####
# Various utility methods
#####
sub open_browser {
my ($class, @urls) = @_;
for my $url (@urls) {
if ($url !~ /:\/\//) {
$url = 'http://' . $url;
}
}
my $browser;
if ($^O eq 'darwin') {
$browser = "open";
}
elsif ($browser = `which firefox`) {
}
elsif ($browser = `which opera`) {
}
for my $url (@urls) {
Genome::Sys->shellcmd(cmd => "$browser $url");
}
return 1;
}
sub shellcmd {
# execute a shell command in a standard way instead of using system()\
# verifies inputs and ouputs, and does detailed logging...
# TODO: add IPC::Run's w/ timeout but w/o the io redirection...
my ($self,%params) = @_;
my %orig_params = %params;
my $cmd = delete $params{cmd};
my $output_files = delete $params{output_files};
my $input_files = delete $params{input_files};
my $output_directories = delete $params{output_directories};
my $input_directories = delete $params{input_directories};
my $allow_failed_exit_code = delete $params{allow_failed_exit_code};
my $allow_zero_size_output_files = delete $params{allow_zero_size_output_files};
my $set_pipefail = delete $params{set_pipefail};
my $allow_zero_size_input_files = delete $params{allow_zero_size_input_files};
my $skip_if_output_is_present = delete $params{skip_if_output_is_present};
my $redirect_stdout = delete $params{redirect_stdout};
my $redirect_stderr = delete $params{redirect_stderr};
my $dont_create_zero_size_files_for_missing_output =
delete $params{dont_create_zero_size_files_for_missing_output};
my $print_status_to_stderr = delete $params{print_status_to_stderr};
my $keep_dbh_connection_open = delete $params{keep_dbh_connection_open};
my @cmdline;
if (ref($cmd) and ref($cmd) eq 'ARRAY') {
if (defined $set_pipefail) {
Carp::confess "Cannot use set_pipefail with ARRAY form of cmd!";
}
@cmdline = @$cmd;
$cmd = join(' ', map $self->quote_for_shell($_), @cmdline);
}
$set_pipefail = 1 if not defined $set_pipefail;
$print_status_to_stderr = 1 if not defined $print_status_to_stderr;
$skip_if_output_is_present = 1 if not defined $skip_if_output_is_present;
if (%params) {
my @crap = %params;
Carp::confess("Unknown params passed to shellcmd: @crap");
}
my ($t1,$t2,$elapsed);
# Go ahead and print the status message if the cmd is shortcutting
if ($output_files and @$output_files) {
my @found_outputs = grep { -e $_ } grep { not -p $_ } @$output_files;
if ($skip_if_output_is_present
and @$output_files == @found_outputs
) {
$self->status_message(
"SKIP RUN (output is present): $cmd\n\t"
. join("\n\t",@found_outputs)
);
return 1;
}
}
my $old_status_cb = undef;
unless ($print_status_to_stderr) {
$old_status_cb = Genome::Sys->message_callback('status');
# This will avoid setting the callback to print to stderr
# NOTE: we must set the callback to undef for the default behaviour(see below)
Genome::Sys->message_callback('status',sub{});
}
if ($input_files and @$input_files) {
my @missing_inputs;
if ($allow_zero_size_input_files) {
@missing_inputs = grep { not -e $_ } grep { not -p $_ } @$input_files;
} else {
@missing_inputs = grep { not -s $_ } grep { not -p $_ } @$input_files;
}
if (@missing_inputs) {
Carp::croak("CANNOT RUN (missing input files): $cmd\n\t"
. join("\n\t", map { -e $_ ? "(empty) $_" : $_ } @missing_inputs));
}
}
if ($input_directories and @$input_directories) {
my @missing_inputs = grep { not -d $_ } @$input_directories;
if (@missing_inputs) {
Carp::croak("CANNOT RUN (missing input directories): $cmd\n\t"
. join("\n\t", @missing_inputs));
}
}
# disconnect the db handle in case this is about to take awhile
$self->disconnect_default_handles unless $keep_dbh_connection_open;
my $sys_pause_shellcmd = Genome::Config::get('sys_pause_shellcmd');
if ($sys_pause_shellcmd and $cmd =~ $sys_pause_shellcmd) {
my $file = '/tmp/GENOME_SYS_PAUSE.' . $$;
$self->warning_message("RUN MANUALLY (and remove $file afterward): $cmd");
Genome::Sys->write_file($file,$cmd . "\n");
my $msg_time = time;
while (-e $file) {
sleep 3;
if (time - $msg_time > (15*60)) {
$msg_time = time;
$self->warning_message("...waiting for $file to be removed after running command");
}
}
$self->warning_message("resuming execution presuming the command was run manually");
}
else {
$self->status_message("RUN: $cmd");
$t1 = time();
my $system_retval;
eval {
# Use fork/exec here so we can redirect stdout and/or stderr in the child and
# not have to worry about resetting them after the child process is done.
# Note to the future: FCGI ties STDOUT and STDERR and does something with them
# that means you can't open() them with typeglobs or references. See commit 0d56bbc
my $pid = fork();
if (!defined $pid) {
# error
die "Couldn't fork: $!";
} elsif ($pid) {
# parent
waitpid($pid, 0);
$system_retval = $?;
print STDOUT "\n" unless $redirect_stdout; # add a new line so that bad programs don't break TAP, etc.
} else {
# child
if ($redirect_stdout) {
open(STDOUT, '>', $redirect_stdout) || die "Can't redirect stdout to $redirect_stdout: $!";
}
if ($redirect_stderr) {
open(STDERR, '>', $redirect_stderr) || die "Can't redirect stderr to $redirect_stderr: $!";
}
# Set -o pipefail ensures the command will fail if it contains pipes and intermediate pipes fail.
# Export SHELLOPTS ensures that if there are nested "bash -c"'s, each will inherit pipefail
my $shellopts_part = 'export SHELLOPTS;';
if ($set_pipefail) {
$shellopts_part = "set -o pipefail; $shellopts_part";
} else {
$shellopts_part = "set +o pipefail; $shellopts_part";
}
{ # POE sets a handler to ignore SIG{PIPE}, that makes the
# pipefail option useless.
local $SIG{PIPE} = 'DEFAULT';
unless (@cmdline) {
@cmdline = ('bash', '-c', "$shellopts_part $cmd");
}
exec { $cmdline[0] } (@cmdline)
or do {
print STDERR "Can't exec: $!\nCommand line was: ",join(' ', @cmdline),"\n";
exit(127);
};
}
}
};
my $exception = $@;
if ($exception) {
Carp::croak("EXCEPTION RUNNING COMMAND. Failed to execute: $cmd\n\tException was: $exception");
}
my $child_exit_code = $system_retval >> 8;
$t2 = time();
$elapsed = $t2-$t1;
if ( $system_retval == -1 ) {
Carp::croak("ERROR RUNNING COMMAND. Failed to execute: $cmd\n\tError was: $!");
} elsif ( $system_retval & 127 ) {
my $signal = $system_retval & 127;
my $withcore = ( $system_retval & 128 ) ? 'with' : 'without';
Carp::croak("COMMAND KILLED. Signal $signal, $withcore coredump: $cmd");
} elsif ($child_exit_code != 0) {
if ($child_exit_code == 141) {
my ($package, $filename, $line) = caller(0);
my $msg = "SIGPIPE was recieved by command but IGNORED! cmd: '$cmd' in $package at $filename line $line";
$self->error_message($msg);
} elsif ($allow_failed_exit_code) {
Carp::carp("TOLERATING Exit code $child_exit_code from: $cmd");
} else {
Carp::croak("ERROR RUNNING COMMAND. Exit code $child_exit_code from: $cmd\nSee the command's captured STDERR (if it exists) for more information");
}
}
}
my @missing_output_files;
if ($output_files and @$output_files) {
@missing_output_files = grep { not -s $_ } grep { not -p $_ } @$output_files;
}
if (@missing_output_files) {
if ($allow_zero_size_output_files
#and @$output_files == @missing_output_files
# XXX This causes the command to fail if only a few of many files are empty, despite
# that the option 'allow_zero_size_output_files' was given. New behavior is to warn
# in either circumstance, and to warn that old behavior is no longer present in cases
# where the command would've failed
) {
if (@$output_files == @missing_output_files) {
Carp::carp("ALL output files were empty for command: $cmd");
} else {
Carp::carp("SOME (but not all) output files were empty for command " .
"(PLEASE NOTE that earlier versions of Genome::Sys->shellcmd " .
"would fail in this circumstance): $cmd");
}
if ($dont_create_zero_size_files_for_missing_output) {
@missing_output_files = (); # reset the list of missing output files
@missing_output_files =
grep { not -e $_ } grep { not -p $_ } @$output_files; # rescan for only missing files
} else {
for my $output_file (@missing_output_files) {
Carp::carp("ALLOWING zero size output file '$output_file' for command: $cmd");
my $fh = $self->open_file_for_writing($output_file);
unless ($fh) {
Carp::croak("failed to open $output_file for writing to replace missing output file: $!");
}
$fh->close;
}
@missing_output_files = ();
}
}
}
my @missing_output_directories;
if ($output_directories and @$output_directories) {
@missing_output_directories = grep { not -s $_ } grep { not -p $_ } @$output_directories;
}
if (@missing_output_files or @missing_output_directories) {
for (@$output_files) {
if (-e $_) {
unlink $_ or Carp::croak("Can't unlink $_: $!");
}
}
Carp::croak("MISSING OUTPUTS! "
. join(', ', @missing_output_files)
. " "
. join(', ', @missing_output_directories));
}
unless ($print_status_to_stderr) {
# Setting to the original behaviour (or default)
Genome::Sys->message_callback('status',$old_status_cb);
}
if (Genome::Config::get('sys_log_detail')) {
my $msg = encode_json({%orig_params, t1 => $t1, t2 => $t2, elapsed => $elapsed });
Genome::Sys->debug_message(qq|$msg|)
}
return 1;
}
sub capture {
my $class = shift;
require IPC::System::Simple;
return IPC::System::Simple::capture(@_);
}
sub disconnect_default_handles {
my $class = shift;
for my $ds (qw(Genome::DataSource::GMSchema Genome::DataSource::Oltp)) {
if($ds->has_default_handle) {
$class->debug_message("Disconnecting $ds default handle.");
$ds->disconnect_default_dbh();
}
}
return 1;
}
sub retry {
my %args = Params::Validate::validate(
@_, {
callback => { type => CODEREF },
tries => {
type => SCALAR,
callbacks => {
'is an integer' => sub { shift =~ /^\d+$/ },
'is greater than zero' => sub { shift > 0 },
},
},
delay => {
type => SCALAR,
callbacks => {
'is an integer' => sub { shift =~ /^\d+$/ },
'is greater than, or equal to, zero' => sub { shift >= 0 },
},
},
},
);
my $rv;
while ($args{tries} > 0) {
$args{tries}--;
$rv = $args{callback}->();
last if $rv;
sleep $args{delay};
}
return $rv;
}
sub _unpreserved_permissions {
my ($class, $oldname, $newname, $func) = @_;
if ( -l $oldname) {
return $func->();
}
# mimic (anticipated) CORE::rename errors
if ( ! -e $oldname ) {
$! = &Errno::ENOENT;
return;
}
if ( -f $oldname && -d $newname ) {
$! = &Errno::EISDIR;
return;
}
if ( -d $oldname && -f $newname ) {
$! = &Errno::ENOTDIR;
return;
}
if ( -d $oldname && -d $newname ) {
opendir(my $dh, $newname)
or return;
while ( my $entry = readdir $dh ) {
if ( $entry ne '.' && $entry ne '..' ) {
$! = &Errno::ENOTEMPTY;
return;
}
}
closedir($dh) or die($!);
}
# If target doesn't exist then create it so we can copy it's mode, gid, and
# uid. I am not sure if it's appropriate to preserve an existing target's
# mode, gid, and uid (as opposed to destroying it and creating fresh).
if ( -f $oldname && ! -e $newname ) {
$class->touch($newname)
or return;
}
if ( -d $oldname && ! -e $newname ) {
mkdir($newname)
or return;
}
# preserve mode, gid, and uid
my $stat = stat($newname)
or return;
my $mode = $stat->mode;
my $gid = $stat->gid;
my $uid = $stat->uid;
$func->();
# restore mode, gid, and uid
chown($uid, $gid, $newname)
or return;
eval { mode($newname)->set_mode($mode) }
or return;
return 1;
}
sub _same_device {
my @paths = @_;
return (lstat($paths[0])->dev == lstat($paths[1])->dev);
}
sub rename {
my ($class, $oldname, $newname) = @_;
_unpreserved_permissions($class, $oldname, $newname, sub {
my $newparentdir = (File::Spec->splitpath($newname))[1];
if (!_same_device($oldname, $newparentdir)) {
confess 'cannot rename across devices, use move instead';
}
unless ( CORE::rename $oldname, $newname ) {
die qq(CORE::rename should never fail or we didn't do a good enough job mimicking it. Error was: $!);
}
});
}
sub move {
my ($class, $oldname, $newname) = @_;
_unpreserved_permissions($class, $oldname, $newname, sub {
unless ( File::Copy::move $oldname, $newname ) {
die qq(File::Copy::move should never fail or we didn't do a good enough job mimicking it. Error was: $!);
}
});
}
sub renamex {
my $class = shift;
unless ($class->rename(@_)) {
croak "rename failed: $!";
}
}
sub movex {
my $class = shift;
unless ($class->move(@_)) {
croak "move failed: $!";
}
}
sub touch {
my ($class, $path) = @_;
my $file = IO::File->new($path, 'a')
or return;
$file->close()
or croak $!;
# using the undef pair uses system's current time (better for NFS)
utime undef, undef, $path
or return;;
return 1;
}
1;
__END__
methods => [
dbpath => {
takes => ['name','version'],
uses => [],
returns => 'FilesystemPath',
doc => 'returns the path to a data set',
},
swpath => {
takes => ['name','version'],
uses => [],
returns => 'FilesystemPath',
doc => 'returns the path to an application installation',
},
]
# until we get the above into ur...
=pod
=head1 NAME
Genome::Sys
=head1 VERSION
This document describes Genome::Sys version 0.9.0.1.
=head1 SYNOPSIS
use Genome;
my $dir = Genome::Sys->db_path('cosmic', 'latest');
my $path = Genome::Sys->sw_path('htseq','0.5.3p9','htseq-count');
=head1 DESCRIPTION
Genome::Sys is a simple layer on top of OS-level concerns,
including those automatically handled by the analysis system,
like database cache locations.
=head1 METHODS
=head2 sw_path($pkg_name,$version) or sw_path($pkg_name,$version,$executable_basename)
Return the path to a given executable, library, or package.
The 3-parameter variation is only for packages which have multiple executables.
This is a wrapper for the OS-specific strategy for managing multiple versions of software packages,
(i.e. /etc/alternatives for Debian/Ubuntu)
The 'sw' configuration variable contains a colon-separated lists of paths which
this falls back to. The default value is /var/lib/genome/sw/.
=head3 ex:
$path = Genome::Sys->sw_path("tophat","2.0.7");
$path = Genome::Sys->sw_path("htseq","0.5.3p9","htseq-count");
=head2 sw_versions($pkg_name) or sw_versions($pkg_name,$executable_basename);
Return a list of all installed versions of a given executable in order.
=head3 ex:
@versions = Genome::Sys->sw_versions("tophat");
@versions = Genome::Sys->sw_versions("htseq","htseq-count");
=head2 sw_version_path_map($pkg_name) or sw_version_path_map($pkg_name,$executable_basename)
Return a map of version numbers to executable paths.
=head3 ex:
%map = Genome::Sys->sw_version_path_map("tophat");
%map = Genome::Sys->sw_version_path_map("htseq","htseq-count");
=head2 db_path($name,$version)
Return the path to the preprocessed copy of the specified database.
(This is in lieu of a consistent API for the database in question.)
The 'db' configuration variable contains a colon-separated lists of paths which
this falls back to. The default value is /var/lib/genome/db/.
=head3 ex:
my $dir1 = Genome::Sys->db_path('cosmic', 'latest');
=head2 Genome::Sys->open_file_for_reading($filename);
Opens the given filename for reading and returns a filehandle for it.
open_file_for_reading() throws an exception for several conditions:
=over 2
=item * The given filename does not exist
=item * The given filename is not readable
=item * The given filename is not a plain file (for example, a directory)
=back
=head2 Genome::Sys->read_file($filename);
Read in the given filename and return the contents. If $filename is C<->,
then it reads from STDIN.
If called in list context, it returns a list with one line per list element.
If called in scalar context, it returns a single string with the entire file
contents.
=head2 Genome::Sys->open_file_for_writing($filename);
Opens the given filename for writing and returns a filehandle for it.
open_file_for_writing() throws an exception for several conditions:
=over 2
=item * $filename exists _and_ the file has non-zero size
=item * The directory containing $filename does not exist
=item * The directory containing $filename is not writable
=back
=head2 Genome::Sys->write_file($filename, @lines);
Creates a file with the given name and writes the contents of @lines to it.
If $filename is C<->, then it writes to STDOUT.
write_file() throws the same exceptions as open_file_for_writing().
=head2 Genome::Sys->iterate_file_lines($filename_or_handle,
line_preprocessor => $preprocessor_code,
$line_callback1, $line_callback2, ...,
$regex1, $regex_callback1, $regex2, $regex_callback2, ...);
If given a file name as the first argument, calls Genome::Sys->open_file_for_writing()
first. The first file/handle argument is required, all others are optional.
Reads the given file/filehandle one line at a time. If a line_preprocessor was
specified, its coderef is called in list context with the line as its only
argument. Each callback is then called. Callback arguments are the line from
the file followed by the return values from the line_preprocessor.
Callbacks preceded by a regex (created by qr) are only called if the regex
matches the line. Captured groups are available inside these callbacks using
the normal variables $1, $2, etc.
=cut
| malachig/genome | lib/perl/Genome/Sys.pm | Perl | lgpl-3.0 | 63,117 |
var complexExample = {
"edges" : [
{
"id" : 0,
"sbo" : 15,
"source" : "Reactome:109796",
"target" : "Reactome:177938"
},
{
"id" : 1,
"sbo" : 15,
"source" : "MAP:Cb15996_CY_Reactome:177938",
"target" : "Reactome:177938"
},
{
"id" : 2,
"sbo" : 11,
"source" : "Reactome:177938",
"target" : "MAP:Cb17552_CY_Reactome:177938"
},
{
"id" : 3,
"sbo" : 11,
"source" : "Reactome:177938",
"target" : "Reactome:109783"
},
{
"id" : 4,
"sbo" : 13,
"source" : "Reactome:179820",
"target" : "Reactome:177938"
},
{
"id" : 5,
"sbo" : 15,
"source" : "Reactome:179845",
"target" : "Reactome:177934"
},
{
"id" : 6,
"sbo" : 15,
"source" : "MAP:Cs56-65-5_CY_Reactome:177934",
"target" : "Reactome:177934"
},
{
"id" : 7,
"sbo" : 11,
"source" : "Reactome:177934",
"target" : "MAP:Cb16761_CY_Reactome:177934"
},
{
"id" : 8,
"sbo" : 11,
"source" : "Reactome:177934",
"target" : "Reactome:179882"
},
{
"id" : 9,
"sbo" : 13,
"source" : "Reactome:179845",
"target" : "Reactome:177934"
},
{
"id" : 10,
"sbo" : 15,
"source" : "Reactome:109844",
"target" : "Reactome:109867"
},
{
"id" : 11,
"sbo" : 11,
"source" : "Reactome:109867",
"target" : "Reactome:109845"
},
{
"id" : 12,
"sbo" : 15,
"source" : "Reactome:29358_MAN:R12",
"target" : "MAN:R12"
},
{
"id" : 13,
"sbo" : 15,
"source" : "Reactome:198710",
"target" : "MAN:R12"
},
{
"id" : 14,
"sbo" : 11,
"source" : "MAN:R12",
"target" : "Reactome:113582_MAN:R12"
},
{
"id" : 15,
"sbo" : 11,
"source" : "MAN:R12",
"target" : "Reactome:198666"
},
{
"id" : 16,
"sbo" : 13,
"source" : "Reactome:109845",
"target" : "MAN:R12"
},
{
"id" : 17,
"sbo" : 15,
"source" : "MAP:Cs56-65-5_CY_Reactome:109841",
"target" : "Reactome:109841"
},
{
"id" : 18,
"sbo" : 15,
"source" : "Reactome:109794",
"target" : "Reactome:109841"
},
{
"id" : 19,
"sbo" : 11,
"source" : "Reactome:109841",
"target" : "MAP:Cb16761_CY_Reactome:109841"
},
{
"id" : 20,
"sbo" : 11,
"source" : "Reactome:109841",
"target" : "Reactome:109793"
},
{
"id" : 21,
"sbo" : 11,
"source" : "Reactome:109841",
"target" : "MAP:UQ02750_CY_pho218pho222"
},
{
"id" : 22,
"sbo" : 13,
"source" : "Reactome:112406",
"target" : "Reactome:109841"
},
{
"id" : 23,
"sbo" : 15,
"source" : "Reactome:179882",
"target" : "Reactome:177940"
},
{
"id" : 24,
"sbo" : 15,
"source" : "Reactome:179849",
"target" : "Reactome:177940"
},
{
"id" : 25,
"sbo" : 11,
"source" : "Reactome:177940",
"target" : "Reactome:180348"
},
{
"id" : 26,
"sbo" : 15,
"source" : "Reactome:109788",
"target" : "Reactome:109802"
},
{
"id" : 27,
"sbo" : 15,
"source" : "MAP:UP31946_CY",
"target" : "Reactome:109802"
},
{
"id" : 28,
"sbo" : 11,
"source" : "Reactome:109802",
"target" : "Reactome:109789"
},
{
"id" : 29,
"sbo" : 15,
"source" : "Reactome:109787",
"target" : "Reactome:109803"
},
{
"id" : 30,
"sbo" : 15,
"source" : "Reactome:109783",
"target" : "Reactome:109803"
},
{
"id" : 31,
"sbo" : 11,
"source" : "Reactome:109803",
"target" : "Reactome:109788"
},
{
"id" : 32,
"sbo" : 11,
"source" : "Reactome:109803",
"target" : "MAP:UP31946_CY"
},
{
"id" : 33,
"sbo" : 15,
"source" : "MAP:Cs56-65-5_CY_Reactome:177930",
"target" : "Reactome:177930"
},
{
"id" : 34,
"sbo" : 15,
"source" : "Reactome:180348",
"target" : "Reactome:177930"
},
{
"id" : 35,
"sbo" : 11,
"source" : "Reactome:177930",
"target" : "Reactome:180286"
},
{
"id" : 36,
"sbo" : 11,
"source" : "Reactome:177930",
"target" : "MAP:Cb16761_CY_Reactome:177930"
},
{
"id" : 37,
"sbo" : 13,
"source" : "Reactome:180348",
"target" : "Reactome:177930"
},
{
"id" : 38,
"sbo" : 15,
"source" : "Reactome:109796",
"target" : "Reactome:177945"
},
{
"id" : 39,
"sbo" : 15,
"source" : "MAP:Cb15996_CY_Reactome:177945",
"target" : "Reactome:177945"
},
{
"id" : 40,
"sbo" : 11,
"source" : "Reactome:177945",
"target" : "MAP:Cb17552_CY_Reactome:177945"
},
{
"id" : 41,
"sbo" : 11,
"source" : "Reactome:177945",
"target" : "Reactome:109783"
},
{
"id" : 42,
"sbo" : 13,
"source" : "Reactome:180331",
"target" : "Reactome:177945"
},
{
"id" : 43,
"sbo" : 15,
"source" : "Reactome:109793",
"target" : "MAN:R1"
},
{
"id" : 44,
"sbo" : 15,
"source" : "MAP:UP36507_CY",
"target" : "MAN:R1"
},
{
"id" : 45,
"sbo" : 11,
"source" : "MAN:R1",
"target" : "Reactome:109795"
},
{
"id" : 46,
"sbo" : 15,
"source" : "Reactome:109843",
"target" : "Reactome:109863"
},
{
"id" : 47,
"sbo" : 11,
"source" : "Reactome:109863",
"target" : "MAP:UP27361_CY_pho202pho204"
},
{
"id" : 48,
"sbo" : 11,
"source" : "Reactome:109863",
"target" : "MAP:UQ02750_CY_pho218pho222"
},
{
"id" : 49,
"sbo" : 15,
"source" : "MAP:Cs56-65-5_CY_Reactome:177933",
"target" : "Reactome:177933"
},
{
"id" : 50,
"sbo" : 15,
"source" : "Reactome:180301",
"target" : "Reactome:177933"
},
{
"id" : 51,
"sbo" : 11,
"source" : "Reactome:177933",
"target" : "MAP:Cb16761_CY_Reactome:177933"
},
{
"id" : 52,
"sbo" : 11,
"source" : "Reactome:177933",
"target" : "Reactome:180337"
},
{
"id" : 53,
"sbo" : 13,
"source" : "Reactome:180301",
"target" : "Reactome:177933"
},
{
"id" : 54,
"sbo" : 15,
"source" : "MAP:UQ02750_CY",
"target" : "MAN:R2"
},
{
"id" : 55,
"sbo" : 15,
"source" : "Reactome:109793",
"target" : "MAN:R2"
},
{
"id" : 56,
"sbo" : 11,
"source" : "MAN:R2",
"target" : "Reactome:109794"
},
{
"id" : 57,
"sbo" : 15,
"source" : "MAP:UP04049_CY_pho259pho621",
"target" : "Reactome:109804"
},
{
"id" : 58,
"sbo" : 15,
"source" : "MAP:UP31946_CY",
"target" : "Reactome:109804"
},
{
"id" : 59,
"sbo" : 11,
"source" : "Reactome:109804",
"target" : "Reactome:109787"
},
{
"id" : 60,
"sbo" : 15,
"source" : "MAP:Cs56-65-5_CY_Reactome:109852",
"target" : "Reactome:109852"
},
{
"id" : 61,
"sbo" : 15,
"source" : "Reactome:109795",
"target" : "Reactome:109852"
},
{
"id" : 62,
"sbo" : 11,
"source" : "Reactome:109852",
"target" : "MAP:Cb16761_CY_Reactome:109852"
},
{
"id" : 63,
"sbo" : 11,
"source" : "Reactome:109852",
"target" : "Reactome:109793"
},
{
"id" : 64,
"sbo" : 11,
"source" : "Reactome:109852",
"target" : "Reactome:109848"
},
{
"id" : 65,
"sbo" : 13,
"source" : "Reactome:112406",
"target" : "Reactome:109852"
},
{
"id" : 66,
"sbo" : 15,
"source" : "MAP:Cs56-65-5_CY_Reactome:177939",
"target" : "Reactome:177939"
},
{
"id" : 67,
"sbo" : 15,
"source" : "Reactome:179856",
"target" : "Reactome:177939"
},
{
"id" : 68,
"sbo" : 11,
"source" : "Reactome:177939",
"target" : "MAP:Cb16761_CY_Reactome:177939"
},
{
"id" : 69,
"sbo" : 11,
"source" : "Reactome:177939",
"target" : "Reactome:179838"
},
{
"id" : 70,
"sbo" : 13,
"source" : "Reactome:179791",
"target" : "Reactome:177939"
},
{
"id" : 71,
"sbo" : 15,
"source" : "Reactome:180286",
"target" : "MAN:R25"
},
{
"id" : 72,
"sbo" : 15,
"source" : "MAP:C3",
"target" : "MAN:R25"
},
{
"id" : 73,
"sbo" : 15,
"source" : "MAP:C2",
"target" : "MAN:R25"
},
{
"id" : 74,
"sbo" : 11,
"source" : "MAN:R25",
"target" : "Reactome:179791"
},
{
"id" : 75,
"sbo" : 15,
"source" : "MAP:Cx114",
"target" : "Reactome:177936"
},
{
"id" : 76,
"sbo" : 15,
"source" : "Reactome:180337",
"target" : "Reactome:177936"
},
{
"id" : 77,
"sbo" : 11,
"source" : "Reactome:177936",
"target" : "Reactome:180331"
},
{
"id" : 78,
"sbo" : 15,
"source" : "MAP:C3",
"target" : "MAN:R28"
},
{
"id" : 79,
"sbo" : 15,
"source" : "MAP:C2",
"target" : "MAN:R28"
},
{
"id" : 80,
"sbo" : 15,
"source" : "Reactome:109783",
"target" : "MAN:R28"
},
{
"id" : 81,
"sbo" : 11,
"source" : "MAN:R28",
"target" : "MAN:C10"
},
{
"id" : 82,
"sbo" : 15,
"source" : "Reactome:179847",
"target" : "Reactome:177922"
},
{
"id" : 83,
"sbo" : 11,
"source" : "Reactome:177922",
"target" : "Reactome:179845"
},
{
"id" : 84,
"sbo" : 15,
"source" : "Reactome:109838",
"target" : "Reactome:109860"
},
{
"id" : 85,
"sbo" : 15,
"source" : "MAP:Cs56-65-5_CY_Reactome:109860",
"target" : "Reactome:109860"
},
{
"id" : 86,
"sbo" : 11,
"source" : "Reactome:109860",
"target" : "MAP:Cb16761_CY_Reactome:109860"
},
{
"id" : 87,
"sbo" : 11,
"source" : "Reactome:109860",
"target" : "Reactome:109843"
},
{
"id" : 88,
"sbo" : 13,
"source" : "Reactome:109838",
"target" : "Reactome:109860"
},
{
"id" : 89,
"sbo" : 20,
"source" : "Reactome:112340",
"target" : "Reactome:109860"
},
{
"id" : 90,
"sbo" : 15,
"source" : "MAP:Cx114",
"target" : "Reactome:177943"
},
{
"id" : 91,
"sbo" : 15,
"source" : "Reactome:179882",
"target" : "Reactome:177943"
},
{
"id" : 92,
"sbo" : 11,
"source" : "Reactome:177943",
"target" : "Reactome:179820"
},
{
"id" : 93,
"sbo" : 15,
"source" : "MAP:UP27361_CY_pho202pho204",
"target" : "Reactome:109865"
},
{
"id" : 94,
"sbo" : 11,
"source" : "Reactome:109865",
"target" : "Reactome:109844"
},
{
"id" : 95,
"sbo" : 15,
"source" : "Reactome:179882",
"target" : "Reactome:177925"
},
{
"id" : 96,
"sbo" : 15,
"source" : "MAP:UP29353_CY",
"target" : "Reactome:177925"
},
{
"id" : 97,
"sbo" : 11,
"source" : "Reactome:177925",
"target" : "Reactome:180301"
},
{
"id" : 98,
"sbo" : 15,
"source" : "Reactome:109789",
"target" : "Reactome:109829"
},
{
"id" : 99,
"sbo" : 15,
"source" : "MAP:Cs56-65-5_CY_Reactome:109829",
"target" : "Reactome:109829"
},
{
"id" : 100,
"sbo" : 11,
"source" : "Reactome:109829",
"target" : "MAP:Cb16761_CY_Reactome:109829"
},
{
"id" : 101,
"sbo" : 11,
"source" : "Reactome:109829",
"target" : "Reactome:109793"
},
{
"id" : 102,
"sbo" : 13,
"source" : "Reactome:163338",
"target" : "Reactome:109829"
},
{
"id" : 103,
"sbo" : 15,
"source" : "MAP:UP27361_CY",
"target" : "Reactome:109857"
},
{
"id" : 104,
"sbo" : 15,
"source" : "MAP:UQ02750_CY_pho218pho222",
"target" : "Reactome:109857"
},
{
"id" : 105,
"sbo" : 11,
"source" : "Reactome:109857",
"target" : "Reactome:109838"
},
{
"id" : 106,
"sbo" : 15,
"source" : "Reactome:179863",
"target" : "Reactome:177942"
},
{
"id" : 107,
"sbo" : 15,
"source" : "Reactome:179837",
"target" : "Reactome:177942"
},
{
"id" : 108,
"sbo" : 11,
"source" : "Reactome:177942",
"target" : "Reactome:179847"
},
{
"id" : 109,
"sbo" : 20,
"source" : "Reactome:197745",
"target" : "Reactome:177942"
}
],
"nodes" : [
{
"data" : {
"compartment" : "MAP:Plasmamembrane",
"label" : "p21 RAS:GDP",
"modification" : [],
"ref" : "Reactome:109796",
"subnodes" : [
"MAP:Cb17552_CY_Reactome:109796_1",
"Reactome:109782_Reactome:109796_1"
],
"x" : 1889,
"y" : 2293
},
"id" : "Reactome:109796",
"is_abstract" : 0,
"sbo" : 253,
"type" : "Complex"
},
{
"data" : {
"compartment" : "MAP:Plasmamembrane",
"label" : "RAS:RAF:14-3-3",
"modification" : [],
"ref" : "Reactome:109789",
"subnodes" : [
"Reactome:109788_Reactome:109789_1",
"MAP:UP31946_CY_Reactome:109789_1"
],
"x" : 1757,
"y" : 1680
},
"id" : "Reactome:109789",
"is_abstract" : 0,
"sbo" : 253,
"type" : "Complex"
},
{
"data" : {
"compartment" : "MAP:Cytosol",
"label" : "PI3K alpha",
"modification" : [],
"ref" : "MAP:Cx156"
},
"id" : "MAP:Cx156",
"is_abstract" : 1,
"sbo" : 253,
"type" : "Complex"
},
{
"data" : {
"compartment" : "MAP:Plasmamembrane",
"label" : "Activated RAF1 complex",
"modification" : [],
"ref" : "Reactome:109793",
"subnodes" : [
"MAP:UP31946_CY_Reactome:109793_1",
"Reactome:109783_Reactome:109793_1",
"Reactome:109792_Reactome:109793_1"
],
"x" : 2402,
"y" : 1480
},
"id" : "Reactome:109793",
"is_abstract" : 0,
"sbo" : 253,
"type" : "Complex"
},
{
"data" : {
"compartment" : "MAP:Plasmamembrane",
"label" : "EGF:Phospho-EGFR-SHC",
"modification" : [],
"ref" : "Reactome:180301",
"subnodes" : [
"Reactome:179882_Reactome:180301_1",
"MAP:UP29353_CY_Reactome:180301_1"
],
"x" : 1478,
"y" : 2706
},
"id" : "Reactome:180301",
"is_abstract" : 0,
"sbo" : 253,
"type" : "Complex"
},
{
"data" : {
"compartment" : "MAP:Nucleus",
"label" : "phospho-ERK-1 dimer",
"modification" : [],
"ref" : "Reactome:109845",
"subnodes" : [
"Reactome:112359_Reactome:109845_1",
"Reactome:112359_Reactome:109845_2"
],
"x" : 3261,
"y" : 202
},
"id" : "Reactome:109845",
"is_abstract" : 0,
"sbo" : 253,
"type" : "Complex"
},
{
"data" : {
"compartment" : "MAP:Cytosol",
"label" : "GRB2:Phospho-GAB1",
"modification" : [],
"ref" : "Reactome:180304"
},
"id" : "Reactome:180304",
"is_abstract" : 1,
"sbo" : 253,
"type" : "Complex"
},
{
"data" : {
"compartment" : "MAP:Plasmamembrane",
"label" : "EGF:Phospho-EGFR",
"modification" : [],
"ref" : "Reactome:179860"
},
"id" : "Reactome:179860",
"is_abstract" : 1,
"sbo" : 253,
"type" : "Complex"
},
{
"data" : {
"compartment" : "MAP:Plasmamembrane",
"label" : "GAB1:GRB2-EGF-Phospho-EGFR dimer",
"modification" : [],
"ref" : "Reactome:180348",
"subnodes" : [
"Reactome:179882_Reactome:180348_1",
"Reactome:179849_Reactome:180348_1"
],
"x" : 477,
"y" : 2293
},
"id" : "Reactome:180348",
"is_abstract" : 0,
"sbo" : 253,
"type" : "Complex"
},
{
"data" : {
"compartment" : "MAP:Cytosol",
"label" : "phospho-ERK-1:MEK1",
"modification" : [],
"ref" : "Reactome:109843",
"subnodes" : [
"MAP:UP27361_CY_pho202pho204_Reactome:109843_1",
"MAP:UQ02750_CY_pho218pho222_Reactome:109843_1"
],
"x" : 3519,
"y" : 722
},
"id" : "Reactome:109843",
"is_abstract" : 0,
"sbo" : 253,
"type" : "Complex"
},
{
"data" : {
"compartment" : "MAP:Plasmamembrane",
"label" : "RAS:RAF",
"modification" : [],
"ref" : "Reactome:109788",
"subnodes" : [
"MAP:UP04049_CY_pho259pho621_Reactome:109788_1",
"Reactome:109783_Reactome:109788_1"
],
"x" : 1569,
"y" : 1880
},
"id" : "Reactome:109788",
"is_abstract" : 0,
"sbo" : 253,
"type" : "Complex"
},
{
"data" : {
"compartment" : "MAP:Cytosol",
"label" : "GRB2:GAB1",
"modification" : [],
"ref" : "Reactome:179849",
"subnodes" : [
"MAP:UP62993_CY_Reactome:179849_1",
"MAP:UQ13480_CY_Reactome:179849_1"
],
"x" : 686,
"y" : 2506
},
"id" : "Reactome:179849",
"is_abstract" : 0,
"sbo" : 253,
"type" : "Complex"
},
{
"data" : {
"compartment" : "MAP:Plasmamembrane",
"label" : "GRB2:Phospho GAB1-EGF-Phospho-EGFR dimer",
"modification" : [],
"ref" : "Reactome:180286",
"subnodes" : [
"Reactome:180304_Reactome:180286_1",
"Reactome:179882_Reactome:180286_1"
],
"x" : 770,
"y" : 2080
},
"id" : "Reactome:180286",
"is_abstract" : 0,
"sbo" : 253,
"type" : "Complex"
},
{
"data" : {
"compartment" : "MAP:Plasmamembrane",
"label" : "EGF:EGFR dimer",
"modification" : [],
"ref" : "Reactome:179845",
"subnodes" : [
"Reactome:179847_Reactome:179845_1",
"Reactome:179847_Reactome:179845_2"
],
"x" : 1331,
"y" : 3106
},
"id" : "Reactome:179845",
"is_abstract" : 0,
"sbo" : 253,
"type" : "Complex"
},
{
"data" : {
"compartment" : "MAP:Cytosol",
"label" : "phospho-ERK-1 dimer",
"modification" : [],
"ref" : "Reactome:109844",
"subnodes" : [
"MAP:UP27361_CY_pho202pho204_Reactome:109844_1",
"MAP:UP27361_CY_pho202pho204_Reactome:109844_2"
],
"x" : 3261,
"y" : 378
},
"id" : "Reactome:109844",
"is_abstract" : 0,
"sbo" : 253,
"type" : "Complex"
},
{
"data" : {
"compartment" : "MAP:Plasmamembrane",
"label" : "EGF:EGFR",
"modification" : [],
"ref" : "Reactome:179847",
"subnodes" : [
"Reactome:179863_Reactome:179847_1",
"Reactome:179837_Reactome:179847_1"
],
"x" : 1331,
"y" : 3294
},
"id" : "Reactome:179847",
"is_abstract" : 0,
"sbo" : 253,
"type" : "Complex"
},
{
"data" : {
"compartment" : "MAP:Cytosol",
"label" : "GRB2:SOS1",
"modification" : [],
"ref" : "MAP:Cx114",
"subnodes" : [
"MAP:UQ07889_CY_MAP:Cx114_1",
"MAP:UP62993_CY_MAP:Cx114_1"
],
"x" : 1555,
"y" : 2506
},
"id" : "MAP:Cx114",
"is_abstract" : 0,
"sbo" : 253,
"type" : "Complex"
},
{
"data" : {
"compartment" : "MAP:Plasmamembrane",
"label" : "EGF:Phospho-EGFR (Y992, Y1068, Y1086, Y1148, Y1173) dimer",
"modification" : [],
"ref" : "Reactome:179882",
"subnodes" : [
"Reactome:179860_Reactome:179882_1",
"Reactome:179860_Reactome:179882_2"
],
"x" : 967,
"y" : 2906
},
"id" : "Reactome:179882",
"is_abstract" : 0,
"sbo" : 253,
"type" : "Complex"
},
{
"data" : {
"compartment" : "MAP:Cytosol",
"label" : "MEK1:ERK-1",
"modification" : [],
"ref" : "Reactome:109838",
"subnodes" : [
"MAP:UP27361_CY_Reactome:109838_1",
"MAP:UQ02750_CY_pho218pho222_Reactome:109838_1"
],
"x" : 3806,
"y" : 898
},
"id" : "Reactome:109838",
"is_abstract" : 0,
"sbo" : 253,
"type" : "Complex"
},
{
"data" : {
"compartment" : "MAP:Plasmamembrane",
"label" : "RAS:GTP:PI3Ka",
"modification" : [],
"ref" : "MAN:C10",
"subnodes" : [
"MAP:Cx156_MAN:C10_1",
"Reactome:109783_MAN:C10_1"
],
"x" : 1292,
"y" : 1880
},
"id" : "MAN:C10",
"is_abstract" : 0,
"sbo" : 253,
"type" : "Complex"
},
{
"data" : {
"compartment" : "MAP:Cytosol",
"label" : "p-Raf1(S259,S621):14-3-3 protein beta/alpha",
"modification" : [],
"ref" : "Reactome:109787",
"subnodes" : [
"MAP:UP04049_CY_pho259pho621_Reactome:109787_1",
"MAP:UP31946_CY_Reactome:109787_1"
],
"x" : 2423,
"y" : 1680
},
"id" : "Reactome:109787",
"is_abstract" : 0,
"sbo" : 253,
"type" : "Complex"
},
{
"data" : {
"compartment" : "MAP:Plasmamembrane",
"label" : "GRB2:SOS-Phospho-SHC:EGF:Phospho-EGFR dimer",
"modification" : [],
"ref" : "Reactome:180331",
"subnodes" : [
"MAP:Cx114_Reactome:180331_1",
"Reactome:180337_Reactome:180331_1"
],
"x" : 2310,
"y" : 2293
},
"id" : "Reactome:180331",
"is_abstract" : 0,
"sbo" : 253,
"type" : "Complex"
},
{
"data" : {
"compartment" : "MAP:Plasmamembrane",
"label" : "Activated RAF1 complex:MEK2",
"modification" : [],
"ref" : "Reactome:109795",
"subnodes" : [
"Reactome:109793_Reactome:109795_1",
"MAP:UP36507_CY_Reactome:109795_1"
],
"x" : 2070,
"y" : 1267
},
"id" : "Reactome:109795",
"is_abstract" : 0,
"sbo" : 253,
"type" : "Complex"
},
{
"data" : {
"compartment" : "MAP:Cytosol",
"label" : "EGF:Phospho-EGFR-GRB2:GAB1:PI3Kreg:PI3Kcat",
"modification" : [],
"ref" : "Reactome:179791",
"subnodes" : [
"MAP:C3_Reactome:179791_1",
"Reactome:179882_Reactome:179791_1",
"MAP:C2_Reactome:179791_1",
"Reactome:179849_Reactome:179791_1"
],
"x" : 963,
"y" : 1880
},
"id" : "Reactome:179791",
"is_abstract" : 0,
"sbo" : 253,
"type" : "Complex"
},
{
"data" : {
"compartment" : "MAP:Plasmamembrane",
"label" : "Activated RAF1 complex:MEK1",
"modification" : [],
"ref" : "Reactome:109794",
"subnodes" : [
"MAP:UQ02750_CY_Reactome:109794_1",
"Reactome:109793_Reactome:109794_1"
],
"x" : 2762,
"y" : 1267
},
"id" : "Reactome:109794",
"is_abstract" : 0,
"sbo" : 253,
"type" : "Complex"
},
{
"data" : {
"compartment" : "MAP:Plasmamembrane",
"label" : "Activated RAF1 complex:MEK",
"modification" : [],
"ref" : "Reactome:112406",
"subnodes" : [
"Reactome:109793_Reactome:112406_1",
"Reactome:112398_Reactome:112406_1"
],
"x" : 2416,
"y" : 1267
},
"id" : "Reactome:112406",
"is_abstract" : 0,
"sbo" : 253,
"type" : "Complex"
},
{
"data" : {
"compartment" : "MAP:Plasmamembrane",
"label" : "EGF:Phospho-EGFR:Phospho-SHC",
"modification" : [],
"ref" : "Reactome:180337",
"subnodes" : [
"Reactome:180276_Reactome:180337_1",
"Reactome:179882_Reactome:180337_1"
],
"x" : 1945,
"y" : 2506
},
"id" : "Reactome:180337",
"is_abstract" : 0,
"sbo" : 253,
"type" : "Complex"
},
{
"data" : {
"compartment" : "MAP:Plasmamembrane",
"label" : "GRB2:SOS-EGF-Phospho-EGFR dimer",
"modification" : [],
"ref" : "Reactome:179820",
"subnodes" : [
"MAP:Cx114_Reactome:179820_1",
"Reactome:179882_Reactome:179820_1"
],
"x" : 1514,
"y" : 2293
},
"id" : "Reactome:179820",
"is_abstract" : 0,
"sbo" : 253,
"type" : "Complex"
},
{
"data" : {
"compartment" : "MAP:Plasmamembrane",
"label" : "p21 RAS:GTP",
"modification" : [],
"ref" : "Reactome:109783",
"subnodes" : [
"Reactome:109782_Reactome:109783_1",
"MAP:Cb15996_CY_Reactome:109783_1"
],
"x" : 1886,
"y" : 2080
},
"id" : "Reactome:109783",
"is_abstract" : 0,
"sbo" : 253,
"type" : "Complex"
},
{
"data" : {
"compartment" : "MAP:Cytosol",
"label" : "GDP",
"modification" : [],
"ref" : "MAP:Cb17552_CY"
},
"id" : "MAP:Cb17552_CY",
"is_abstract" : 1,
"sbo" : 247,
"type" : "SimpleCompound"
},
{
"data" : {
"compartment" : "MAP:Nucleus",
"label" : "ATP",
"modification" : [],
"ref" : "Reactome:29358"
},
"id" : "Reactome:29358",
"is_abstract" : 1,
"sbo" : 247,
"type" : "SimpleCompound"
},
{
"data" : {
"compartment" : "MAP:Cytosol",
"label" : "ATP",
"modification" : [],
"ref" : "MAP:Cs56-65-5_CY"
},
"id" : "MAP:Cs56-65-5_CY",
"is_abstract" : 1,
"sbo" : 247,
"type" : "SimpleCompound"
},
{
"data" : {
"compartment" : "MAP:Plasmamembrane",
"label" : "Phosphatidylinositol-4,5-bisphosphate",
"modification" : [],
"ref" : "Reactome:179856",
"x" : 543,
"y" : 1880
},
"id" : "Reactome:179856",
"is_abstract" : 0,
"sbo" : 247,
"type" : "SimpleCompound"
},
{
"data" : {
"compartment" : "MAP:Cytosol",
"label" : "ADP",
"modification" : [],
"ref" : "MAP:Cb16761_CY"
},
"id" : "MAP:Cb16761_CY",
"is_abstract" : 1,
"sbo" : 247,
"type" : "SimpleCompound"
},
{
"data" : {
"compartment" : "MAP:Nucleus",
"label" : "ADP",
"modification" : [],
"ref" : "Reactome:113582"
},
"id" : "Reactome:113582",
"is_abstract" : 1,
"sbo" : 247,
"type" : "SimpleCompound"
},
{
"data" : {
"compartment" : "MAP:Cytosol",
"label" : "GTP",
"modification" : [],
"ref" : "MAP:Cb15996_CY"
},
"id" : "MAP:Cb15996_CY",
"is_abstract" : 1,
"sbo" : 247,
"type" : "SimpleCompound"
},
{
"data" : {
"compartment" : "MAP:Plasmamembrane",
"label" : "Phosphatidylinositol-3,4,5-trisphosphate",
"modification" : [],
"ref" : "Reactome:179838",
"x" : 733,
"y" : 1680
},
"id" : "Reactome:179838",
"is_abstract" : 0,
"sbo" : 247,
"type" : "SimpleCompound"
},
{
"data" : {
"compartment" : "MAP:Nucleus",
"label" : "Phospho-ELK1",
"modification" : [],
"ref" : "Reactome:198666",
"x" : 3722,
"y" : 30
},
"id" : "Reactome:198666",
"is_abstract" : 0,
"sbo" : 240,
"type" : "Compound"
},
{
"data" : {
"compartment" : "MAP:Plasmamembrane",
"label" : "p21 RAS",
"modification" : [],
"ref" : "Reactome:109782"
},
"id" : "Reactome:109782",
"is_abstract" : 1,
"sbo" : 240,
"type" : "Compound"
},
{
"data" : {
"compartment" : "MAP:Nucleus",
"label" : "ELK1",
"modification" : [],
"ref" : "Reactome:198710",
"x" : 3556,
"y" : 202
},
"id" : "Reactome:198710",
"is_abstract" : 0,
"sbo" : 240,
"type" : "Compound"
},
{
"data" : {
"compartment" : "MAP:Cytosol",
"label" : "MEK",
"modification" : [],
"ref" : "Reactome:112398"
},
"id" : "Reactome:112398",
"is_abstract" : 1,
"sbo" : 240,
"type" : "Compound"
},
{
"data" : {
"compartment" : "MAP:Cytosol",
"label" : "phospho_MEK1",
"modification" : [],
"ref" : "Reactome:112340",
"x" : 3186,
"y" : 898
},
"id" : "Reactome:112340",
"is_abstract" : 0,
"sbo" : 240,
"type" : "Compound"
},
{
"data" : {
"compartment" : "MAP:Cytosol",
"label" : "phospho-MEK2",
"modification" : [
[
216,
null
],
[
216,
null
]
],
"ref" : "Reactome:109848",
"x" : 2325,
"y" : 1070
},
"id" : "Reactome:109848",
"is_abstract" : 0,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"compartment" : "MAP:Plasmamembrane",
"label" : "Transforming protein N-Ras",
"modification" : [],
"ref" : "MAP:C79"
},
"id" : "MAP:C79",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"compartment" : "MAP:Nucleus",
"label" : "phospho-ERK-1",
"modification" : [
[
216,
"202"
],
[
216,
"204"
]
],
"ref" : "Reactome:112359"
},
"id" : "Reactome:112359",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"compartment" : "MAP:Cytosol",
"label" : "YWHAB()",
"modification" : [],
"ref" : "MAP:UP31946_CY",
"x" : 1887,
"y" : 1880
},
"id" : "MAP:UP31946_CY",
"is_abstract" : 0,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"compartment" : "MAP:Cytosol",
"label" : "Phospho-SHC transforming protein",
"modification" : [
[
216,
"349"
],
[
216,
"350"
]
],
"ref" : "Reactome:180276"
},
"id" : "Reactome:180276",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"compartment" : "MAP:Plasmamembrane",
"label" : "K-RAS isoform 2A",
"modification" : [],
"ref" : "MAP:UP01116_"
},
"id" : "MAP:UP01116_",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"compartment" : "MAP:Cytosol",
"label" : "phospho-MEK1",
"modification" : [
[
216,
"286"
],
[
216,
"292"
]
],
"ref" : "Reactome:112374"
},
"id" : "Reactome:112374",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"compartment" : "MAP:Cytosol",
"label" : "Son of sevenless protein homolog 1",
"modification" : [],
"ref" : "MAP:UQ07889_CY"
},
"id" : "MAP:UQ07889_CY",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"compartment" : "MAP:Nucleus",
"label" : "ETS-domain protein Elk-1-1",
"modification" : [],
"ref" : "MAP:UP19419_NU(1-428)"
},
"id" : "MAP:UP19419_NU(1-428)",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"compartment" : "MAP:Cytosol",
"label" : "SHC",
"modification" : [],
"ref" : "MAP:UP29353_CY",
"x" : 1370,
"y" : 2906
},
"id" : "MAP:UP29353_CY",
"is_abstract" : 0,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"compartment" : "MAP:Cytosol",
"label" : "MEK1",
"modification" : [],
"ref" : "MAP:UQ02750_CY",
"x" : 2748,
"y" : 1480
},
"id" : "MAP:UQ02750_CY",
"is_abstract" : 0,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"compartment" : "MAP:Cytosol",
"label" : "GRB2()",
"modification" : [],
"ref" : "MAP:UP62993_CY"
},
"id" : "MAP:UP62993_CY",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"compartment" : "MAP:Plasmamembrane",
"label" : "cRaf",
"modification" : [
[
216,
"340"
],
[
216,
"621"
],
[
216,
"259"
],
[
216,
"341"
]
],
"ref" : "Reactome:109792"
},
"id" : "Reactome:109792",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"compartment" : "MAP:Cytosol",
"label" : "Phospho-GAB1",
"modification" : [
[
216,
"627"
],
[
216,
"659"
],
[
216,
"447"
],
[
216,
"472"
],
[
216,
"589"
]
],
"ref" : "Reactome:180344"
},
"id" : "Reactome:180344",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"compartment" : "MAP:Plasmamembrane",
"label" : "c-H-ras",
"modification" : [],
"ref" : "MAP:UP01112_PM"
},
"id" : "MAP:UP01112_PM",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"compartment" : "MAP:Plasmamembrane",
"label" : "unidentified protein tyrosine kinase",
"modification" : [],
"ref" : "Reactome:163338",
"x" : 2811,
"y" : 1680
},
"id" : "Reactome:163338",
"is_abstract" : 0,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"compartment" : "MAP:Cytosol",
"label" : "PI3K-p85",
"modification" : [],
"ref" : "MAP:C3",
"x" : 1292,
"y" : 2080
},
"id" : "MAP:C3",
"is_abstract" : 0,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"compartment" : "MAP:Cytosol",
"label" : "RAF1(ph259,ph621)",
"modification" : [
[
216,
"259"
],
[
216,
"621"
]
],
"ref" : "MAP:UP04049_CY_pho259pho621",
"x" : 2294,
"y" : 1880
},
"id" : "MAP:UP04049_CY_pho259pho621",
"is_abstract" : 0,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"compartment" : "MAP:Cytosol",
"label" : "MEK2()",
"modification" : [],
"ref" : "MAP:UP36507_CY",
"x" : 2084,
"y" : 1480
},
"id" : "MAP:UP36507_CY",
"is_abstract" : 0,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"compartment" : "MAP:Cytosol",
"label" : "Activated ERK1",
"modification" : [
[
216,
"202"
],
[
216,
"204"
]
],
"ref" : "MAP:UP27361_CY_pho202pho204",
"x" : 3261,
"y" : 550
},
"id" : "MAP:UP27361_CY_pho202pho204",
"is_abstract" : 0,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"compartment" : "MAP:Extracellular",
"label" : "EGF",
"modification" : [],
"ref" : "Reactome:179863",
"x" : 1331,
"y" : 3466
},
"id" : "Reactome:179863",
"is_abstract" : 0,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"compartment" : "MAP:Cytosol",
"label" : "phospho-MEK1",
"modification" : [
[
216,
"218"
],
[
216,
"222"
]
],
"ref" : "MAP:UQ02750_CY_pho218pho222",
"x" : 3102,
"y" : 1070
},
"id" : "MAP:UQ02750_CY_pho218pho222",
"is_abstract" : 0,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"compartment" : "MAP:Plasmamembrane",
"label" : "EGFR",
"modification" : [],
"ref" : "Reactome:179837",
"x" : 928,
"y" : 3466
},
"id" : "Reactome:179837",
"is_abstract" : 0,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"compartment" : "MAP:Cytosol",
"label" : "GAB1",
"modification" : [],
"ref" : "MAP:UQ13480_CY"
},
"id" : "MAP:UQ13480_CY",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"compartment" : "MAP:Cytosol",
"label" : "phospho-MEK1",
"modification" : [
[
216,
"218"
],
[
216,
"222"
],
[
216,
"286"
],
[
216,
"292"
]
],
"ref" : "Reactome:112339"
},
"id" : "Reactome:112339",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"label" : "SOS1",
"modification" : [],
"ref" : "PID:C200496"
},
"id" : "PID:C200496",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"compartment" : "MAP:Plasmamembrane",
"label" : "Leucine-rich repeats and immunoglobulin-like domains protein 1 precursor",
"modification" : [],
"ref" : "Reactome:197745",
"x" : 1902,
"y" : 3466
},
"id" : "Reactome:197745",
"is_abstract" : 0,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"compartment" : "MAP:Nucleus",
"label" : "Phospho-ETS-domain protein Elk-1-2",
"modification" : [
[
216,
"324"
],
[
216,
"383"
],
[
216,
"389"
],
[
216,
"336"
],
[
216,
"422"
]
],
"ref" : "MAP:UP19419_NU(1-428)_pho324pho336pho383pho389pho422"
},
"id" : "MAP:UP19419_NU(1-428)_pho324pho336pho383pho389pho422",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"compartment" : "MAP:Cytosol",
"label" : "PI3K-p110",
"modification" : [],
"ref" : "MAP:C2",
"x" : 1066,
"y" : 2080
},
"id" : "MAP:C2",
"is_abstract" : 0,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"compartment" : "MAP:Cytosol",
"label" : "ERK1",
"modification" : [],
"ref" : "MAP:UP27361_CY",
"x" : 3707,
"y" : 1070
},
"id" : "MAP:UP27361_CY",
"is_abstract" : 0,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"compartment" : "MAP:Plasmamembrane",
"label" : "Phospho-EGFR",
"modification" : [
[
216,
"1068"
],
[
216,
"1148"
],
[
216,
"1173"
],
[
216,
"1086"
],
[
216,
"992"
]
],
"ref" : "Reactome:179803"
},
"id" : "Reactome:179803",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"label" : "GRB2",
"modification" : [],
"ref" : "PID:C200490"
},
"id" : "PID:C200490",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"label" : null,
"ref" : "Reactome:177938",
"x" : 1569,
"y" : 2180
},
"id" : "Reactome:177938",
"is_abstract" : 0,
"sbo" : 167,
"type" : "Reaction"
},
{
"data" : {
"clone_marker" : "MAP:Cb15996_CY",
"compartment" : "MAP:Cytosol",
"label" : "GTP",
"modification" : [],
"ref" : "MAP:Cb15996_CY",
"x" : 1131,
"y" : 2293
},
"id" : "MAP:Cb15996_CY_Reactome:177938",
"is_abstract" : 0,
"sbo" : 247,
"type" : "SimpleCompound"
},
{
"data" : {
"clone_marker" : "MAP:Cb17552_CY",
"compartment" : "MAP:Cytosol",
"label" : "GDP",
"modification" : [],
"ref" : "MAP:Cb17552_CY",
"x" : 1569,
"y" : 2080
},
"id" : "MAP:Cb17552_CY_Reactome:177938",
"is_abstract" : 0,
"sbo" : 247,
"type" : "SimpleCompound"
},
{
"data" : {
"label" : null,
"ref" : "Reactome:177934",
"x" : 1331,
"y" : 3006
},
"id" : "Reactome:177934",
"is_abstract" : 0,
"sbo" : 167,
"type" : "Reaction"
},
{
"data" : {
"clone_marker" : "MAP:Cs56-65-5_CY",
"compartment" : "MAP:Cytosol",
"label" : "ATP",
"modification" : [],
"ref" : "MAP:Cs56-65-5_CY",
"x" : 1008,
"y" : 3106
},
"id" : "MAP:Cs56-65-5_CY_Reactome:177934",
"is_abstract" : 0,
"sbo" : 247,
"type" : "SimpleCompound"
},
{
"data" : {
"clone_marker" : "MAP:Cb16761_CY",
"compartment" : "MAP:Cytosol",
"label" : "ADP",
"modification" : [],
"ref" : "MAP:Cb16761_CY",
"x" : 1696,
"y" : 2906
},
"id" : "MAP:Cb16761_CY_Reactome:177934",
"is_abstract" : 0,
"sbo" : 247,
"type" : "SimpleCompound"
},
{
"data" : {
"label" : null,
"ref" : "Reactome:109867",
"x" : 3261,
"y" : 290
},
"id" : "Reactome:109867",
"is_abstract" : 0,
"sbo" : 167,
"type" : "Reaction"
},
{
"data" : {
"label" : null,
"ref" : "MAN:R12",
"x" : 3556,
"y" : 114
},
"id" : "MAN:R12",
"is_abstract" : 0,
"sbo" : 167,
"type" : "Reaction"
},
{
"data" : {
"clone_marker" : "Reactome:29358",
"compartment" : "MAP:Nucleus",
"label" : "ATP",
"modification" : [],
"ref" : "Reactome:29358",
"x" : 3881,
"y" : 202
},
"id" : "Reactome:29358_MAN:R12",
"is_abstract" : 0,
"sbo" : 247,
"type" : "SimpleCompound"
},
{
"data" : {
"clone_marker" : "Reactome:113582",
"compartment" : "MAP:Nucleus",
"label" : "ADP",
"modification" : [],
"ref" : "Reactome:113582",
"x" : 3390,
"y" : 30
},
"id" : "Reactome:113582_MAN:R12",
"is_abstract" : 0,
"sbo" : 247,
"type" : "SimpleCompound"
},
{
"data" : {
"label" : null,
"ref" : "Reactome:109841",
"x" : 2716,
"y" : 1154
},
"id" : "Reactome:109841",
"is_abstract" : 0,
"sbo" : 167,
"type" : "Reaction"
},
{
"data" : {
"clone_marker" : "MAP:Cs56-65-5_CY",
"compartment" : "MAP:Cytosol",
"label" : "ATP",
"modification" : [],
"ref" : "MAP:Cs56-65-5_CY",
"x" : 3085,
"y" : 1267
},
"id" : "MAP:Cs56-65-5_CY_Reactome:109841",
"is_abstract" : 0,
"sbo" : 247,
"type" : "SimpleCompound"
},
{
"data" : {
"clone_marker" : "MAP:Cb16761_CY",
"compartment" : "MAP:Cytosol",
"label" : "ADP",
"modification" : [],
"ref" : "MAP:Cb16761_CY",
"x" : 2696,
"y" : 1070
},
"id" : "MAP:Cb16761_CY_Reactome:109841",
"is_abstract" : 0,
"sbo" : 247,
"type" : "SimpleCompound"
},
{
"data" : {
"label" : null,
"ref" : "Reactome:177940",
"x" : 549,
"y" : 2406
},
"id" : "Reactome:177940",
"is_abstract" : 0,
"sbo" : 167,
"type" : "Reaction"
},
{
"data" : {
"label" : null,
"ref" : "Reactome:109802",
"x" : 1757,
"y" : 1780
},
"id" : "Reactome:109802",
"is_abstract" : 0,
"sbo" : 167,
"type" : "Reaction"
},
{
"data" : {
"label" : null,
"ref" : "Reactome:109803",
"x" : 1886,
"y" : 1980
},
"id" : "Reactome:109803",
"is_abstract" : 0,
"sbo" : 167,
"type" : "Reaction"
},
{
"data" : {
"label" : null,
"ref" : "Reactome:177930",
"x" : 477,
"y" : 2180
},
"id" : "Reactome:177930",
"is_abstract" : 0,
"sbo" : 167,
"type" : "Reaction"
},
{
"data" : {
"clone_marker" : "MAP:Cs56-65-5_CY",
"compartment" : "MAP:Cytosol",
"label" : "ATP",
"modification" : [],
"ref" : "MAP:Cs56-65-5_CY",
"x" : 800,
"y" : 2293
},
"id" : "MAP:Cs56-65-5_CY_Reactome:177930",
"is_abstract" : 0,
"sbo" : 247,
"type" : "SimpleCompound"
},
{
"data" : {
"clone_marker" : "MAP:Cb16761_CY",
"compartment" : "MAP:Cytosol",
"label" : "ADP",
"modification" : [],
"ref" : "MAP:Cb16761_CY",
"x" : 425,
"y" : 2080
},
"id" : "MAP:Cb16761_CY_Reactome:177930",
"is_abstract" : 0,
"sbo" : 247,
"type" : "SimpleCompound"
},
{
"data" : {
"label" : null,
"ref" : "Reactome:177945",
"x" : 2256,
"y" : 2180
},
"id" : "Reactome:177945",
"is_abstract" : 0,
"sbo" : 167,
"type" : "Reaction"
},
{
"data" : {
"clone_marker" : "MAP:Cb15996_CY",
"compartment" : "MAP:Cytosol",
"label" : "GTP",
"modification" : [],
"ref" : "MAP:Cb15996_CY",
"x" : 2739,
"y" : 2293
},
"id" : "MAP:Cb15996_CY_Reactome:177945",
"is_abstract" : 0,
"sbo" : 247,
"type" : "SimpleCompound"
},
{
"data" : {
"clone_marker" : "MAP:Cb17552_CY",
"compartment" : "MAP:Cytosol",
"label" : "GDP",
"modification" : [],
"ref" : "MAP:Cb17552_CY",
"x" : 2256,
"y" : 2080
},
"id" : "MAP:Cb17552_CY_Reactome:177945",
"is_abstract" : 0,
"sbo" : 247,
"type" : "SimpleCompound"
},
{
"data" : {
"label" : null,
"ref" : "MAN:R1",
"x" : 2084,
"y" : 1380
},
"id" : "MAN:R1",
"is_abstract" : 0,
"sbo" : 167,
"type" : "Reaction"
},
{
"data" : {
"label" : null,
"ref" : "Reactome:109863",
"x" : 3261,
"y" : 634
},
"id" : "Reactome:109863",
"is_abstract" : 0,
"sbo" : 167,
"type" : "Reaction"
},
{
"data" : {
"label" : null,
"ref" : "Reactome:177933",
"x" : 1478,
"y" : 2606
},
"id" : "Reactome:177933",
"is_abstract" : 0,
"sbo" : 167,
"type" : "Reaction"
},
{
"data" : {
"clone_marker" : "MAP:Cs56-65-5_CY",
"compartment" : "MAP:Cytosol",
"label" : "ATP",
"modification" : [],
"ref" : "MAP:Cs56-65-5_CY",
"x" : 1155,
"y" : 2706
},
"id" : "MAP:Cs56-65-5_CY_Reactome:177933",
"is_abstract" : 0,
"sbo" : 247,
"type" : "SimpleCompound"
},
{
"data" : {
"clone_marker" : "MAP:Cb16761_CY",
"compartment" : "MAP:Cytosol",
"label" : "ADP",
"modification" : [],
"ref" : "MAP:Cb16761_CY",
"x" : 1221,
"y" : 2506
},
"id" : "MAP:Cb16761_CY_Reactome:177933",
"is_abstract" : 0,
"sbo" : 247,
"type" : "SimpleCompound"
},
{
"data" : {
"label" : null,
"ref" : "MAN:R2",
"x" : 2748,
"y" : 1380
},
"id" : "MAN:R2",
"is_abstract" : 0,
"sbo" : 167,
"type" : "Reaction"
},
{
"data" : {
"label" : null,
"ref" : "Reactome:109804",
"x" : 2294,
"y" : 1780
},
"id" : "Reactome:109804",
"is_abstract" : 0,
"sbo" : 167,
"type" : "Reaction"
},
{
"data" : {
"label" : null,
"ref" : "Reactome:109852",
"x" : 2080,
"y" : 1154
},
"id" : "Reactome:109852",
"is_abstract" : 0,
"sbo" : 167,
"type" : "Reaction"
},
{
"data" : {
"clone_marker" : "MAP:Cs56-65-5_CY",
"compartment" : "MAP:Cytosol",
"label" : "ATP",
"modification" : [],
"ref" : "MAP:Cs56-65-5_CY",
"x" : 1747,
"y" : 1267
},
"id" : "MAP:Cs56-65-5_CY_Reactome:109852",
"is_abstract" : 0,
"sbo" : 247,
"type" : "SimpleCompound"
},
{
"data" : {
"clone_marker" : "MAP:Cb16761_CY",
"compartment" : "MAP:Cytosol",
"label" : "ADP",
"modification" : [],
"ref" : "MAP:Cb16761_CY",
"x" : 1999,
"y" : 1070
},
"id" : "MAP:Cb16761_CY_Reactome:109852",
"is_abstract" : 0,
"sbo" : 247,
"type" : "SimpleCompound"
},
{
"data" : {
"label" : null,
"ref" : "Reactome:177939",
"x" : 543,
"y" : 1780
},
"id" : "Reactome:177939",
"is_abstract" : 0,
"sbo" : 167,
"type" : "Reaction"
},
{
"data" : {
"clone_marker" : "MAP:Cs56-65-5_CY",
"compartment" : "MAP:Cytosol",
"label" : "ATP",
"modification" : [],
"ref" : "MAP:Cs56-65-5_CY",
"x" : 160,
"y" : 1880
},
"id" : "MAP:Cs56-65-5_CY_Reactome:177939",
"is_abstract" : 0,
"sbo" : 247,
"type" : "SimpleCompound"
},
{
"data" : {
"clone_marker" : "MAP:Cb16761_CY",
"compartment" : "MAP:Cytosol",
"label" : "ADP",
"modification" : [],
"ref" : "MAP:Cb16761_CY",
"x" : 354,
"y" : 1680
},
"id" : "MAP:Cb16761_CY_Reactome:177939",
"is_abstract" : 0,
"sbo" : 247,
"type" : "SimpleCompound"
},
{
"data" : {
"label" : null,
"ref" : "MAN:R25",
"x" : 1014,
"y" : 1980
},
"id" : "MAN:R25",
"is_abstract" : 0,
"sbo" : 167,
"type" : "Reaction"
},
{
"data" : {
"label" : null,
"ref" : "Reactome:177936",
"x" : 1945,
"y" : 2406
},
"id" : "Reactome:177936",
"is_abstract" : 0,
"sbo" : 167,
"type" : "Reaction"
},
{
"data" : {
"label" : null,
"ref" : "MAN:R28",
"x" : 1292,
"y" : 1980
},
"id" : "MAN:R28",
"is_abstract" : 0,
"sbo" : 167,
"type" : "Reaction"
},
{
"data" : {
"label" : null,
"ref" : "Reactome:177922",
"x" : 1331,
"y" : 3206
},
"id" : "Reactome:177922",
"is_abstract" : 0,
"sbo" : 167,
"type" : "Reaction"
},
{
"data" : {
"label" : null,
"ref" : "Reactome:109860",
"x" : 3519,
"y" : 810
},
"id" : "Reactome:109860",
"is_abstract" : 0,
"sbo" : 167,
"type" : "Reaction"
},
{
"data" : {
"clone_marker" : "MAP:Cs56-65-5_CY",
"compartment" : "MAP:Cytosol",
"label" : "ATP",
"modification" : [],
"ref" : "MAP:Cs56-65-5_CY",
"x" : 3519,
"y" : 898
},
"id" : "MAP:Cs56-65-5_CY_Reactome:109860",
"is_abstract" : 0,
"sbo" : 247,
"type" : "SimpleCompound"
},
{
"data" : {
"clone_marker" : "MAP:Cb16761_CY",
"compartment" : "MAP:Cytosol",
"label" : "ADP",
"modification" : [],
"ref" : "MAP:Cb16761_CY",
"x" : 3228,
"y" : 722
},
"id" : "MAP:Cb16761_CY_Reactome:109860",
"is_abstract" : 0,
"sbo" : 247,
"type" : "SimpleCompound"
},
{
"data" : {
"label" : null,
"ref" : "Reactome:177943",
"x" : 1514,
"y" : 2406
},
"id" : "Reactome:177943",
"is_abstract" : 0,
"sbo" : 167,
"type" : "Reaction"
},
{
"data" : {
"label" : null,
"ref" : "Reactome:109865",
"x" : 3261,
"y" : 466
},
"id" : "Reactome:109865",
"is_abstract" : 0,
"sbo" : 167,
"type" : "Reaction"
},
{
"data" : {
"label" : null,
"ref" : "Reactome:177925",
"x" : 1370,
"y" : 2806
},
"id" : "Reactome:177925",
"is_abstract" : 0,
"sbo" : 167,
"type" : "Reaction"
},
{
"data" : {
"label" : null,
"ref" : "Reactome:109829",
"x" : 2080,
"y" : 1580
},
"id" : "Reactome:109829",
"is_abstract" : 0,
"sbo" : 167,
"type" : "Reaction"
},
{
"data" : {
"clone_marker" : "MAP:Cs56-65-5_CY",
"compartment" : "MAP:Cytosol",
"label" : "ATP",
"modification" : [],
"ref" : "MAP:Cs56-65-5_CY",
"x" : 2080,
"y" : 1680
},
"id" : "MAP:Cs56-65-5_CY_Reactome:109829",
"is_abstract" : 0,
"sbo" : 247,
"type" : "SimpleCompound"
},
{
"data" : {
"clone_marker" : "MAP:Cb16761_CY",
"compartment" : "MAP:Cytosol",
"label" : "ADP",
"modification" : [],
"ref" : "MAP:Cb16761_CY",
"x" : 1758,
"y" : 1480
},
"id" : "MAP:Cb16761_CY_Reactome:109829",
"is_abstract" : 0,
"sbo" : 247,
"type" : "SimpleCompound"
},
{
"data" : {
"label" : null,
"ref" : "Reactome:109857",
"x" : 3707,
"y" : 986
},
"id" : "Reactome:109857",
"is_abstract" : 0,
"sbo" : 167,
"type" : "Reaction"
},
{
"data" : {
"label" : null,
"ref" : "Reactome:177942",
"x" : 1331,
"y" : 3382
},
"id" : "Reactome:177942",
"is_abstract" : 0,
"sbo" : 167,
"type" : "Reaction"
},
{
"data" : {
"clone_marker" : "Reactome:109788",
"compartment" : "MAP:Plasmamembrane",
"label" : "RAS:RAF",
"modification" : [],
"ref" : "Reactome:109788",
"subnodes" : [
"MAP:UP04049_CY_pho259pho621_Reactome:109788_Reactome:109789_1_1",
"Reactome:109783_Reactome:109788_Reactome:109789_1_1"
]
},
"id" : "Reactome:109788_Reactome:109789_1",
"is_abstract" : 1,
"sbo" : 253,
"type" : "Complex"
},
{
"data" : {
"clone_marker" : "MAP:UP31946_CY",
"compartment" : "MAP:Cytosol",
"label" : "YWHAB()",
"modification" : [],
"ref" : "MAP:UP31946_CY"
},
"id" : "MAP:UP31946_CY_Reactome:109789_1",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"clone_marker" : "MAP:Cb17552_CY",
"compartment" : "MAP:Cytosol",
"label" : "GDP",
"modification" : [],
"ref" : "MAP:Cb17552_CY"
},
"id" : "MAP:Cb17552_CY_Reactome:109796_1",
"is_abstract" : 1,
"sbo" : 247,
"type" : "SimpleCompound"
},
{
"data" : {
"clone_marker" : "Reactome:109782",
"compartment" : "MAP:Plasmamembrane",
"label" : "p21 RAS",
"modification" : [],
"ref" : "Reactome:109782"
},
"id" : "Reactome:109782_Reactome:109796_1",
"is_abstract" : 1,
"sbo" : 240,
"type" : "Compound"
},
{
"data" : {
"clone_marker" : "MAP:UP31946_CY",
"compartment" : "MAP:Cytosol",
"label" : "YWHAB()",
"modification" : [],
"ref" : "MAP:UP31946_CY"
},
"id" : "MAP:UP31946_CY_Reactome:109793_1",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"clone_marker" : "Reactome:109783",
"compartment" : "MAP:Plasmamembrane",
"label" : "p21 RAS:GTP",
"modification" : [],
"ref" : "Reactome:109783",
"subnodes" : [
"Reactome:109782_Reactome:109783_Reactome:109793_1_1",
"MAP:Cb15996_CY_Reactome:109783_Reactome:109793_1_1"
]
},
"id" : "Reactome:109783_Reactome:109793_1",
"is_abstract" : 1,
"sbo" : 253,
"type" : "Complex"
},
{
"data" : {
"clone_marker" : "Reactome:109792",
"compartment" : "MAP:Plasmamembrane",
"label" : "cRaf",
"modification" : [
[
216,
"340"
],
[
216,
"621"
],
[
216,
"259"
],
[
216,
"341"
]
],
"ref" : "Reactome:109792"
},
"id" : "Reactome:109792_Reactome:109793_1",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"clone_marker" : "Reactome:179882",
"compartment" : "MAP:Plasmamembrane",
"label" : "EGF:Phospho-EGFR (Y992, Y1068, Y1086, Y1148, Y1173) dimer",
"modification" : [],
"ref" : "Reactome:179882",
"subnodes" : [
"Reactome:179860_Reactome:179882_Reactome:180301_1_1",
"Reactome:179860_Reactome:179882_Reactome:180301_1_2"
]
},
"id" : "Reactome:179882_Reactome:180301_1",
"is_abstract" : 1,
"sbo" : 253,
"type" : "Complex"
},
{
"data" : {
"clone_marker" : "MAP:UP29353_CY",
"compartment" : "MAP:Cytosol",
"label" : "SHC",
"modification" : [],
"ref" : "MAP:UP29353_CY"
},
"id" : "MAP:UP29353_CY_Reactome:180301_1",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"clone_marker" : "Reactome:112359",
"compartment" : "MAP:Nucleus",
"label" : "phospho-ERK-1",
"modification" : [
[
216,
"202"
],
[
216,
"204"
]
],
"ref" : "Reactome:112359"
},
"id" : "Reactome:112359_Reactome:109845_1",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"clone_marker" : "Reactome:112359",
"compartment" : "MAP:Nucleus",
"label" : "phospho-ERK-1",
"modification" : [
[
216,
"202"
],
[
216,
"204"
]
],
"ref" : "Reactome:112359"
},
"id" : "Reactome:112359_Reactome:109845_2",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"clone_marker" : "Reactome:179882",
"compartment" : "MAP:Plasmamembrane",
"label" : "EGF:Phospho-EGFR (Y992, Y1068, Y1086, Y1148, Y1173) dimer",
"modification" : [],
"ref" : "Reactome:179882",
"subnodes" : [
"Reactome:179860_Reactome:179882_Reactome:180348_1_1",
"Reactome:179860_Reactome:179882_Reactome:180348_1_2"
]
},
"id" : "Reactome:179882_Reactome:180348_1",
"is_abstract" : 1,
"sbo" : 253,
"type" : "Complex"
},
{
"data" : {
"clone_marker" : "Reactome:179849",
"compartment" : "MAP:Cytosol",
"label" : "GRB2:GAB1",
"modification" : [],
"ref" : "Reactome:179849",
"subnodes" : [
"MAP:UP62993_CY_Reactome:179849_Reactome:180348_1_1",
"MAP:UQ13480_CY_Reactome:179849_Reactome:180348_1_1"
]
},
"id" : "Reactome:179849_Reactome:180348_1",
"is_abstract" : 1,
"sbo" : 253,
"type" : "Complex"
},
{
"data" : {
"clone_marker" : "MAP:UP27361_CY_pho202pho204",
"compartment" : "MAP:Cytosol",
"label" : "Activated ERK1",
"modification" : [
[
216,
"202"
],
[
216,
"204"
]
],
"ref" : "MAP:UP27361_CY_pho202pho204"
},
"id" : "MAP:UP27361_CY_pho202pho204_Reactome:109843_1",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"clone_marker" : "MAP:UQ02750_CY_pho218pho222",
"compartment" : "MAP:Cytosol",
"label" : "phospho-MEK1",
"modification" : [
[
216,
"218"
],
[
216,
"222"
]
],
"ref" : "MAP:UQ02750_CY_pho218pho222"
},
"id" : "MAP:UQ02750_CY_pho218pho222_Reactome:109843_1",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"clone_marker" : "MAP:UP04049_CY_pho259pho621",
"compartment" : "MAP:Cytosol",
"label" : "RAF1(ph259,ph621)",
"modification" : [
[
216,
"259"
],
[
216,
"621"
]
],
"ref" : "MAP:UP04049_CY_pho259pho621"
},
"id" : "MAP:UP04049_CY_pho259pho621_Reactome:109788_1",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"clone_marker" : "Reactome:109783",
"compartment" : "MAP:Plasmamembrane",
"label" : "p21 RAS:GTP",
"modification" : [],
"ref" : "Reactome:109783",
"subnodes" : [
"Reactome:109782_Reactome:109783_Reactome:109788_1_1",
"MAP:Cb15996_CY_Reactome:109783_Reactome:109788_1_1"
]
},
"id" : "Reactome:109783_Reactome:109788_1",
"is_abstract" : 1,
"sbo" : 253,
"type" : "Complex"
},
{
"data" : {
"clone_marker" : "MAP:UP62993_CY",
"compartment" : "MAP:Cytosol",
"label" : "GRB2()",
"modification" : [],
"ref" : "MAP:UP62993_CY"
},
"id" : "MAP:UP62993_CY_Reactome:179849_1",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"clone_marker" : "MAP:UQ13480_CY",
"compartment" : "MAP:Cytosol",
"label" : "GAB1",
"modification" : [],
"ref" : "MAP:UQ13480_CY"
},
"id" : "MAP:UQ13480_CY_Reactome:179849_1",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"clone_marker" : "Reactome:180304",
"compartment" : "MAP:Cytosol",
"label" : "GRB2:Phospho-GAB1",
"modification" : [],
"ref" : "Reactome:180304",
"subnodes" : [
"MAP:UP62993_CY_Reactome:180304_Reactome:180286_1_1",
"Reactome:180344_Reactome:180304_Reactome:180286_1_1"
]
},
"id" : "Reactome:180304_Reactome:180286_1",
"is_abstract" : 1,
"sbo" : 253,
"type" : "Complex"
},
{
"data" : {
"clone_marker" : "Reactome:179882",
"compartment" : "MAP:Plasmamembrane",
"label" : "EGF:Phospho-EGFR (Y992, Y1068, Y1086, Y1148, Y1173) dimer",
"modification" : [],
"ref" : "Reactome:179882",
"subnodes" : [
"Reactome:179860_Reactome:179882_Reactome:180286_1_1",
"Reactome:179860_Reactome:179882_Reactome:180286_1_2"
]
},
"id" : "Reactome:179882_Reactome:180286_1",
"is_abstract" : 1,
"sbo" : 253,
"type" : "Complex"
},
{
"data" : {
"clone_marker" : "Reactome:179847",
"compartment" : "MAP:Plasmamembrane",
"label" : "EGF:EGFR",
"modification" : [],
"ref" : "Reactome:179847",
"subnodes" : [
"Reactome:179863_Reactome:179847_Reactome:179845_1_1",
"Reactome:179837_Reactome:179847_Reactome:179845_1_1"
]
},
"id" : "Reactome:179847_Reactome:179845_1",
"is_abstract" : 1,
"sbo" : 253,
"type" : "Complex"
},
{
"data" : {
"clone_marker" : "Reactome:179847",
"compartment" : "MAP:Plasmamembrane",
"label" : "EGF:EGFR",
"modification" : [],
"ref" : "Reactome:179847",
"subnodes" : [
"Reactome:179863_Reactome:179847_Reactome:179845_2_1",
"Reactome:179837_Reactome:179847_Reactome:179845_2_1"
]
},
"id" : "Reactome:179847_Reactome:179845_2",
"is_abstract" : 1,
"sbo" : 253,
"type" : "Complex"
},
{
"data" : {
"clone_marker" : "MAP:UP27361_CY_pho202pho204",
"compartment" : "MAP:Cytosol",
"label" : "Activated ERK1",
"modification" : [
[
216,
"202"
],
[
216,
"204"
]
],
"ref" : "MAP:UP27361_CY_pho202pho204"
},
"id" : "MAP:UP27361_CY_pho202pho204_Reactome:109844_1",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"clone_marker" : "MAP:UP27361_CY_pho202pho204",
"compartment" : "MAP:Cytosol",
"label" : "Activated ERK1",
"modification" : [
[
216,
"202"
],
[
216,
"204"
]
],
"ref" : "MAP:UP27361_CY_pho202pho204"
},
"id" : "MAP:UP27361_CY_pho202pho204_Reactome:109844_2",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"clone_marker" : "MAP:UQ07889_CY",
"compartment" : "MAP:Cytosol",
"label" : "Son of sevenless protein homolog 1",
"modification" : [],
"ref" : "MAP:UQ07889_CY"
},
"id" : "MAP:UQ07889_CY_MAP:Cx114_1",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"clone_marker" : "MAP:UP62993_CY",
"compartment" : "MAP:Cytosol",
"label" : "GRB2()",
"modification" : [],
"ref" : "MAP:UP62993_CY"
},
"id" : "MAP:UP62993_CY_MAP:Cx114_1",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"clone_marker" : "Reactome:179863",
"compartment" : "MAP:Extracellular",
"label" : "EGF",
"modification" : [],
"ref" : "Reactome:179863"
},
"id" : "Reactome:179863_Reactome:179847_1",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"clone_marker" : "Reactome:179837",
"compartment" : "MAP:Plasmamembrane",
"label" : "EGFR",
"modification" : [],
"ref" : "Reactome:179837"
},
"id" : "Reactome:179837_Reactome:179847_1",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"clone_marker" : "MAP:UP27361_CY",
"compartment" : "MAP:Cytosol",
"label" : "ERK1",
"modification" : [],
"ref" : "MAP:UP27361_CY"
},
"id" : "MAP:UP27361_CY_Reactome:109838_1",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"clone_marker" : "MAP:UQ02750_CY_pho218pho222",
"compartment" : "MAP:Cytosol",
"label" : "phospho-MEK1",
"modification" : [
[
216,
"218"
],
[
216,
"222"
]
],
"ref" : "MAP:UQ02750_CY_pho218pho222"
},
"id" : "MAP:UQ02750_CY_pho218pho222_Reactome:109838_1",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"clone_marker" : "Reactome:179860",
"compartment" : "MAP:Plasmamembrane",
"label" : "EGF:Phospho-EGFR",
"modification" : [],
"ref" : "Reactome:179860",
"subnodes" : [
"Reactome:179863_Reactome:179860_Reactome:179882_1_1",
"Reactome:179803_Reactome:179860_Reactome:179882_1_1"
]
},
"id" : "Reactome:179860_Reactome:179882_1",
"is_abstract" : 1,
"sbo" : 253,
"type" : "Complex"
},
{
"data" : {
"clone_marker" : "Reactome:179860",
"compartment" : "MAP:Plasmamembrane",
"label" : "EGF:Phospho-EGFR",
"modification" : [],
"ref" : "Reactome:179860",
"subnodes" : [
"Reactome:179863_Reactome:179860_Reactome:179882_2_1",
"Reactome:179803_Reactome:179860_Reactome:179882_2_1"
]
},
"id" : "Reactome:179860_Reactome:179882_2",
"is_abstract" : 1,
"sbo" : 253,
"type" : "Complex"
},
{
"data" : {
"clone_marker" : "MAP:UP04049_CY_pho259pho621",
"compartment" : "MAP:Cytosol",
"label" : "RAF1(ph259,ph621)",
"modification" : [
[
216,
"259"
],
[
216,
"621"
]
],
"ref" : "MAP:UP04049_CY_pho259pho621"
},
"id" : "MAP:UP04049_CY_pho259pho621_Reactome:109787_1",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"clone_marker" : "MAP:UP31946_CY",
"compartment" : "MAP:Cytosol",
"label" : "YWHAB()",
"modification" : [],
"ref" : "MAP:UP31946_CY"
},
"id" : "MAP:UP31946_CY_Reactome:109787_1",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"clone_marker" : "MAP:Cx156",
"compartment" : "MAP:Cytosol",
"label" : "PI3K alpha",
"modification" : [],
"ref" : "MAP:Cx156",
"subnodes" : [
"MAP:C3_MAP:Cx156_MAN:C10_1_1",
"MAP:C2_MAP:Cx156_MAN:C10_1_1"
]
},
"id" : "MAP:Cx156_MAN:C10_1",
"is_abstract" : 1,
"sbo" : 253,
"type" : "Complex"
},
{
"data" : {
"clone_marker" : "Reactome:109783",
"compartment" : "MAP:Plasmamembrane",
"label" : "p21 RAS:GTP",
"modification" : [],
"ref" : "Reactome:109783",
"subnodes" : [
"Reactome:109782_Reactome:109783_MAN:C10_1_1",
"MAP:Cb15996_CY_Reactome:109783_MAN:C10_1_1"
]
},
"id" : "Reactome:109783_MAN:C10_1",
"is_abstract" : 1,
"sbo" : 253,
"type" : "Complex"
},
{
"data" : {
"clone_marker" : "Reactome:109793",
"compartment" : "MAP:Plasmamembrane",
"label" : "Activated RAF1 complex",
"modification" : [],
"ref" : "Reactome:109793",
"subnodes" : [
"MAP:UP31946_CY_Reactome:109793_Reactome:109795_1_1",
"Reactome:109783_Reactome:109793_Reactome:109795_1_1",
"Reactome:109792_Reactome:109793_Reactome:109795_1_1"
]
},
"id" : "Reactome:109793_Reactome:109795_1",
"is_abstract" : 1,
"sbo" : 253,
"type" : "Complex"
},
{
"data" : {
"clone_marker" : "MAP:UP36507_CY",
"compartment" : "MAP:Cytosol",
"label" : "MEK2()",
"modification" : [],
"ref" : "MAP:UP36507_CY"
},
"id" : "MAP:UP36507_CY_Reactome:109795_1",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"clone_marker" : "MAP:Cx114",
"compartment" : "MAP:Cytosol",
"label" : "GRB2:SOS1",
"modification" : [],
"ref" : "MAP:Cx114",
"subnodes" : [
"MAP:UQ07889_CY_MAP:Cx114_Reactome:180331_1_1",
"MAP:UP62993_CY_MAP:Cx114_Reactome:180331_1_1"
]
},
"id" : "MAP:Cx114_Reactome:180331_1",
"is_abstract" : 1,
"sbo" : 253,
"type" : "Complex"
},
{
"data" : {
"clone_marker" : "Reactome:180337",
"compartment" : "MAP:Plasmamembrane",
"label" : "EGF:Phospho-EGFR:Phospho-SHC",
"modification" : [],
"ref" : "Reactome:180337",
"subnodes" : [
"Reactome:180276_Reactome:180337_Reactome:180331_1_1",
"Reactome:179882_Reactome:180337_Reactome:180331_1_1"
]
},
"id" : "Reactome:180337_Reactome:180331_1",
"is_abstract" : 1,
"sbo" : 253,
"type" : "Complex"
},
{
"data" : {
"clone_marker" : "MAP:C3",
"compartment" : "MAP:Cytosol",
"label" : "PI3K-p85",
"modification" : [],
"ref" : "MAP:C3"
},
"id" : "MAP:C3_Reactome:179791_1",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"clone_marker" : "Reactome:179882",
"compartment" : "MAP:Plasmamembrane",
"label" : "EGF:Phospho-EGFR (Y992, Y1068, Y1086, Y1148, Y1173) dimer",
"modification" : [],
"ref" : "Reactome:179882",
"subnodes" : [
"Reactome:179860_Reactome:179882_Reactome:179791_1_1",
"Reactome:179860_Reactome:179882_Reactome:179791_1_2"
]
},
"id" : "Reactome:179882_Reactome:179791_1",
"is_abstract" : 1,
"sbo" : 253,
"type" : "Complex"
},
{
"data" : {
"clone_marker" : "MAP:C2",
"compartment" : "MAP:Cytosol",
"label" : "PI3K-p110",
"modification" : [],
"ref" : "MAP:C2"
},
"id" : "MAP:C2_Reactome:179791_1",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"clone_marker" : "Reactome:179849",
"compartment" : "MAP:Cytosol",
"label" : "GRB2:GAB1",
"modification" : [],
"ref" : "Reactome:179849",
"subnodes" : [
"MAP:UP62993_CY_Reactome:179849_Reactome:179791_1_1",
"MAP:UQ13480_CY_Reactome:179849_Reactome:179791_1_1"
]
},
"id" : "Reactome:179849_Reactome:179791_1",
"is_abstract" : 1,
"sbo" : 253,
"type" : "Complex"
},
{
"data" : {
"clone_marker" : "Reactome:109793",
"compartment" : "MAP:Plasmamembrane",
"label" : "Activated RAF1 complex",
"modification" : [],
"ref" : "Reactome:109793",
"subnodes" : [
"MAP:UP31946_CY_Reactome:109793_Reactome:112406_1_1",
"Reactome:109783_Reactome:109793_Reactome:112406_1_1",
"Reactome:109792_Reactome:109793_Reactome:112406_1_1"
]
},
"id" : "Reactome:109793_Reactome:112406_1",
"is_abstract" : 1,
"sbo" : 253,
"type" : "Complex"
},
{
"data" : {
"clone_marker" : "Reactome:112398",
"compartment" : "MAP:Cytosol",
"label" : "MEK",
"modification" : [],
"ref" : "Reactome:112398"
},
"id" : "Reactome:112398_Reactome:112406_1",
"is_abstract" : 1,
"sbo" : 240,
"type" : "Compound"
},
{
"data" : {
"clone_marker" : "MAP:UQ02750_CY",
"compartment" : "MAP:Cytosol",
"label" : "MEK1",
"modification" : [],
"ref" : "MAP:UQ02750_CY"
},
"id" : "MAP:UQ02750_CY_Reactome:109794_1",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"clone_marker" : "Reactome:109793",
"compartment" : "MAP:Plasmamembrane",
"label" : "Activated RAF1 complex",
"modification" : [],
"ref" : "Reactome:109793",
"subnodes" : [
"MAP:UP31946_CY_Reactome:109793_Reactome:109794_1_1",
"Reactome:109783_Reactome:109793_Reactome:109794_1_1",
"Reactome:109792_Reactome:109793_Reactome:109794_1_1"
]
},
"id" : "Reactome:109793_Reactome:109794_1",
"is_abstract" : 1,
"sbo" : 253,
"type" : "Complex"
},
{
"data" : {
"clone_marker" : "Reactome:180276",
"compartment" : "MAP:Cytosol",
"label" : "Phospho-SHC transforming protein",
"modification" : [
[
216,
"349"
],
[
216,
"350"
]
],
"ref" : "Reactome:180276"
},
"id" : "Reactome:180276_Reactome:180337_1",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"clone_marker" : "Reactome:179882",
"compartment" : "MAP:Plasmamembrane",
"label" : "EGF:Phospho-EGFR (Y992, Y1068, Y1086, Y1148, Y1173) dimer",
"modification" : [],
"ref" : "Reactome:179882",
"subnodes" : [
"Reactome:179860_Reactome:179882_Reactome:180337_1_1",
"Reactome:179860_Reactome:179882_Reactome:180337_1_2"
]
},
"id" : "Reactome:179882_Reactome:180337_1",
"is_abstract" : 1,
"sbo" : 253,
"type" : "Complex"
},
{
"data" : {
"clone_marker" : "MAP:Cx114",
"compartment" : "MAP:Cytosol",
"label" : "GRB2:SOS1",
"modification" : [],
"ref" : "MAP:Cx114",
"subnodes" : [
"MAP:UQ07889_CY_MAP:Cx114_Reactome:179820_1_1",
"MAP:UP62993_CY_MAP:Cx114_Reactome:179820_1_1"
]
},
"id" : "MAP:Cx114_Reactome:179820_1",
"is_abstract" : 1,
"sbo" : 253,
"type" : "Complex"
},
{
"data" : {
"clone_marker" : "Reactome:179882",
"compartment" : "MAP:Plasmamembrane",
"label" : "EGF:Phospho-EGFR (Y992, Y1068, Y1086, Y1148, Y1173) dimer",
"modification" : [],
"ref" : "Reactome:179882",
"subnodes" : [
"Reactome:179860_Reactome:179882_Reactome:179820_1_1",
"Reactome:179860_Reactome:179882_Reactome:179820_1_2"
]
},
"id" : "Reactome:179882_Reactome:179820_1",
"is_abstract" : 1,
"sbo" : 253,
"type" : "Complex"
},
{
"data" : {
"clone_marker" : "Reactome:109782",
"compartment" : "MAP:Plasmamembrane",
"label" : "p21 RAS",
"modification" : [],
"ref" : "Reactome:109782"
},
"id" : "Reactome:109782_Reactome:109783_1",
"is_abstract" : 1,
"sbo" : 240,
"type" : "Compound"
},
{
"data" : {
"clone_marker" : "MAP:Cb15996_CY",
"compartment" : "MAP:Cytosol",
"label" : "GTP",
"modification" : [],
"ref" : "MAP:Cb15996_CY"
},
"id" : "MAP:Cb15996_CY_Reactome:109783_1",
"is_abstract" : 1,
"sbo" : 247,
"type" : "SimpleCompound"
},
{
"data" : {
"clone_marker" : "MAP:UP04049_CY_pho259pho621",
"compartment" : "MAP:Cytosol",
"label" : "RAF1(ph259,ph621)",
"modification" : [
[
216,
"259"
],
[
216,
"621"
]
],
"ref" : "MAP:UP04049_CY_pho259pho621"
},
"id" : "MAP:UP04049_CY_pho259pho621_Reactome:109788_Reactome:109789_1_1",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"clone_marker" : "Reactome:109783",
"compartment" : "MAP:Plasmamembrane",
"label" : "p21 RAS:GTP",
"modification" : [],
"ref" : "Reactome:109783",
"subnodes" : [
"Reactome:109782_Reactome:109783_Reactome:109788_Reactome:109789_1_1_1",
"MAP:Cb15996_CY_Reactome:109783_Reactome:109788_Reactome:109789_1_1_1"
]
},
"id" : "Reactome:109783_Reactome:109788_Reactome:109789_1_1",
"is_abstract" : 1,
"sbo" : 253,
"type" : "Complex"
},
{
"data" : {
"clone_marker" : "Reactome:109782",
"compartment" : "MAP:Plasmamembrane",
"label" : "p21 RAS",
"modification" : [],
"ref" : "Reactome:109782"
},
"id" : "Reactome:109782_Reactome:109783_Reactome:109793_1_1",
"is_abstract" : 1,
"sbo" : 240,
"type" : "Compound"
},
{
"data" : {
"clone_marker" : "MAP:Cb15996_CY",
"compartment" : "MAP:Cytosol",
"label" : "GTP",
"modification" : [],
"ref" : "MAP:Cb15996_CY"
},
"id" : "MAP:Cb15996_CY_Reactome:109783_Reactome:109793_1_1",
"is_abstract" : 1,
"sbo" : 247,
"type" : "SimpleCompound"
},
{
"data" : {
"clone_marker" : "Reactome:179860",
"compartment" : "MAP:Plasmamembrane",
"label" : "EGF:Phospho-EGFR",
"modification" : [],
"ref" : "Reactome:179860",
"subnodes" : [
"Reactome:179863_Reactome:179860_Reactome:179882_Reactome:180301_1_1_1",
"Reactome:179803_Reactome:179860_Reactome:179882_Reactome:180301_1_1_1"
]
},
"id" : "Reactome:179860_Reactome:179882_Reactome:180301_1_1",
"is_abstract" : 1,
"sbo" : 253,
"type" : "Complex"
},
{
"data" : {
"clone_marker" : "Reactome:179860",
"compartment" : "MAP:Plasmamembrane",
"label" : "EGF:Phospho-EGFR",
"modification" : [],
"ref" : "Reactome:179860",
"subnodes" : [
"Reactome:179863_Reactome:179860_Reactome:179882_Reactome:180301_1_2_1",
"Reactome:179803_Reactome:179860_Reactome:179882_Reactome:180301_1_2_1"
]
},
"id" : "Reactome:179860_Reactome:179882_Reactome:180301_1_2",
"is_abstract" : 1,
"sbo" : 253,
"type" : "Complex"
},
{
"data" : {
"clone_marker" : "Reactome:179860",
"compartment" : "MAP:Plasmamembrane",
"label" : "EGF:Phospho-EGFR",
"modification" : [],
"ref" : "Reactome:179860",
"subnodes" : [
"Reactome:179863_Reactome:179860_Reactome:179882_Reactome:180348_1_1_1",
"Reactome:179803_Reactome:179860_Reactome:179882_Reactome:180348_1_1_1"
]
},
"id" : "Reactome:179860_Reactome:179882_Reactome:180348_1_1",
"is_abstract" : 1,
"sbo" : 253,
"type" : "Complex"
},
{
"data" : {
"clone_marker" : "Reactome:179860",
"compartment" : "MAP:Plasmamembrane",
"label" : "EGF:Phospho-EGFR",
"modification" : [],
"ref" : "Reactome:179860",
"subnodes" : [
"Reactome:179863_Reactome:179860_Reactome:179882_Reactome:180348_1_2_1",
"Reactome:179803_Reactome:179860_Reactome:179882_Reactome:180348_1_2_1"
]
},
"id" : "Reactome:179860_Reactome:179882_Reactome:180348_1_2",
"is_abstract" : 1,
"sbo" : 253,
"type" : "Complex"
},
{
"data" : {
"clone_marker" : "MAP:UP62993_CY",
"compartment" : "MAP:Cytosol",
"label" : "GRB2()",
"modification" : [],
"ref" : "MAP:UP62993_CY"
},
"id" : "MAP:UP62993_CY_Reactome:179849_Reactome:180348_1_1",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"clone_marker" : "MAP:UQ13480_CY",
"compartment" : "MAP:Cytosol",
"label" : "GAB1",
"modification" : [],
"ref" : "MAP:UQ13480_CY"
},
"id" : "MAP:UQ13480_CY_Reactome:179849_Reactome:180348_1_1",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"clone_marker" : "Reactome:109782",
"compartment" : "MAP:Plasmamembrane",
"label" : "p21 RAS",
"modification" : [],
"ref" : "Reactome:109782"
},
"id" : "Reactome:109782_Reactome:109783_Reactome:109788_1_1",
"is_abstract" : 1,
"sbo" : 240,
"type" : "Compound"
},
{
"data" : {
"clone_marker" : "MAP:Cb15996_CY",
"compartment" : "MAP:Cytosol",
"label" : "GTP",
"modification" : [],
"ref" : "MAP:Cb15996_CY"
},
"id" : "MAP:Cb15996_CY_Reactome:109783_Reactome:109788_1_1",
"is_abstract" : 1,
"sbo" : 247,
"type" : "SimpleCompound"
},
{
"data" : {
"clone_marker" : "MAP:UP62993_CY",
"compartment" : "MAP:Cytosol",
"label" : "GRB2()",
"modification" : [],
"ref" : "MAP:UP62993_CY"
},
"id" : "MAP:UP62993_CY_Reactome:180304_Reactome:180286_1_1",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"clone_marker" : "Reactome:180344",
"compartment" : "MAP:Cytosol",
"label" : "Phospho-GAB1",
"modification" : [
[
216,
"627"
],
[
216,
"659"
],
[
216,
"447"
],
[
216,
"472"
],
[
216,
"589"
]
],
"ref" : "Reactome:180344"
},
"id" : "Reactome:180344_Reactome:180304_Reactome:180286_1_1",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"clone_marker" : "Reactome:179860",
"compartment" : "MAP:Plasmamembrane",
"label" : "EGF:Phospho-EGFR",
"modification" : [],
"ref" : "Reactome:179860",
"subnodes" : [
"Reactome:179863_Reactome:179860_Reactome:179882_Reactome:180286_1_1_1",
"Reactome:179803_Reactome:179860_Reactome:179882_Reactome:180286_1_1_1"
]
},
"id" : "Reactome:179860_Reactome:179882_Reactome:180286_1_1",
"is_abstract" : 1,
"sbo" : 253,
"type" : "Complex"
},
{
"data" : {
"clone_marker" : "Reactome:179860",
"compartment" : "MAP:Plasmamembrane",
"label" : "EGF:Phospho-EGFR",
"modification" : [],
"ref" : "Reactome:179860",
"subnodes" : [
"Reactome:179863_Reactome:179860_Reactome:179882_Reactome:180286_1_2_1",
"Reactome:179803_Reactome:179860_Reactome:179882_Reactome:180286_1_2_1"
]
},
"id" : "Reactome:179860_Reactome:179882_Reactome:180286_1_2",
"is_abstract" : 1,
"sbo" : 253,
"type" : "Complex"
},
{
"data" : {
"clone_marker" : "Reactome:179863",
"compartment" : "MAP:Extracellular",
"label" : "EGF",
"modification" : [],
"ref" : "Reactome:179863"
},
"id" : "Reactome:179863_Reactome:179847_Reactome:179845_1_1",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"clone_marker" : "Reactome:179837",
"compartment" : "MAP:Plasmamembrane",
"label" : "EGFR",
"modification" : [],
"ref" : "Reactome:179837"
},
"id" : "Reactome:179837_Reactome:179847_Reactome:179845_1_1",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"clone_marker" : "Reactome:179863",
"compartment" : "MAP:Extracellular",
"label" : "EGF",
"modification" : [],
"ref" : "Reactome:179863"
},
"id" : "Reactome:179863_Reactome:179847_Reactome:179845_2_1",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"clone_marker" : "Reactome:179837",
"compartment" : "MAP:Plasmamembrane",
"label" : "EGFR",
"modification" : [],
"ref" : "Reactome:179837"
},
"id" : "Reactome:179837_Reactome:179847_Reactome:179845_2_1",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"clone_marker" : "Reactome:179863",
"compartment" : "MAP:Extracellular",
"label" : "EGF",
"modification" : [],
"ref" : "Reactome:179863"
},
"id" : "Reactome:179863_Reactome:179860_Reactome:179882_1_1",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"clone_marker" : "Reactome:179803",
"compartment" : "MAP:Plasmamembrane",
"label" : "Phospho-EGFR",
"modification" : [
[
216,
"1068"
],
[
216,
"1148"
],
[
216,
"1173"
],
[
216,
"1086"
],
[
216,
"992"
]
],
"ref" : "Reactome:179803"
},
"id" : "Reactome:179803_Reactome:179860_Reactome:179882_1_1",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"clone_marker" : "Reactome:179863",
"compartment" : "MAP:Extracellular",
"label" : "EGF",
"modification" : [],
"ref" : "Reactome:179863"
},
"id" : "Reactome:179863_Reactome:179860_Reactome:179882_2_1",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"clone_marker" : "Reactome:179803",
"compartment" : "MAP:Plasmamembrane",
"label" : "Phospho-EGFR",
"modification" : [
[
216,
"1068"
],
[
216,
"1148"
],
[
216,
"1173"
],
[
216,
"1086"
],
[
216,
"992"
]
],
"ref" : "Reactome:179803"
},
"id" : "Reactome:179803_Reactome:179860_Reactome:179882_2_1",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"clone_marker" : "MAP:C3",
"compartment" : "MAP:Cytosol",
"label" : "PI3K-p85",
"modification" : [],
"ref" : "MAP:C3"
},
"id" : "MAP:C3_MAP:Cx156_MAN:C10_1_1",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"clone_marker" : "MAP:C2",
"compartment" : "MAP:Cytosol",
"label" : "PI3K-p110",
"modification" : [],
"ref" : "MAP:C2"
},
"id" : "MAP:C2_MAP:Cx156_MAN:C10_1_1",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"clone_marker" : "Reactome:109782",
"compartment" : "MAP:Plasmamembrane",
"label" : "p21 RAS",
"modification" : [],
"ref" : "Reactome:109782"
},
"id" : "Reactome:109782_Reactome:109783_MAN:C10_1_1",
"is_abstract" : 1,
"sbo" : 240,
"type" : "Compound"
},
{
"data" : {
"clone_marker" : "MAP:Cb15996_CY",
"compartment" : "MAP:Cytosol",
"label" : "GTP",
"modification" : [],
"ref" : "MAP:Cb15996_CY"
},
"id" : "MAP:Cb15996_CY_Reactome:109783_MAN:C10_1_1",
"is_abstract" : 1,
"sbo" : 247,
"type" : "SimpleCompound"
},
{
"data" : {
"clone_marker" : "MAP:UP31946_CY",
"compartment" : "MAP:Cytosol",
"label" : "YWHAB()",
"modification" : [],
"ref" : "MAP:UP31946_CY"
},
"id" : "MAP:UP31946_CY_Reactome:109793_Reactome:109795_1_1",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"clone_marker" : "Reactome:109783",
"compartment" : "MAP:Plasmamembrane",
"label" : "p21 RAS:GTP",
"modification" : [],
"ref" : "Reactome:109783",
"subnodes" : [
"Reactome:109782_Reactome:109783_Reactome:109793_Reactome:109795_1_1_1",
"MAP:Cb15996_CY_Reactome:109783_Reactome:109793_Reactome:109795_1_1_1"
]
},
"id" : "Reactome:109783_Reactome:109793_Reactome:109795_1_1",
"is_abstract" : 1,
"sbo" : 253,
"type" : "Complex"
},
{
"data" : {
"clone_marker" : "Reactome:109792",
"compartment" : "MAP:Plasmamembrane",
"label" : "cRaf",
"modification" : [
[
216,
"340"
],
[
216,
"621"
],
[
216,
"259"
],
[
216,
"341"
]
],
"ref" : "Reactome:109792"
},
"id" : "Reactome:109792_Reactome:109793_Reactome:109795_1_1",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"clone_marker" : "MAP:UQ07889_CY",
"compartment" : "MAP:Cytosol",
"label" : "Son of sevenless protein homolog 1",
"modification" : [],
"ref" : "MAP:UQ07889_CY"
},
"id" : "MAP:UQ07889_CY_MAP:Cx114_Reactome:180331_1_1",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"clone_marker" : "MAP:UP62993_CY",
"compartment" : "MAP:Cytosol",
"label" : "GRB2()",
"modification" : [],
"ref" : "MAP:UP62993_CY"
},
"id" : "MAP:UP62993_CY_MAP:Cx114_Reactome:180331_1_1",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"clone_marker" : "Reactome:180276",
"compartment" : "MAP:Cytosol",
"label" : "Phospho-SHC transforming protein",
"modification" : [
[
216,
"349"
],
[
216,
"350"
]
],
"ref" : "Reactome:180276"
},
"id" : "Reactome:180276_Reactome:180337_Reactome:180331_1_1",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"clone_marker" : "Reactome:179882",
"compartment" : "MAP:Plasmamembrane",
"label" : "EGF:Phospho-EGFR (Y992, Y1068, Y1086, Y1148, Y1173) dimer",
"modification" : [],
"ref" : "Reactome:179882",
"subnodes" : [
"Reactome:179860_Reactome:179882_Reactome:180337_Reactome:180331_1_1_1",
"Reactome:179860_Reactome:179882_Reactome:180337_Reactome:180331_1_1_2"
]
},
"id" : "Reactome:179882_Reactome:180337_Reactome:180331_1_1",
"is_abstract" : 1,
"sbo" : 253,
"type" : "Complex"
},
{
"data" : {
"clone_marker" : "Reactome:179860",
"compartment" : "MAP:Plasmamembrane",
"label" : "EGF:Phospho-EGFR",
"modification" : [],
"ref" : "Reactome:179860",
"subnodes" : [
"Reactome:179863_Reactome:179860_Reactome:179882_Reactome:179791_1_1_1",
"Reactome:179803_Reactome:179860_Reactome:179882_Reactome:179791_1_1_1"
]
},
"id" : "Reactome:179860_Reactome:179882_Reactome:179791_1_1",
"is_abstract" : 1,
"sbo" : 253,
"type" : "Complex"
},
{
"data" : {
"clone_marker" : "Reactome:179860",
"compartment" : "MAP:Plasmamembrane",
"label" : "EGF:Phospho-EGFR",
"modification" : [],
"ref" : "Reactome:179860",
"subnodes" : [
"Reactome:179863_Reactome:179860_Reactome:179882_Reactome:179791_1_2_1",
"Reactome:179803_Reactome:179860_Reactome:179882_Reactome:179791_1_2_1"
]
},
"id" : "Reactome:179860_Reactome:179882_Reactome:179791_1_2",
"is_abstract" : 1,
"sbo" : 253,
"type" : "Complex"
},
{
"data" : {
"clone_marker" : "MAP:UP62993_CY",
"compartment" : "MAP:Cytosol",
"label" : "GRB2()",
"modification" : [],
"ref" : "MAP:UP62993_CY"
},
"id" : "MAP:UP62993_CY_Reactome:179849_Reactome:179791_1_1",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"clone_marker" : "MAP:UQ13480_CY",
"compartment" : "MAP:Cytosol",
"label" : "GAB1",
"modification" : [],
"ref" : "MAP:UQ13480_CY"
},
"id" : "MAP:UQ13480_CY_Reactome:179849_Reactome:179791_1_1",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"clone_marker" : "MAP:UP31946_CY",
"compartment" : "MAP:Cytosol",
"label" : "YWHAB()",
"modification" : [],
"ref" : "MAP:UP31946_CY"
},
"id" : "MAP:UP31946_CY_Reactome:109793_Reactome:112406_1_1",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"clone_marker" : "Reactome:109783",
"compartment" : "MAP:Plasmamembrane",
"label" : "p21 RAS:GTP",
"modification" : [],
"ref" : "Reactome:109783",
"subnodes" : [
"Reactome:109782_Reactome:109783_Reactome:109793_Reactome:112406_1_1_1",
"MAP:Cb15996_CY_Reactome:109783_Reactome:109793_Reactome:112406_1_1_1"
]
},
"id" : "Reactome:109783_Reactome:109793_Reactome:112406_1_1",
"is_abstract" : 1,
"sbo" : 253,
"type" : "Complex"
},
{
"data" : {
"clone_marker" : "Reactome:109792",
"compartment" : "MAP:Plasmamembrane",
"label" : "cRaf",
"modification" : [
[
216,
"340"
],
[
216,
"621"
],
[
216,
"259"
],
[
216,
"341"
]
],
"ref" : "Reactome:109792"
},
"id" : "Reactome:109792_Reactome:109793_Reactome:112406_1_1",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"clone_marker" : "MAP:UP31946_CY",
"compartment" : "MAP:Cytosol",
"label" : "YWHAB()",
"modification" : [],
"ref" : "MAP:UP31946_CY"
},
"id" : "MAP:UP31946_CY_Reactome:109793_Reactome:109794_1_1",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"clone_marker" : "Reactome:109783",
"compartment" : "MAP:Plasmamembrane",
"label" : "p21 RAS:GTP",
"modification" : [],
"ref" : "Reactome:109783",
"subnodes" : [
"Reactome:109782_Reactome:109783_Reactome:109793_Reactome:109794_1_1_1",
"MAP:Cb15996_CY_Reactome:109783_Reactome:109793_Reactome:109794_1_1_1"
]
},
"id" : "Reactome:109783_Reactome:109793_Reactome:109794_1_1",
"is_abstract" : 1,
"sbo" : 253,
"type" : "Complex"
},
{
"data" : {
"clone_marker" : "Reactome:109792",
"compartment" : "MAP:Plasmamembrane",
"label" : "cRaf",
"modification" : [
[
216,
"340"
],
[
216,
"621"
],
[
216,
"259"
],
[
216,
"341"
]
],
"ref" : "Reactome:109792"
},
"id" : "Reactome:109792_Reactome:109793_Reactome:109794_1_1",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"clone_marker" : "Reactome:179860",
"compartment" : "MAP:Plasmamembrane",
"label" : "EGF:Phospho-EGFR",
"modification" : [],
"ref" : "Reactome:179860",
"subnodes" : [
"Reactome:179863_Reactome:179860_Reactome:179882_Reactome:180337_1_1_1",
"Reactome:179803_Reactome:179860_Reactome:179882_Reactome:180337_1_1_1"
]
},
"id" : "Reactome:179860_Reactome:179882_Reactome:180337_1_1",
"is_abstract" : 1,
"sbo" : 253,
"type" : "Complex"
},
{
"data" : {
"clone_marker" : "Reactome:179860",
"compartment" : "MAP:Plasmamembrane",
"label" : "EGF:Phospho-EGFR",
"modification" : [],
"ref" : "Reactome:179860",
"subnodes" : [
"Reactome:179863_Reactome:179860_Reactome:179882_Reactome:180337_1_2_1",
"Reactome:179803_Reactome:179860_Reactome:179882_Reactome:180337_1_2_1"
]
},
"id" : "Reactome:179860_Reactome:179882_Reactome:180337_1_2",
"is_abstract" : 1,
"sbo" : 253,
"type" : "Complex"
},
{
"data" : {
"clone_marker" : "MAP:UQ07889_CY",
"compartment" : "MAP:Cytosol",
"label" : "Son of sevenless protein homolog 1",
"modification" : [],
"ref" : "MAP:UQ07889_CY"
},
"id" : "MAP:UQ07889_CY_MAP:Cx114_Reactome:179820_1_1",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"clone_marker" : "MAP:UP62993_CY",
"compartment" : "MAP:Cytosol",
"label" : "GRB2()",
"modification" : [],
"ref" : "MAP:UP62993_CY"
},
"id" : "MAP:UP62993_CY_MAP:Cx114_Reactome:179820_1_1",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"clone_marker" : "Reactome:179860",
"compartment" : "MAP:Plasmamembrane",
"label" : "EGF:Phospho-EGFR",
"modification" : [],
"ref" : "Reactome:179860",
"subnodes" : [
"Reactome:179863_Reactome:179860_Reactome:179882_Reactome:179820_1_1_1",
"Reactome:179803_Reactome:179860_Reactome:179882_Reactome:179820_1_1_1"
]
},
"id" : "Reactome:179860_Reactome:179882_Reactome:179820_1_1",
"is_abstract" : 1,
"sbo" : 253,
"type" : "Complex"
},
{
"data" : {
"clone_marker" : "Reactome:179860",
"compartment" : "MAP:Plasmamembrane",
"label" : "EGF:Phospho-EGFR",
"modification" : [],
"ref" : "Reactome:179860",
"subnodes" : [
"Reactome:179863_Reactome:179860_Reactome:179882_Reactome:179820_1_2_1",
"Reactome:179803_Reactome:179860_Reactome:179882_Reactome:179820_1_2_1"
]
},
"id" : "Reactome:179860_Reactome:179882_Reactome:179820_1_2",
"is_abstract" : 1,
"sbo" : 253,
"type" : "Complex"
},
{
"data" : {
"clone_marker" : "Reactome:109782",
"compartment" : "MAP:Plasmamembrane",
"label" : "p21 RAS",
"modification" : [],
"ref" : "Reactome:109782"
},
"id" : "Reactome:109782_Reactome:109783_Reactome:109788_Reactome:109789_1_1_1",
"is_abstract" : 1,
"sbo" : 240,
"type" : "Compound"
},
{
"data" : {
"clone_marker" : "MAP:Cb15996_CY",
"compartment" : "MAP:Cytosol",
"label" : "GTP",
"modification" : [],
"ref" : "MAP:Cb15996_CY"
},
"id" : "MAP:Cb15996_CY_Reactome:109783_Reactome:109788_Reactome:109789_1_1_1",
"is_abstract" : 1,
"sbo" : 247,
"type" : "SimpleCompound"
},
{
"data" : {
"clone_marker" : "Reactome:179863",
"compartment" : "MAP:Extracellular",
"label" : "EGF",
"modification" : [],
"ref" : "Reactome:179863"
},
"id" : "Reactome:179863_Reactome:179860_Reactome:179882_Reactome:180301_1_1_1",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"clone_marker" : "Reactome:179803",
"compartment" : "MAP:Plasmamembrane",
"label" : "Phospho-EGFR",
"modification" : [
[
216,
"1068"
],
[
216,
"1148"
],
[
216,
"1173"
],
[
216,
"1086"
],
[
216,
"992"
]
],
"ref" : "Reactome:179803"
},
"id" : "Reactome:179803_Reactome:179860_Reactome:179882_Reactome:180301_1_1_1",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"clone_marker" : "Reactome:179863",
"compartment" : "MAP:Extracellular",
"label" : "EGF",
"modification" : [],
"ref" : "Reactome:179863"
},
"id" : "Reactome:179863_Reactome:179860_Reactome:179882_Reactome:180301_1_2_1",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"clone_marker" : "Reactome:179803",
"compartment" : "MAP:Plasmamembrane",
"label" : "Phospho-EGFR",
"modification" : [
[
216,
"1068"
],
[
216,
"1148"
],
[
216,
"1173"
],
[
216,
"1086"
],
[
216,
"992"
]
],
"ref" : "Reactome:179803"
},
"id" : "Reactome:179803_Reactome:179860_Reactome:179882_Reactome:180301_1_2_1",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"clone_marker" : "Reactome:179863",
"compartment" : "MAP:Extracellular",
"label" : "EGF",
"modification" : [],
"ref" : "Reactome:179863"
},
"id" : "Reactome:179863_Reactome:179860_Reactome:179882_Reactome:180348_1_1_1",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"clone_marker" : "Reactome:179803",
"compartment" : "MAP:Plasmamembrane",
"label" : "Phospho-EGFR",
"modification" : [
[
216,
"1068"
],
[
216,
"1148"
],
[
216,
"1173"
],
[
216,
"1086"
],
[
216,
"992"
]
],
"ref" : "Reactome:179803"
},
"id" : "Reactome:179803_Reactome:179860_Reactome:179882_Reactome:180348_1_1_1",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"clone_marker" : "Reactome:179863",
"compartment" : "MAP:Extracellular",
"label" : "EGF",
"modification" : [],
"ref" : "Reactome:179863"
},
"id" : "Reactome:179863_Reactome:179860_Reactome:179882_Reactome:180348_1_2_1",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"clone_marker" : "Reactome:179803",
"compartment" : "MAP:Plasmamembrane",
"label" : "Phospho-EGFR",
"modification" : [
[
216,
"1068"
],
[
216,
"1148"
],
[
216,
"1173"
],
[
216,
"1086"
],
[
216,
"992"
]
],
"ref" : "Reactome:179803"
},
"id" : "Reactome:179803_Reactome:179860_Reactome:179882_Reactome:180348_1_2_1",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"clone_marker" : "Reactome:179863",
"compartment" : "MAP:Extracellular",
"label" : "EGF",
"modification" : [],
"ref" : "Reactome:179863"
},
"id" : "Reactome:179863_Reactome:179860_Reactome:179882_Reactome:180286_1_1_1",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"clone_marker" : "Reactome:179803",
"compartment" : "MAP:Plasmamembrane",
"label" : "Phospho-EGFR",
"modification" : [
[
216,
"1068"
],
[
216,
"1148"
],
[
216,
"1173"
],
[
216,
"1086"
],
[
216,
"992"
]
],
"ref" : "Reactome:179803"
},
"id" : "Reactome:179803_Reactome:179860_Reactome:179882_Reactome:180286_1_1_1",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"clone_marker" : "Reactome:179863",
"compartment" : "MAP:Extracellular",
"label" : "EGF",
"modification" : [],
"ref" : "Reactome:179863"
},
"id" : "Reactome:179863_Reactome:179860_Reactome:179882_Reactome:180286_1_2_1",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"clone_marker" : "Reactome:179803",
"compartment" : "MAP:Plasmamembrane",
"label" : "Phospho-EGFR",
"modification" : [
[
216,
"1068"
],
[
216,
"1148"
],
[
216,
"1173"
],
[
216,
"1086"
],
[
216,
"992"
]
],
"ref" : "Reactome:179803"
},
"id" : "Reactome:179803_Reactome:179860_Reactome:179882_Reactome:180286_1_2_1",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"clone_marker" : "Reactome:109782",
"compartment" : "MAP:Plasmamembrane",
"label" : "p21 RAS",
"modification" : [],
"ref" : "Reactome:109782"
},
"id" : "Reactome:109782_Reactome:109783_Reactome:109793_Reactome:109795_1_1_1",
"is_abstract" : 1,
"sbo" : 240,
"type" : "Compound"
},
{
"data" : {
"clone_marker" : "MAP:Cb15996_CY",
"compartment" : "MAP:Cytosol",
"label" : "GTP",
"modification" : [],
"ref" : "MAP:Cb15996_CY"
},
"id" : "MAP:Cb15996_CY_Reactome:109783_Reactome:109793_Reactome:109795_1_1_1",
"is_abstract" : 1,
"sbo" : 247,
"type" : "SimpleCompound"
},
{
"data" : {
"clone_marker" : "Reactome:179860",
"compartment" : "MAP:Plasmamembrane",
"label" : "EGF:Phospho-EGFR",
"modification" : [],
"ref" : "Reactome:179860",
"subnodes" : [
"Reactome:179863_Reactome:179860_Reactome:179882_Reactome:180337_Reactome:180331_1_1_1_1",
"Reactome:179803_Reactome:179860_Reactome:179882_Reactome:180337_Reactome:180331_1_1_1_1"
]
},
"id" : "Reactome:179860_Reactome:179882_Reactome:180337_Reactome:180331_1_1_1",
"is_abstract" : 1,
"sbo" : 253,
"type" : "Complex"
},
{
"data" : {
"clone_marker" : "Reactome:179860",
"compartment" : "MAP:Plasmamembrane",
"label" : "EGF:Phospho-EGFR",
"modification" : [],
"ref" : "Reactome:179860",
"subnodes" : [
"Reactome:179863_Reactome:179860_Reactome:179882_Reactome:180337_Reactome:180331_1_1_2_1",
"Reactome:179803_Reactome:179860_Reactome:179882_Reactome:180337_Reactome:180331_1_1_2_1"
]
},
"id" : "Reactome:179860_Reactome:179882_Reactome:180337_Reactome:180331_1_1_2",
"is_abstract" : 1,
"sbo" : 253,
"type" : "Complex"
},
{
"data" : {
"clone_marker" : "Reactome:179863",
"compartment" : "MAP:Extracellular",
"label" : "EGF",
"modification" : [],
"ref" : "Reactome:179863"
},
"id" : "Reactome:179863_Reactome:179860_Reactome:179882_Reactome:179791_1_1_1",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"clone_marker" : "Reactome:179803",
"compartment" : "MAP:Plasmamembrane",
"label" : "Phospho-EGFR",
"modification" : [
[
216,
"1068"
],
[
216,
"1148"
],
[
216,
"1173"
],
[
216,
"1086"
],
[
216,
"992"
]
],
"ref" : "Reactome:179803"
},
"id" : "Reactome:179803_Reactome:179860_Reactome:179882_Reactome:179791_1_1_1",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"clone_marker" : "Reactome:179863",
"compartment" : "MAP:Extracellular",
"label" : "EGF",
"modification" : [],
"ref" : "Reactome:179863"
},
"id" : "Reactome:179863_Reactome:179860_Reactome:179882_Reactome:179791_1_2_1",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"clone_marker" : "Reactome:179803",
"compartment" : "MAP:Plasmamembrane",
"label" : "Phospho-EGFR",
"modification" : [
[
216,
"1068"
],
[
216,
"1148"
],
[
216,
"1173"
],
[
216,
"1086"
],
[
216,
"992"
]
],
"ref" : "Reactome:179803"
},
"id" : "Reactome:179803_Reactome:179860_Reactome:179882_Reactome:179791_1_2_1",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"clone_marker" : "Reactome:109782",
"compartment" : "MAP:Plasmamembrane",
"label" : "p21 RAS",
"modification" : [],
"ref" : "Reactome:109782"
},
"id" : "Reactome:109782_Reactome:109783_Reactome:109793_Reactome:112406_1_1_1",
"is_abstract" : 1,
"sbo" : 240,
"type" : "Compound"
},
{
"data" : {
"clone_marker" : "MAP:Cb15996_CY",
"compartment" : "MAP:Cytosol",
"label" : "GTP",
"modification" : [],
"ref" : "MAP:Cb15996_CY"
},
"id" : "MAP:Cb15996_CY_Reactome:109783_Reactome:109793_Reactome:112406_1_1_1",
"is_abstract" : 1,
"sbo" : 247,
"type" : "SimpleCompound"
},
{
"data" : {
"clone_marker" : "Reactome:109782",
"compartment" : "MAP:Plasmamembrane",
"label" : "p21 RAS",
"modification" : [],
"ref" : "Reactome:109782"
},
"id" : "Reactome:109782_Reactome:109783_Reactome:109793_Reactome:109794_1_1_1",
"is_abstract" : 1,
"sbo" : 240,
"type" : "Compound"
},
{
"data" : {
"clone_marker" : "MAP:Cb15996_CY",
"compartment" : "MAP:Cytosol",
"label" : "GTP",
"modification" : [],
"ref" : "MAP:Cb15996_CY"
},
"id" : "MAP:Cb15996_CY_Reactome:109783_Reactome:109793_Reactome:109794_1_1_1",
"is_abstract" : 1,
"sbo" : 247,
"type" : "SimpleCompound"
},
{
"data" : {
"clone_marker" : "Reactome:179863",
"compartment" : "MAP:Extracellular",
"label" : "EGF",
"modification" : [],
"ref" : "Reactome:179863"
},
"id" : "Reactome:179863_Reactome:179860_Reactome:179882_Reactome:180337_1_1_1",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"clone_marker" : "Reactome:179803",
"compartment" : "MAP:Plasmamembrane",
"label" : "Phospho-EGFR",
"modification" : [
[
216,
"1068"
],
[
216,
"1148"
],
[
216,
"1173"
],
[
216,
"1086"
],
[
216,
"992"
]
],
"ref" : "Reactome:179803"
},
"id" : "Reactome:179803_Reactome:179860_Reactome:179882_Reactome:180337_1_1_1",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"clone_marker" : "Reactome:179863",
"compartment" : "MAP:Extracellular",
"label" : "EGF",
"modification" : [],
"ref" : "Reactome:179863"
},
"id" : "Reactome:179863_Reactome:179860_Reactome:179882_Reactome:180337_1_2_1",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"clone_marker" : "Reactome:179803",
"compartment" : "MAP:Plasmamembrane",
"label" : "Phospho-EGFR",
"modification" : [
[
216,
"1068"
],
[
216,
"1148"
],
[
216,
"1173"
],
[
216,
"1086"
],
[
216,
"992"
]
],
"ref" : "Reactome:179803"
},
"id" : "Reactome:179803_Reactome:179860_Reactome:179882_Reactome:180337_1_2_1",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"clone_marker" : "Reactome:179863",
"compartment" : "MAP:Extracellular",
"label" : "EGF",
"modification" : [],
"ref" : "Reactome:179863"
},
"id" : "Reactome:179863_Reactome:179860_Reactome:179882_Reactome:179820_1_1_1",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"clone_marker" : "Reactome:179803",
"compartment" : "MAP:Plasmamembrane",
"label" : "Phospho-EGFR",
"modification" : [
[
216,
"1068"
],
[
216,
"1148"
],
[
216,
"1173"
],
[
216,
"1086"
],
[
216,
"992"
]
],
"ref" : "Reactome:179803"
},
"id" : "Reactome:179803_Reactome:179860_Reactome:179882_Reactome:179820_1_1_1",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"clone_marker" : "Reactome:179863",
"compartment" : "MAP:Extracellular",
"label" : "EGF",
"modification" : [],
"ref" : "Reactome:179863"
},
"id" : "Reactome:179863_Reactome:179860_Reactome:179882_Reactome:179820_1_2_1",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"clone_marker" : "Reactome:179803",
"compartment" : "MAP:Plasmamembrane",
"label" : "Phospho-EGFR",
"modification" : [
[
216,
"1068"
],
[
216,
"1148"
],
[
216,
"1173"
],
[
216,
"1086"
],
[
216,
"992"
]
],
"ref" : "Reactome:179803"
},
"id" : "Reactome:179803_Reactome:179860_Reactome:179882_Reactome:179820_1_2_1",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"clone_marker" : "Reactome:179863",
"compartment" : "MAP:Extracellular",
"label" : "EGF",
"modification" : [],
"ref" : "Reactome:179863"
},
"id" : "Reactome:179863_Reactome:179860_Reactome:179882_Reactome:180337_Reactome:180331_1_1_1_1",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"clone_marker" : "Reactome:179803",
"compartment" : "MAP:Plasmamembrane",
"label" : "Phospho-EGFR",
"modification" : [
[
216,
"1068"
],
[
216,
"1148"
],
[
216,
"1173"
],
[
216,
"1086"
],
[
216,
"992"
]
],
"ref" : "Reactome:179803"
},
"id" : "Reactome:179803_Reactome:179860_Reactome:179882_Reactome:180337_Reactome:180331_1_1_1_1",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"clone_marker" : "Reactome:179863",
"compartment" : "MAP:Extracellular",
"label" : "EGF",
"modification" : [],
"ref" : "Reactome:179863"
},
"id" : "Reactome:179863_Reactome:179860_Reactome:179882_Reactome:180337_Reactome:180331_1_1_2_1",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"clone_marker" : "Reactome:179803",
"compartment" : "MAP:Plasmamembrane",
"label" : "Phospho-EGFR",
"modification" : [
[
216,
"1068"
],
[
216,
"1148"
],
[
216,
"1173"
],
[
216,
"1086"
],
[
216,
"992"
]
],
"ref" : "Reactome:179803"
},
"id" : "Reactome:179803_Reactome:179860_Reactome:179882_Reactome:180337_Reactome:180331_1_1_2_1",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"label" : "Extracellular",
"ref" : "MAP:Extracellular",
"subnodes" : [
"Reactome:179863"
]
},
"id" : "MAP:Extracellular",
"is_abstract" : 0,
"sbo" : 290,
"type" : "Compartment"
},
{
"data" : {
"label" : "Plasmamembrane",
"ref" : "MAP:Plasmamembrane",
"subnodes" : [
"Reactome:177934",
"MAP:C79",
"Reactome:179856",
"Reactome:109841",
"Reactome:179860",
"Reactome:177940",
"MAP:UP01116_",
"Reactome:109803",
"Reactome:109788",
"Reactome:177930",
"Reactome:180286",
"MAN:R1",
"MAN:C10",
"Reactome:180331",
"Reactome:177936",
"Reactome:112406",
"MAN:R28",
"Reactome:177922",
"Reactome:180337",
"Reactome:177943",
"Reactome:109792",
"MAP:UP01112_PM",
"Reactome:109789",
"Reactome:109796",
"Reactome:163338",
"Reactome:177938",
"Reactome:109793",
"Reactome:180301",
"Reactome:109802",
"Reactome:180348",
"Reactome:179837",
"Reactome:177945",
"Reactome:179845",
"Reactome:177933",
"Reactome:179847",
"MAN:R2",
"Reactome:179882",
"Reactome:197745",
"Reactome:109852",
"Reactome:177939",
"Reactome:109795",
"Reactome:109794",
"Reactome:109782",
"Reactome:179820",
"Reactome:179803",
"Reactome:179838",
"Reactome:177925",
"Reactome:109829",
"Reactome:109783",
"Reactome:177942"
]
},
"id" : "MAP:Plasmamembrane",
"is_abstract" : 0,
"sbo" : 290,
"type" : "Compartment"
},
{
"data" : {
"label" : "Nucleus",
"ref" : "MAP:Nucleus",
"subnodes" : [
"MAP:UP19419_NU(1-428)",
"Reactome:29358",
"Reactome:198666",
"MAP:UP19419_NU(1-428)_pho324pho336pho383pho389pho422",
"Reactome:112359",
"Reactome:198710",
"Reactome:109845",
"Reactome:113582"
]
},
"id" : "MAP:Nucleus",
"is_abstract" : 0,
"sbo" : 290,
"type" : "Compartment"
},
{
"data" : {
"label" : "Cytosol",
"ref" : "MAP:Cytosol",
"subnodes" : [
"MAP:Cx156",
"Reactome:109848",
"Reactome:109867",
"MAP:UP31946_CY",
"Reactome:180276",
"Reactome:180304",
"Reactome:109843",
"Reactome:179849",
"MAP:Cb17552_CY",
"Reactome:112374",
"MAP:UQ07889_CY",
"MAP:Cx114",
"Reactome:109804",
"Reactome:109787",
"Reactome:112340",
"MAP:UP29353_CY",
"MAP:UQ02750_CY",
"MAP:Cb16761_CY",
"Reactome:109860",
"Reactome:112398",
"MAP:UP62993_CY",
"MAP:Cb15996_CY",
"Reactome:109865",
"Reactome:180344",
"MAP:C3",
"MAP:UP04049_CY_pho259pho621",
"MAP:Cs56-65-5_CY",
"MAP:UP36507_CY",
"MAP:UP27361_CY_pho202pho204",
"MAP:UQ02750_CY_pho218pho222",
"MAP:UQ13480_CY",
"Reactome:112339",
"Reactome:109863",
"Reactome:109844",
"Reactome:109838",
"Reactome:179791",
"MAP:C2",
"MAP:UP27361_CY",
"Reactome:109857"
]
},
"id" : "MAP:Cytosol",
"is_abstract" : 0,
"sbo" : 290,
"type" : "Compartment"
}
]
}; | taye/adeyemitaye-biographer-interactjs | src/test/environment/resources/examples/complex_cp.js | JavaScript | lgpl-3.0 | 146,668 |
#include "gblackboard_p.h"
#include "gblackboard_p_p.h"
#include "gghosttree_p.h"
#include "gghostnode_p.h"
typedef QHash<QQmlEngine *, QPointer<GBlackboard> > GlobalBlackboards;
Q_GLOBAL_STATIC(GlobalBlackboards, theGlobalBlackboards)
// class GBlackboard
GBlackboard::GBlackboard(QObject *parent)
: QObject(*new GBlackboardPrivate(), parent)
{
Q_D(GBlackboard);
d->targetNode = qobject_cast<GGhostNode *>(parent);
if (d->targetNode) {
connect(d->targetNode, &GGhostNode::statusChanged,
[this](Ghost::Status status) {
if (Ghost::StandBy == status) {
this->clear();
}
});
d->masterTree = d->targetNode->masterTree();
} else {
d->masterTree = qobject_cast<GGhostTree *>(parent);
if (d->masterTree) {
connect(d->masterTree, &GGhostTree::statusChanged,
[this](Ghost::Status status) {
if (Ghost::StandBy == status) {
this->clear();
}
});
}
}
}
GBlackboard *GBlackboard::qmlAttachedProperties(QObject *target)
{
return new GBlackboard(target);
}
GBlackboard *GBlackboard::globalBlackboard() const
{
Q_D(const GBlackboard);
if (d->globalBlackboard) {
return d->globalBlackboard;
}
QQmlContext *context = qmlContext(d->parent);
if (nullptr == context) {
Q_CHECK_PTR(context);
return nullptr;
}
QQmlEngine *engine = context->engine();
if (nullptr == engine) {
Q_CHECK_PTR(engine);
return nullptr;
}
QPointer<GBlackboard> blackboard = theGlobalBlackboards()->value(engine);
if (blackboard.isNull()) {
blackboard = new GBlackboard(engine);
theGlobalBlackboards()->insert(engine, blackboard);
}
GBlackboardPrivate *_this = const_cast<GBlackboardPrivate *>(d);
_this->globalBlackboard = blackboard.data();
return d->globalBlackboard;
}
GBlackboard *GBlackboard::sharedBlackboard() const
{
Q_D(const GBlackboard);
if (d->sharedBlackboard) {
return d->sharedBlackboard;
}
if (!d->masterTree) {
qWarning("GtGhost : Master tree is null.");
return nullptr;
}
QObject *attached = qmlAttachedPropertiesObject<GBlackboard>(d->masterTree);
if (attached) {
GBlackboardPrivate *_this = const_cast<GBlackboardPrivate *>(d);
_this->sharedBlackboard = qobject_cast<GBlackboard *>(attached);
}
return d->sharedBlackboard;
}
bool GBlackboard::has(const QString &key) const
{
Q_D(const GBlackboard);
return d->datas.contains(key);
}
void GBlackboard::set(const QString &key, const QJSValue &value)
{
Q_D(GBlackboard);
if (value.isUndefined()) {
d->datas.remove(key);
} else {
d->datas.insert(key, value);
}
}
QJSValue GBlackboard::get(const QString &key) const
{
Q_D(const GBlackboard);
return d->datas.value(key);
}
void GBlackboard::unset(const QString &key)
{
Q_D(GBlackboard);
d->datas.remove(key);
}
void GBlackboard::clear()
{
Q_D(GBlackboard);
d->datas.clear();
}
// class GBlackboardPrivate
GBlackboardPrivate::GBlackboardPrivate()
: masterTree(nullptr)
, targetNode(nullptr)
, globalBlackboard(nullptr)
, sharedBlackboard(nullptr)
{
}
GBlackboardPrivate::~GBlackboardPrivate()
{
}
| echowalways/GtGhost | src/ghost/kernel/gblackboard.cpp | C++ | lgpl-3.0 | 3,388 |
/*
* Copyright (C) 2006-2010 Alfresco Software Limited.
*
* This file is part of Alfresco
*
* Alfresco is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Alfresco is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
*/
package org.alfresco.jlan.client;
import org.alfresco.jlan.smb.PCShare;
import org.alfresco.jlan.smb.SMBDeviceType;
import org.alfresco.jlan.smb.SMBException;
/**
* SMB print session class
*
* <p>The print session allows a new print job to be created, using the SMBFile
* class or as an SMBOutputStream.
*
* <p>When the SMBFile/SMBOutputStream is closed the print job will be queued to
* the remote printer.
*
* <p>A print session is created using the SessionFactory.OpenPrinter() method. The
* SessionFactory negotiates the appropriate SMB dialect and creates the appropriate
* PrintSession derived object.
*
* @see SessionFactory
*
* @author gkspencer
*/
public abstract class PrintSession extends Session {
// Print modes
public static final int TextMode = 0;
public static final int GraphicsMode = 1;
// Default number of print queue entries to return
public static final int DefaultEntryCount = 20;
/**
* Construct an SMB print session
*
* @param shr Remote server details
* @param dialect SMB dialect that this session is using
*/
protected PrintSession(PCShare shr, int dialect) {
super(shr, dialect, null);
// Set the device type
this.setDeviceType(SMBDeviceType.Printer);
}
/**
* Determine if the print session has been closed.
*
* @return true if the print session has been closed, else false.
*/
protected final boolean isClosed() {
return m_treeid == Closed ? true : false;
}
/**
* Open a spool file on the remote print server.
*
* @param id Identifier string for this print request.
* @param mode Print mode, either TextMode or GraphicsMode.
* @param setuplen Length of data in the start of the spool file that is printer setup code.
* @return SMBFile for the new spool file, else null.
* @exception java.io.IOException If an I/O error occurs.
* @exception SMBException If an SMB level error occurs
*/
public abstract SMBFile OpenSpoolFile(String id, int mode, int setuplen)
throws java.io.IOException, SMBException;
/**
* Open a spool file as an output stream.
*
* @param id Identifier string for this print request.
* @param mode Print mode, either TextMode or GraphicsMode.
* @param setuplen Length of data in the start of the spool file that is printer setup code.
* @return SMBOutputStream for the spool file, else null.
* @exception java.io.IOException If an I/O error occurs.
* @exception SMBException If an SMB level error occurs
*/
public SMBOutputStream OpenSpoolStream(String id, int mode, int setuplen)
throws java.io.IOException, SMBException {
// Open an SMBFile first
SMBFile sfile = OpenSpoolFile(id, mode, setuplen);
if ( sfile == null)
return null;
// Create an output stream attached to the SMBFile
return new SMBOutputStream(sfile);
}
} | loftuxab/community-edition-old | projects/alfresco-jlan/source/java/org/alfresco/jlan/client/PrintSession.java | Java | lgpl-3.0 | 3,570 |
//
// Ce fichier a été généré par l'implémentation de référence JavaTM Architecture for XML Binding (JAXB), v2.2.8-b130911.1802
// Voir <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Toute modification apportée à ce fichier sera perdue lors de la recompilation du schéma source.
// Généré le : 2015.10.08 à 11:14:04 PM CEST
//
package org.klipdev.spidergps3p.kml;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Classe Java pour vec2Type complex type.
*
* <p>Le fragment de schéma suivant indique le contenu attendu figurant dans cette classe.
*
* <pre>
* <complexType name="vec2Type">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <attribute name="x" type="{http://www.w3.org/2001/XMLSchema}double" default="1.0" />
* <attribute name="y" type="{http://www.w3.org/2001/XMLSchema}double" default="1.0" />
* <attribute name="xunits" type="{http://www.opengis.net/kml/2.2}unitsEnumType" default="fraction" />
* <attribute name="yunits" type="{http://www.opengis.net/kml/2.2}unitsEnumType" default="fraction" />
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "vec2Type")
public class Vec2Type {
@XmlAttribute(name = "x")
protected Double x;
@XmlAttribute(name = "y")
protected Double y;
@XmlAttribute(name = "xunits")
protected UnitsEnumType xunits;
@XmlAttribute(name = "yunits")
protected UnitsEnumType yunits;
/**
* Obtient la valeur de la propriété x.
*
* @return
* possible object is
* {@link Double }
*
*/
public double getX() {
if (x == null) {
return 1.0D;
} else {
return x;
}
}
/**
* Définit la valeur de la propriété x.
*
* @param value
* allowed object is
* {@link Double }
*
*/
public void setX(Double value) {
this.x = value;
}
/**
* Obtient la valeur de la propriété y.
*
* @return
* possible object is
* {@link Double }
*
*/
public double getY() {
if (y == null) {
return 1.0D;
} else {
return y;
}
}
/**
* Définit la valeur de la propriété y.
*
* @param value
* allowed object is
* {@link Double }
*
*/
public void setY(Double value) {
this.y = value;
}
/**
* Obtient la valeur de la propriété xunits.
*
* @return
* possible object is
* {@link UnitsEnumType }
*
*/
public UnitsEnumType getXunits() {
if (xunits == null) {
return UnitsEnumType.FRACTION;
} else {
return xunits;
}
}
/**
* Définit la valeur de la propriété xunits.
*
* @param value
* allowed object is
* {@link UnitsEnumType }
*
*/
public void setXunits(UnitsEnumType value) {
this.xunits = value;
}
/**
* Obtient la valeur de la propriété yunits.
*
* @return
* possible object is
* {@link UnitsEnumType }
*
*/
public UnitsEnumType getYunits() {
if (yunits == null) {
return UnitsEnumType.FRACTION;
} else {
return yunits;
}
}
/**
* Définit la valeur de la propriété yunits.
*
* @param value
* allowed object is
* {@link UnitsEnumType }
*
*/
public void setYunits(UnitsEnumType value) {
this.yunits = value;
}
}
| klipdev/SpiderGps | workspace/SpiderGps/src3p/org/klipdev/spidergps3p/kml/Vec2Type.java | Java | lgpl-3.0 | 3,972 |
<?php
namespace ConfigTest;
class TokenProcessorTest extends \PHPUnit_Framework_TestCase
{
public function testInstantiate()
{
}
}
| cammanderson/phruts | tests/ConfigTest/TokenProcessorTest.php | PHP | lgpl-3.0 | 145 |
<?php
namespace Database\Media\om;
use \Criteria;
use \Exception;
use \ModelCriteria;
use \ModelJoin;
use \PDO;
use \Propel;
use \PropelCollection;
use \PropelException;
use \PropelObjectCollection;
use \PropelPDO;
use Database\Media\Artist;
use Database\Media\Media;
use Database\Media\MediaToArtist;
use Database\Media\MediaToArtistPeer;
use Database\Media\MediaToArtistQuery;
/**
* Base class that represents a query for the 'net_bazzline_media_library_media_to_artist' table.
*
*
*
* This class was autogenerated by Propel 1.7.1 on:
*
* Wed Oct 1 21:22:56 2014
*
* @method MediaToArtistQuery orderById($order = Criteria::ASC) Order by the id column
* @method MediaToArtistQuery orderByMediaId($order = Criteria::ASC) Order by the media_id column
* @method MediaToArtistQuery orderByArtistId($order = Criteria::ASC) Order by the artist_id column
*
* @method MediaToArtistQuery groupById() Group by the id column
* @method MediaToArtistQuery groupByMediaId() Group by the media_id column
* @method MediaToArtistQuery groupByArtistId() Group by the artist_id column
*
* @method MediaToArtistQuery leftJoin($relation) Adds a LEFT JOIN clause to the query
* @method MediaToArtistQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query
* @method MediaToArtistQuery innerJoin($relation) Adds a INNER JOIN clause to the query
*
* @method MediaToArtistQuery leftJoinMedia($relationAlias = null) Adds a LEFT JOIN clause to the query using the Media relation
* @method MediaToArtistQuery rightJoinMedia($relationAlias = null) Adds a RIGHT JOIN clause to the query using the Media relation
* @method MediaToArtistQuery innerJoinMedia($relationAlias = null) Adds a INNER JOIN clause to the query using the Media relation
*
* @method MediaToArtistQuery leftJoinArtist($relationAlias = null) Adds a LEFT JOIN clause to the query using the Artist relation
* @method MediaToArtistQuery rightJoinArtist($relationAlias = null) Adds a RIGHT JOIN clause to the query using the Artist relation
* @method MediaToArtistQuery innerJoinArtist($relationAlias = null) Adds a INNER JOIN clause to the query using the Artist relation
*
* @method MediaToArtist findOne(PropelPDO $con = null) Return the first MediaToArtist matching the query
* @method MediaToArtist findOneOrCreate(PropelPDO $con = null) Return the first MediaToArtist matching the query, or a new MediaToArtist object populated from the query conditions when no match is found
*
* @method MediaToArtist findOneByMediaId(string $media_id) Return the first MediaToArtist filtered by the media_id column
* @method MediaToArtist findOneByArtistId(string $artist_id) Return the first MediaToArtist filtered by the artist_id column
*
* @method array findById(string $id) Return MediaToArtist objects filtered by the id column
* @method array findByMediaId(string $media_id) Return MediaToArtist objects filtered by the media_id column
* @method array findByArtistId(string $artist_id) Return MediaToArtist objects filtered by the artist_id column
*
* @package propel.generator.Media.om
*/
abstract class BaseMediaToArtistQuery extends ModelCriteria
{
/**
* Initializes internal state of BaseMediaToArtistQuery object.
*
* @param string $dbName The dabase name
* @param string $modelName The phpName of a model, e.g. 'Book'
* @param string $modelAlias The alias for the model in this query, e.g. 'b'
*/
public function __construct($dbName = null, $modelName = null, $modelAlias = null)
{
if (null === $dbName) {
$dbName = 'netBazzlineMediaLibrary';
}
if (null === $modelName) {
$modelName = 'Database\\Media\\MediaToArtist';
}
parent::__construct($dbName, $modelName, $modelAlias);
}
/**
* Returns a new MediaToArtistQuery object.
*
* @param string $modelAlias The alias of a model in the query
* @param MediaToArtistQuery|Criteria $criteria Optional Criteria to build the query from
*
* @return MediaToArtistQuery
*/
public static function create($modelAlias = null, $criteria = null)
{
if ($criteria instanceof MediaToArtistQuery) {
return $criteria;
}
$query = new MediaToArtistQuery(null, null, $modelAlias);
if ($criteria instanceof Criteria) {
$query->mergeWith($criteria);
}
return $query;
}
/**
* Find object by primary key.
* Propel uses the instance pool to skip the database if the object exists.
* Go fast if the query is untouched.
*
* <code>
* $obj = $c->findPk(12, $con);
* </code>
*
* @param mixed $key Primary key to use for the query
* @param PropelPDO $con an optional connection object
*
* @return MediaToArtist|MediaToArtist[]|mixed the result, formatted by the current formatter
*/
public function findPk($key, $con = null)
{
if ($key === null) {
return null;
}
if ((null !== ($obj = MediaToArtistPeer::getInstanceFromPool((string) $key))) && !$this->formatter) {
// the object is already in the instance pool
return $obj;
}
if ($con === null) {
$con = Propel::getConnection(MediaToArtistPeer::DATABASE_NAME, Propel::CONNECTION_READ);
}
$this->basePreSelect($con);
if ($this->formatter || $this->modelAlias || $this->with || $this->select
|| $this->selectColumns || $this->asColumns || $this->selectModifiers
|| $this->map || $this->having || $this->joins) {
return $this->findPkComplex($key, $con);
} else {
return $this->findPkSimple($key, $con);
}
}
/**
* Alias of findPk to use instance pooling
*
* @param mixed $key Primary key to use for the query
* @param PropelPDO $con A connection object
*
* @return MediaToArtist A model object, or null if the key is not found
* @throws PropelException
*/
public function findOneById($key, $con = null)
{
return $this->findPk($key, $con);
}
/**
* Find object by primary key using raw SQL to go fast.
* Bypass doSelect() and the object formatter by using generated code.
*
* @param mixed $key Primary key to use for the query
* @param PropelPDO $con A connection object
*
* @return MediaToArtist A model object, or null if the key is not found
* @throws PropelException
*/
protected function findPkSimple($key, $con)
{
$sql = 'SELECT id, media_id, artist_id FROM net_bazzline_media_library_media_to_artist WHERE id = :p0';
try {
$stmt = $con->prepare($sql);
$stmt->bindValue(':p0', $key, PDO::PARAM_STR);
$stmt->execute();
} catch (Exception $e) {
Propel::log($e->getMessage(), Propel::LOG_ERR);
throw new PropelException(sprintf('Unable to execute SELECT statement [%s]', $sql), $e);
}
$obj = null;
if ($row = $stmt->fetch(PDO::FETCH_NUM)) {
$obj = new MediaToArtist();
$obj->hydrate($row);
MediaToArtistPeer::addInstanceToPool($obj, (string) $key);
}
$stmt->closeCursor();
return $obj;
}
/**
* Find object by primary key.
*
* @param mixed $key Primary key to use for the query
* @param PropelPDO $con A connection object
*
* @return MediaToArtist|MediaToArtist[]|mixed the result, formatted by the current formatter
*/
protected function findPkComplex($key, $con)
{
// As the query uses a PK condition, no limit(1) is necessary.
$criteria = $this->isKeepQuery() ? clone $this : $this;
$stmt = $criteria
->filterByPrimaryKey($key)
->doSelect($con);
return $criteria->getFormatter()->init($criteria)->formatOne($stmt);
}
/**
* Find objects by primary key
* <code>
* $objs = $c->findPks(array(12, 56, 832), $con);
* </code>
* @param array $keys Primary keys to use for the query
* @param PropelPDO $con an optional connection object
*
* @return PropelObjectCollection|MediaToArtist[]|mixed the list of results, formatted by the current formatter
*/
public function findPks($keys, $con = null)
{
if ($con === null) {
$con = Propel::getConnection($this->getDbName(), Propel::CONNECTION_READ);
}
$this->basePreSelect($con);
$criteria = $this->isKeepQuery() ? clone $this : $this;
$stmt = $criteria
->filterByPrimaryKeys($keys)
->doSelect($con);
return $criteria->getFormatter()->init($criteria)->format($stmt);
}
/**
* Filter the query by primary key
*
* @param mixed $key Primary key to use for the query
*
* @return MediaToArtistQuery The current query, for fluid interface
*/
public function filterByPrimaryKey($key)
{
return $this->addUsingAlias(MediaToArtistPeer::ID, $key, Criteria::EQUAL);
}
/**
* Filter the query by a list of primary keys
*
* @param array $keys The list of primary key to use for the query
*
* @return MediaToArtistQuery The current query, for fluid interface
*/
public function filterByPrimaryKeys($keys)
{
return $this->addUsingAlias(MediaToArtistPeer::ID, $keys, Criteria::IN);
}
/**
* Filter the query on the id column
*
* Example usage:
* <code>
* $query->filterById('fooValue'); // WHERE id = 'fooValue'
* $query->filterById('%fooValue%'); // WHERE id LIKE '%fooValue%'
* </code>
*
* @param string $id The value to use as filter.
* Accepts wildcards (* and % trigger a LIKE)
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return MediaToArtistQuery The current query, for fluid interface
*/
public function filterById($id = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($id)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $id)) {
$id = str_replace('*', '%', $id);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(MediaToArtistPeer::ID, $id, $comparison);
}
/**
* Filter the query on the media_id column
*
* Example usage:
* <code>
* $query->filterByMediaId('fooValue'); // WHERE media_id = 'fooValue'
* $query->filterByMediaId('%fooValue%'); // WHERE media_id LIKE '%fooValue%'
* </code>
*
* @param string $mediaId The value to use as filter.
* Accepts wildcards (* and % trigger a LIKE)
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return MediaToArtistQuery The current query, for fluid interface
*/
public function filterByMediaId($mediaId = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($mediaId)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $mediaId)) {
$mediaId = str_replace('*', '%', $mediaId);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(MediaToArtistPeer::MEDIA_ID, $mediaId, $comparison);
}
/**
* Filter the query on the artist_id column
*
* Example usage:
* <code>
* $query->filterByArtistId('fooValue'); // WHERE artist_id = 'fooValue'
* $query->filterByArtistId('%fooValue%'); // WHERE artist_id LIKE '%fooValue%'
* </code>
*
* @param string $artistId The value to use as filter.
* Accepts wildcards (* and % trigger a LIKE)
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return MediaToArtistQuery The current query, for fluid interface
*/
public function filterByArtistId($artistId = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($artistId)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $artistId)) {
$artistId = str_replace('*', '%', $artistId);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(MediaToArtistPeer::ARTIST_ID, $artistId, $comparison);
}
/**
* Filter the query by a related Media object
*
* @param Media|PropelObjectCollection $media The related object(s) to use as filter
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return MediaToArtistQuery The current query, for fluid interface
* @throws PropelException - if the provided filter is invalid.
*/
public function filterByMedia($media, $comparison = null)
{
if ($media instanceof Media) {
return $this
->addUsingAlias(MediaToArtistPeer::MEDIA_ID, $media->getId(), $comparison);
} elseif ($media instanceof PropelObjectCollection) {
if (null === $comparison) {
$comparison = Criteria::IN;
}
return $this
->addUsingAlias(MediaToArtistPeer::MEDIA_ID, $media->toKeyValue('PrimaryKey', 'Id'), $comparison);
} else {
throw new PropelException('filterByMedia() only accepts arguments of type Media or PropelCollection');
}
}
/**
* Adds a JOIN clause to the query using the Media relation
*
* @param string $relationAlias optional alias for the relation
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
*
* @return MediaToArtistQuery The current query, for fluid interface
*/
public function joinMedia($relationAlias = null, $joinType = Criteria::INNER_JOIN)
{
$tableMap = $this->getTableMap();
$relationMap = $tableMap->getRelation('Media');
// create a ModelJoin object for this join
$join = new ModelJoin();
$join->setJoinType($joinType);
$join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias);
if ($previousJoin = $this->getPreviousJoin()) {
$join->setPreviousJoin($previousJoin);
}
// add the ModelJoin to the current object
if ($relationAlias) {
$this->addAlias($relationAlias, $relationMap->getRightTable()->getName());
$this->addJoinObject($join, $relationAlias);
} else {
$this->addJoinObject($join, 'Media');
}
return $this;
}
/**
* Use the Media relation Media object
*
* @see useQuery()
*
* @param string $relationAlias optional alias for the relation,
* to be used as main alias in the secondary query
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
*
* @return \Database\Media\MediaQuery A secondary query class using the current class as primary query
*/
public function useMediaQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN)
{
return $this
->joinMedia($relationAlias, $joinType)
->useQuery($relationAlias ? $relationAlias : 'Media', '\Database\Media\MediaQuery');
}
/**
* Filter the query by a related Artist object
*
* @param Artist|PropelObjectCollection $artist The related object(s) to use as filter
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return MediaToArtistQuery The current query, for fluid interface
* @throws PropelException - if the provided filter is invalid.
*/
public function filterByArtist($artist, $comparison = null)
{
if ($artist instanceof Artist) {
return $this
->addUsingAlias(MediaToArtistPeer::ARTIST_ID, $artist->getId(), $comparison);
} elseif ($artist instanceof PropelObjectCollection) {
if (null === $comparison) {
$comparison = Criteria::IN;
}
return $this
->addUsingAlias(MediaToArtistPeer::ARTIST_ID, $artist->toKeyValue('PrimaryKey', 'Id'), $comparison);
} else {
throw new PropelException('filterByArtist() only accepts arguments of type Artist or PropelCollection');
}
}
/**
* Adds a JOIN clause to the query using the Artist relation
*
* @param string $relationAlias optional alias for the relation
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
*
* @return MediaToArtistQuery The current query, for fluid interface
*/
public function joinArtist($relationAlias = null, $joinType = Criteria::INNER_JOIN)
{
$tableMap = $this->getTableMap();
$relationMap = $tableMap->getRelation('Artist');
// create a ModelJoin object for this join
$join = new ModelJoin();
$join->setJoinType($joinType);
$join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias);
if ($previousJoin = $this->getPreviousJoin()) {
$join->setPreviousJoin($previousJoin);
}
// add the ModelJoin to the current object
if ($relationAlias) {
$this->addAlias($relationAlias, $relationMap->getRightTable()->getName());
$this->addJoinObject($join, $relationAlias);
} else {
$this->addJoinObject($join, 'Artist');
}
return $this;
}
/**
* Use the Artist relation Artist object
*
* @see useQuery()
*
* @param string $relationAlias optional alias for the relation,
* to be used as main alias in the secondary query
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
*
* @return \Database\Media\ArtistQuery A secondary query class using the current class as primary query
*/
public function useArtistQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN)
{
return $this
->joinArtist($relationAlias, $joinType)
->useQuery($relationAlias ? $relationAlias : 'Artist', '\Database\Media\ArtistQuery');
}
/**
* Exclude object from result
*
* @param MediaToArtist $mediaToArtist Object to remove from the list of results
*
* @return MediaToArtistQuery The current query, for fluid interface
*/
public function prune($mediaToArtist = null)
{
if ($mediaToArtist) {
$this->addUsingAlias(MediaToArtistPeer::ID, $mediaToArtist->getId(), Criteria::NOT_EQUAL);
}
return $this;
}
}
| stevleibelt/media_library | application/Database/Media/om/BaseMediaToArtistQuery.php | PHP | lgpl-3.0 | 19,447 |
/*****************************************************************************
** Copyright (c) 2012 Ushahidi Inc
** All rights reserved
** Contact: [email protected]
** Website: http://www.ushahidi.com
**
** GNU Lesser General Public License Usage
** This file may be used under the terms of the GNU Lesser
** General Public License version 3 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 3 requirements
** will be met: http://www.gnu.org/licenses/lgpl.html.
**
**
** If you have questions regarding the use of this file, please contact
** Ushahidi developers at [email protected].
**
*****************************************************************************/
#import <Ushahidi/USHAddViewController.h>
#import <Ushahidi/USHDatePicker.h>
#import <Ushahidi/USHLocator.h>
#import <Ushahidi/USHImagePicker.h>
#import <Ushahidi/USHVideoPicker.h>
#import <Ushahidi/USHLoginDialog.h>
#import <Ushahidi/Ushahidi.h>
#import <Ushahidi/USHShareController.h>
#import "USHInputTableCell.h"
#import "USHCustomFieldsAddViewController.h"
@class USHCategoryTableViewController;
@class USHLocationAddViewController;
@class USHSettingsViewController;
@class USHMap;
@class USHReport;
@interface USHReportAddViewController : USHAddViewController<UshahidiDelegate,
USHDatePickerDelegate,
UIAlertViewDelegate,
USHLocatorDelegate,
USHImagePickerDelegate,
USHVideoPickerDelegate,
USHInputTableCellDelegate,
USHLoginDialogDelegate,
USHShareControllerDelegate>
@property (retain, nonatomic) IBOutlet USHCustomFieldsAddViewController *customFiedlsAddViewController;
@property (strong, nonatomic) IBOutlet USHCategoryTableViewController *categoryTableController;
@property (strong, nonatomic) IBOutlet USHLocationAddViewController *locationAddViewController;
@property (strong, nonatomic) IBOutlet USHSettingsViewController *settingsViewController;
@property (strong, nonatomic) USHMap *map;
@property (strong, nonatomic) USHReport *report;
@property (assign, nonatomic) BOOL openGeoSMS;
- (IBAction)info:(id)sender event:(UIEvent*)event;
@end
| ccarducci/Ushahidi_local | App/Classes/Controllers/USHReportAddViewController.h | C | lgpl-3.0 | 2,719 |
// Created file "Lib\src\dxguid\X64\d3d9guid"
typedef struct _GUID
{
unsigned long Data1;
unsigned short Data2;
unsigned short Data3;
unsigned char Data4[8];
} GUID;
#define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \
extern const GUID name = { l, w1, w2, { b1, b2, b3, b4, b5, b6, b7, b8 } }
DEFINE_GUID(PPM_THERMAL_POLICY_CHANGE_GUID, 0x48f377b8, 0x6880, 0x4c7b, 0x8b, 0xdc, 0x38, 0x01, 0x76, 0xc6, 0x65, 0x4d);
| Frankie-PellesC/fSDK | Lib/src/dxguid/X64/d3d9guid00000078.c | C | lgpl-3.0 | 469 |
package com.pahlsoft.ws.iaas.provision.deploy.behaviors;
import org.apache.log4j.Logger;
import com.pahlsoft.ws.iaas.provision.generated.InstructionType;
import com.pahlsoft.ws.iaas.provision.generated.ProvisionProperties;
import com.pahlsoft.ws.iaas.provision.generated.ProvisionResponse;
import com.pahlsoft.ws.iaas.utilities.PropertyParser;
public class JbossDeployBehavior implements DeployBehavior {
public Logger LOG = Logger.getLogger(JbossDeployBehavior.class);
public ProvisionResponse pr = new ProvisionResponse();
public ProvisionResponse deploy(String hostname, ProvisionProperties props) {
LOG.info("Deploying JBOSS :" + hostname);
PropertyParser.listProps(props);
pr.setHostname(hostname);
pr.setProperties(props);
pr.setInstruction(InstructionType.DEPLOY);
pr.setStatus(true);
return pr;
}
public ProvisionResponse redeploy(String hostname, ProvisionProperties props) {
LOG.info("Redeploying JBOSS :" + hostname);
PropertyParser.listProps(props);
pr.setHostname(hostname);
pr.setProperties(props);
pr.setInstruction(InstructionType.REDEPLOY);
pr.setStatus(true);
return pr;
}
public ProvisionResponse clean(String hostname, ProvisionProperties props) {
LOG.info("Cleaning JBOSS :" + hostname);
PropertyParser.listProps(props);
pr.setHostname(hostname);
pr.setProperties(props);
pr.setInstruction(InstructionType.CLEAN);
pr.setStatus(true);
return pr;
}
public ProvisionResponse backup(String hostname, ProvisionProperties props) {
LOG.info("Backing Up JBOSS :" + hostname);
PropertyParser.listProps(props);
pr.setHostname(hostname);
pr.setProperties(props);
pr.setInstruction(InstructionType.BACKUP);
pr.setStatus(true);
return pr;
}
public ProvisionResponse configure(String hostname, ProvisionProperties props) {
LOG.info("Configuring JBOSS :" + hostname);
PropertyParser.listProps(props);
pr.setHostname(hostname);
pr.setProperties(props);
pr.setInstruction(InstructionType.CONFIGURE);
pr.setStatus(true);
return pr;
}
public ProvisionResponse install(String hostname, ProvisionProperties props) {
LOG.info("Installing JBOSS :" + hostname);
PropertyParser.listProps(props);
pr.setHostname(hostname);
pr.setProperties(props);
pr.setInstruction(InstructionType.INSTALL);
pr.setStatus(true);
return pr;
}
}
| ajpahl1008/iaas | iaas-provision-service/src/main/java/com/pahlsoft/ws/iaas/provision/behaviors/deploy/JbossDeployBehavior.java | Java | lgpl-3.0 | 2,342 |
package org.eso.ias.cdb;
import org.eso.ias.cdb.json.CdbFiles;
import org.eso.ias.cdb.json.CdbJsonFiles;
import org.eso.ias.cdb.json.JsonReader;
import org.eso.ias.cdb.rdb.RdbReader;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.lang.reflect.Constructor;
import java.util.Arrays;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
/**
* The factory to get the CdbReader implementation to use.
*
* This class checks the parameters of the command line, the java properties
* and the environment variable to build and return the {@link CdbReader} to use
* for reading the CDB.
*
* It offers a common strategy to be used consistently by all the IAS tools.
*
* The strategy is as follow:
* - if -cdbClass java.class param is present in the command line then the passed class
* is dynamically loaded and built (empty constructor); the configuration
* parameters eventually expected by such class will be passed by means of java
* properties (-D...)
* - else if jCdb file.path param is present in the command line then the JSON CDB
* implementation will be returned passing the passed file path
* - else the RDB implementation is returned (note that the parameters to connect to the RDB are passed
* in the hibernate configuration file
*
* RDB implementation is the fallback if none of the other possibilities succeeds.
*
*/
public class CdbReaderFactory {
/**
* The logger
*/
private static final Logger logger = LoggerFactory.getLogger(CdbReaderFactory.class);
/**
* The parameter to set in the command line to build a CdbReader from a custom java class
*/
public static final String cdbClassCmdLineParam="-cdbClass";
/**
* The long parameter to set in the command line to build a JSON CdbReader
*/
public static final String jsonCdbCmdLineParamLong ="-jCdb";
/**
* The short parameter to set in the command line to build a JSON CdbReader
*/
public static final String jsonCdbCmdLineParamShort ="-j";
/**
* get the value of the passed parameter from the eray of strings.
*
* The value of the parameter is in the position next to the passed param name like in
* -jcdb path
*
* @param paramName the not null nor empty parameter
* @param cmdLine the command line
* @return the value of the parameter or empty if not found in the command line
*/
private static Optional<String> getValueOfParam(String paramName, String cmdLine[]) {
if (paramName==null || paramName.isEmpty()) {
throw new IllegalArgumentException("Invalid null/empty name of parameter");
}
if (cmdLine==null || cmdLine.length<2) {
return Optional.empty();
}
List<String> params = Arrays.asList(cmdLine);
int pos=params.indexOf(paramName);
if (pos==-1) {
// Not found
return Optional.empty();
}
String ret = null;
try {
ret=params.get(pos+1);
} catch (IndexOutOfBoundsException e) {
logger.error("Missing parameter for {}}",paramName);
}
return Optional.ofNullable(ret);
}
/**
* Build and return the user provided CdbReader from the passed class using introspection
*
* @param cls The class implementing the CdbReader
* @return the user defined CdbReader
*/
private static final CdbReader loadUserDefinedReader(String cls) throws IasCdbException {
if (cls==null || cls.isEmpty()) {
throw new IllegalArgumentException("Invalid null/empty class");
}
ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
Class<?> theClass=null;
try {
theClass=classLoader.loadClass(cls);
} catch (Exception e) {
throw new IasCdbException("Error loading the external class "+cls,e);
}
Constructor constructor = null;
try {
constructor=theClass.getConstructor(null);
} catch (Exception e) {
throw new IasCdbException("Error getting the default (empty) constructor of the external class "+cls,e);
}
Object obj=null;
try {
obj=constructor.newInstance(null);
} catch (Exception e) {
throw new IasCdbException("Error building an object of the external class "+cls,e);
}
return (CdbReader)obj;
}
/**
* Gets and return the CdbReader to use to read the CDB applying the policiy described in the javadoc
* of the class
*
* @param cmdLine The command line
* @return the CdbReader to read th CDB
* @throws Exception in case of error building the CdbReader
*/
public static CdbReader getCdbReader(String[] cmdLine) throws Exception {
Objects.requireNonNull(cmdLine,"Invalid null command line");
Optional<String> userCdbReader = getValueOfParam(cdbClassCmdLineParam,cmdLine);
if (userCdbReader.isPresent()) {
logger.info("Using external (user provided) CdbReader from class {}",userCdbReader.get());
return loadUserDefinedReader(userCdbReader.get());
} else {
logger.debug("No external CdbReader found");
}
Optional<String> jsonCdbReaderS = getValueOfParam(jsonCdbCmdLineParamShort,cmdLine);
Optional<String> jsonCdbReaderL = getValueOfParam(jsonCdbCmdLineParamLong,cmdLine);
if (jsonCdbReaderS.isPresent() && jsonCdbReaderL.isPresent()) {
throw new Exception("JSON CDB path defined twice: check "+jsonCdbCmdLineParamShort+"and "+jsonCdbCmdLineParamLong+" params in cmd line");
}
if (jsonCdbReaderL.isPresent() || jsonCdbReaderS.isPresent()) {
String cdbPath = jsonCdbReaderL.orElseGet(() -> jsonCdbReaderS.get());
logger.info("Loading JSON CdbReader with folder {}",cdbPath);
CdbFiles cdbfiles = new CdbJsonFiles(cdbPath);
return new JsonReader(cdbfiles);
} else {
logger.debug("NO JSON CdbReader requested");
}
return new RdbReader();
}
}
| IntegratedAlarmSystem-Group/ias | Cdb/src/main/java/org/eso/ias/cdb/CdbReaderFactory.java | Java | lgpl-3.0 | 6,266 |
<html dir="LTR" xmlns:ndoc="urn:ndoc-schema">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta content="history" name="save" />
<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5" />
<title>Trace Method</title>
<xml>
</xml>
<link rel="stylesheet" type="text/css" href="MSDN.css" />
</head>
<body id="bodyID" class="dtBODY">
<div id="nsbanner">
<div id="bannerrow1">
<table class="bannerparthead" cellspacing="0">
<tr id="hdr">
<td class="runninghead">Common Logging 2.0 API Reference</td>
<td class="product">
</td>
</tr>
</table>
</div>
<div id="TitleRow">
<h1 class="dtH1">AbstractLogger.Trace Method</h1>
</div>
</div>
<div id="nstext">
<p> Log a message with the <a href="Common.Logging~Common.Logging.LogLevel.html">Trace</a> level using a callback to obtain the message </p>
<h4 class="dtH4">Overload List</h4>
<p> Log a message with the <a href="Common.Logging~Common.Logging.LogLevel.html">Trace</a> level using a callback to obtain the message </p>
<blockquote class="dtBlock">
<a href="Common.Logging~Common.Logging.Factory.AbstractLogger.Trace3.html">public virtual void Trace(Action<FormatMessageHandler>)</a>
</blockquote>
<p> Log a message with the <a href="Common.Logging~Common.Logging.LogLevel.html">Trace</a> level using a callback to obtain the message </p>
<blockquote class="dtBlock">
<a href="Common.Logging~Common.Logging.Factory.AbstractLogger.Trace4.html">public virtual void Trace(Action<FormatMessageHandler>,Exception)</a>
</blockquote>
<p> Log a message with the <a href="Common.Logging~Common.Logging.LogLevel.html">Trace</a> level using a callback to obtain the message </p>
<blockquote class="dtBlock">
<a href="Common.Logging~Common.Logging.Factory.AbstractLogger.Trace5.html">public virtual void Trace(IFormatProvider,Action<FormatMessageHandler>)</a>
</blockquote>
<p> Log a message with the <a href="Common.Logging~Common.Logging.LogLevel.html">Trace</a> level using a callback to obtain the message </p>
<blockquote class="dtBlock">
<a href="Common.Logging~Common.Logging.Factory.AbstractLogger.Trace6.html">public virtual void Trace(IFormatProvider,Action<FormatMessageHandler>,Exception)</a>
</blockquote>
<p> Log a message object with the <a href="Common.Logging~Common.Logging.LogLevel.html">Trace</a> level. </p>
<blockquote class="dtBlock">
<a href="Common.Logging~Common.Logging.Factory.AbstractLogger.Trace1.html">public virtual void Trace(object)</a>
</blockquote>
<p> Log a message object with the <a href="Common.Logging~Common.Logging.LogLevel.html">Trace</a> level including the stack trace of the <a href="http://msdn.microsoft.com/en-us/library/System.Exception(VS.80).aspx">Exception</a> passed as a parameter. </p>
<blockquote class="dtBlock">
<a href="Common.Logging~Common.Logging.Factory.AbstractLogger.Trace2.html">public virtual void Trace(object,Exception)</a>
</blockquote>
<h4 class="dtH4">See Also</h4>
<p>
<a href="Common.Logging~Common.Logging.Factory.AbstractLogger.html">AbstractLogger Class</a> | <a href="Common.Logging~Common.Logging.Factory.html">Common.Logging.Factory Namespace</a></p>
<hr />
<div id="footer">
<p>
<a href="mailto:[email protected]?subject=Common%20Logging%202.0%20API%20Reference%20Documentation%20Feedback:%20AbstractLogger.Trace Method">Send comments on this topic.</a>
</p>
<p>
<a>© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.</a>
</p>
<p>Generated from assembly Common.Logging [2.0.0.0] by <a href="http://ndoc3.sourceforget.net">NDoc3</a></p>
</div>
</div>
</body>
</html> | aozora/arashi | src/ThirdPartyLibraries/Common.Logging/doc/api/html/Common.Logging~Common.Logging.Factory.AbstractLogger.Trace~Overloads.html | HTML | lgpl-3.0 | 4,061 |
<?php
/**
* Contao Bootstrap form.
*
* @package contao-bootstrap
* @author David Molineus <[email protected]>
* @copyright 2017-2019 netzmacht David Molineus. All rights reserved.
* @license LGPL 3.0-or-later
* @filesource
*/
$GLOBALS['TL_LANG']['MSC']['bootstrapUploadButton'] = 'Choose file';
| contao-bootstrap/form | src/Resources/contao/languages/en/default.php | PHP | lgpl-3.0 | 326 |
/**
*A PUBLIC CLASS FOR ACTIONS.JAVA
*/
class Actions{
public Fonts font = new Fonts();
/**
*@see FONTS.JAVA
*this is a font class which is for changing the font, style & size
*/
public void fonT(){
font.setVisible(true); //setting the visible is true
font.pack(); //pack the panel
//making an action for ok button, so we can change the font
font.getOkjb().addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent ae){
n.getTextArea().setFont(font.font());
//after we chose the font, then the JDialog will be closed
font.setVisible(false);
}
});
//making an action for cancel button, so we can return to the old font.
font.getCajb().addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent ae){
//after we cancel the, then the JDialog will be closed
font.setVisible(false);
}
});
}
//for wraping the line & wraping the style word
public void lineWraP(){
if(n.getLineWrap().isSelected()){
/**
*make the line wrap & wrap style word is true
*when the line wrap is selected
*/
n.getTextArea().setLineWrap(true);
n.getTextArea().setWrapStyleWord(true);
}
else{
/**
*make the line wrap & wrap style word is false
*when the line wrap isn't selected
*/
n.getTextArea().setLineWrap(false);
n.getTextArea().setWrapStyleWord(false);
}
}
}
| SergiyKolesnikov/fuji | examples/Notepad_casestudies/NotepadBenDelaware/features/Font/Actions.java | Java | lgpl-3.0 | 1,444 |
"""General-use classes to interact with the ApplicationAutoScaling service through CloudFormation.
See Also:
`AWS developer guide for ApplicationAutoScaling
<https://docs.aws.amazon.com/autoscaling/application/APIReference/Welcome.html>`_
"""
# noinspection PyUnresolvedReferences
from .._raw import applicationautoscaling as _raw
# noinspection PyUnresolvedReferences
from .._raw.applicationautoscaling import *
| garyd203/flying-circus | src/flyingcircus/service/applicationautoscaling.py | Python | lgpl-3.0 | 424 |
# == Schema Information
#
# Table name: listing_shapes
#
# id :integer not null, primary key
# community_id :integer not null
# transaction_process_id :integer not null
# price_enabled :boolean not null
# shipping_enabled :boolean not null
# name :string(255) not null
# name_tr_key :string(255) not null
# action_button_tr_key :string(255) not null
# sort_priority :integer default(0), not null
# created_at :datetime not null
# updated_at :datetime not null
# deleted :boolean default(FALSE)
#
# Indexes
#
# index_listing_shapes_on_community_id (community_id)
# index_listing_shapes_on_name (name)
# multicol_index (community_id,deleted,sort_priority)
#
class ListingShape < ActiveRecord::Base
attr_accessible(
:community_id,
:transaction_process_id,
:price_enabled,
:shipping_enabled,
:name,
:sort_priority,
:name_tr_key,
:action_button_tr_key,
:price_quantity_placeholder,
:deleted
)
has_and_belongs_to_many :categories, -> { order("sort_priority") }, join_table: "category_listing_shapes"
has_many :listing_units
def self.columns
super.reject { |c| c.name == "transaction_type_id" || c.name == "price_quantity_placeholder" }
end
end
| ziyoucaishi/marketplace | app/models/listing_shape.rb | Ruby | lgpl-3.0 | 1,463 |
#pragma once
#pragma region Imported API
extern "C" NTSYSAPI NTSTATUS NTAPI ZwWaitForSingleObject(
__in HANDLE Handle,
__in BOOLEAN Alertable,
__in_opt PLARGE_INTEGER Timeout);
typedef struct _THREAD_BASIC_INFORMATION {
NTSTATUS ExitStatus;
PVOID TebBaseAddress;
CLIENT_ID ClientId;
KAFFINITY AffinityMask;
KPRIORITY Priority;
KPRIORITY BasePriority;
} THREAD_BASIC_INFORMATION, *PTHREAD_BASIC_INFORMATION;
extern "C" NTSTATUS NTAPI ZwQueryInformationThread(HANDLE ThreadHandle,
THREADINFOCLASS ThreadInformationClass,
PVOID ThreadInformation,
ULONG ThreadInformationLength,
PULONG ReturnLength);
#pragma endregion
namespace BazisLib
{
namespace _ThreadPrivate
{
//! Represents a kernel thread.
/*! The _BasicThread template class represents a single kernel thread and contains methods for controlling it.
The thread body is defined through the template parameter (DescendantClass::ThreadStarter static function
is called, passing <b>this</b> as a parameter). That allows declaring VT-less thread classes. However,
as VT is not a huge overhead, a classical pure method-based BazisLib::Win32::Thread class is provided.
*/
template <class DescendantClass> class _BasicThread
{
private:
HANDLE m_hThread;
CLIENT_ID m_ID;
protected:
typedef void _ThreadBodyReturnType;
static inline _ThreadBodyReturnType _ReturnFromThread(void *pArg, ULONG retcode)
{
PsTerminateSystemThread((NTSTATUS)retcode);
}
public:
//! Initializes the thread object, but does not start the thread
/*! This constructor does not create actual Win32 thread. To create the thread and to start it, call
the Start() method.
*/
_BasicThread() :
m_hThread(NULL)
{
m_ID.UniqueProcess = m_ID.UniqueThread = 0;
}
bool Start(HANDLE hProcessToInject = NULL)
{
if (m_hThread)
return false;
OBJECT_ATTRIBUTES threadAttr;
InitializeObjectAttributes(&threadAttr, NULL, OBJ_KERNEL_HANDLE, 0, NULL);
NTSTATUS st = PsCreateSystemThread(&m_hThread, THREAD_ALL_ACCESS, &threadAttr, hProcessToInject, &m_ID, DescendantClass::ThreadStarter, this);
if (!NT_SUCCESS(st))
return false;
return true;
}
/*bool Terminate()
{
return false;
}*/
//! Waits for the thread to complete
bool Join()
{
if (!m_hThread)
return true;
if (PsGetCurrentThreadId() == m_ID.UniqueThread)
return true;
ZwWaitForSingleObject(m_hThread, FALSE, NULL);
return true;
}
bool Join(unsigned timeoutInMsec)
{
if (!m_hThread)
return true;
if (PsGetCurrentThreadId() == m_ID.UniqueThread)
return true;
LARGE_INTEGER interval;
interval.QuadPart = (ULONGLONG)(-((LONGLONG)timeoutInMsec) * 10000);
NTSTATUS st = ZwWaitForSingleObject(m_hThread, FALSE, &interval);
return st == STATUS_SUCCESS;
}
bool IsRunning()
{
if (!m_hThread)
return false;
LARGE_INTEGER zero = {0,};
return ZwWaitForSingleObject(m_hThread, FALSE, &zero) == STATUS_TIMEOUT;
}
void Reset()
{
Join();
m_hThread = NULL;
memset(&m_ID, 0, sizeof(m_ID));
}
/* bool Suspend()
{
}
bool Resume()
{
}*/
int GetReturnCode(bool *pbSuccess = NULL)
{
if (!m_hThread)
{
if (pbSuccess)
*pbSuccess = false;
return -1;
}
THREAD_BASIC_INFORMATION info;
NTSTATUS status = ZwQueryInformationThread(m_hThread, ThreadBasicInformation, &info, sizeof(info), NULL);
if (!NT_SUCCESS(status))
{
if (pbSuccess)
*pbSuccess = false;
return -1;
}
if (pbSuccess)
*pbSuccess = true;
return info.ExitStatus;
}
unsigned GetThreadID()
{
return (unsigned)m_ID.UniqueThread;
}
~_BasicThread()
{
Join();
if (m_hThread)
ZwClose(m_hThread);
}
public:
static void Sleep(unsigned Millisecs)
{
LARGE_INTEGER interval;
interval.QuadPart = (ULONGLONG)(-((LONGLONG)Millisecs) * 10000);
KeDelayExecutionThread(KernelMode, FALSE, &interval);
}
};
}
}
| sysprogs/BazisLib | bzscore/WinKernel/thread.h | C | lgpl-3.0 | 4,196 |
/*
* This file is part of BlendInt (a Blender-like Interface Library in
* OpenGL).
*
* BlendInt (a Blender-like Interface Library in OpenGL) is free
* software: you can redistribute it and/or modify it under the terms
* of the GNU Lesser General Public License as published by the Free
* Software Foundation, either version 3 of the License, or (at your
* option) any later version.
*
* BlendInt (a Blender-like Interface Library in OpenGL) is
* distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General
* Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with BlendInt. If not, see
* <http://www.gnu.org/licenses/>.
*
* Contributor(s): Freeman Zhang <[email protected]>
*/
#pragma once
#include <blendint/opengl/gl-buffer.hpp>
#include <blendint/core/color.hpp>
#include <blendint/gui/abstract-button.hpp>
#include <blendint/gui/color-selector.hpp>
namespace BlendInt {
/**
* @brief The most common button class
*
* @ingroup blendint_gui_widgets_buttons
*/
class ColorButton: public AbstractButton
{
DISALLOW_COPY_AND_ASSIGN(ColorButton);
public:
ColorButton ();
virtual ~ColorButton ();
void SetColor (const Color& color);
virtual bool IsExpandX () const override;
virtual Size GetPreferredSize () const override;
protected:
virtual void PerformSizeUpdate (const AbstractView* source,
const AbstractView* target,
int width,
int height) final;
virtual void PerformRoundTypeUpdate (int round_type) final;
virtual void PerformRoundRadiusUpdate (float radius) final;
virtual void PerformHoverIn (AbstractWindow* context) final;
virtual void PerformHoverOut (AbstractWindow* context) final;
virtual Response Draw (AbstractWindow* context) final;
private:
void InitializeColorButton ();
void OnClick ();
void OnSelectorDestroyed (AbstractFrame* sender);
GLuint vao_[2];
GLBuffer<ARRAY_BUFFER, 2> vbo_;
Color color0_;
Color color1_;
ColorSelector* selector_;
};
}
| zhanggyb/BlendInt | include/blendint/gui/color-button.hpp | C++ | lgpl-3.0 | 2,260 |
import java.util.*;
import Jakarta.util.FixDosOutputStream;
import java.io.*;
public class ImpQual {
/* returns name of AST_QualifiedName */
public String GetName() {
String result = ( ( AST_QualifiedName ) arg[0] ).GetName();
if ( arg[1].arg[0] != null )
result = result + ".*";
return result;
}
}
| SergiyKolesnikov/fuji | examples/AHEAD/preprocess/ImpQual.java | Java | lgpl-3.0 | 369 |
/* *\
** _____ __ _____ __ ____ FieldKit **
** / ___/ / / /____/ / / / \ (c) 2009, field **
** / ___/ /_/ /____/ / /__ / / / http://www.field.io **
** /_/ /____/ /____/ /_____/ **
\* */
/* created August 26, 2009 */
package field.kit.gl.scene.shape
import field.kit.gl.scene._
import field.kit.math.Common._
import field.kit.math._
import field.kit.util.Buffer
/**
* Companion object to class <code>Box</code>
*/
object Box {
val DEFAULT_USE_QUADS = true
/** Creates a new default Box */
def apply() = new Box("Box", Vec3(), 1f, 1f, 1f)
def apply(extent:Float) =
new Box("Box", Vec3(), extent, extent, extent)
def apply(name:String, extent:Float) =
new Box(name, Vec3(), extent, extent, extent)
}
/**
* Implements a 6-sided axis-aligned box
* @author Marcus Wendt
*/
class Box(name:String,
var center:Vec3,
var extentX:Float, var extentY:Float, var extentZ:Float)
extends Mesh(name) {
var useQuads = Box.DEFAULT_USE_QUADS
init(center, extentX, extentY, extentZ)
/**
* initializes the geometry data of this Box
*/
def init(center:Vec3, extentX:Float, extentY:Float, extentZ:Float) {
this.center := center
this.extentX = extentX
this.extentY = extentY
this.extentZ = extentZ
// -- Vertices -------------------------------------------------------------
val vertices = data.allocVertices(24)
val vd = computeVertices
// back
Buffer put (vd(0), vertices, 0)
Buffer put (vd(1), vertices, 1)
Buffer put (vd(2), vertices, 2)
Buffer put (vd(3), vertices, 3)
// right
Buffer put (vd(1), vertices, 4)
Buffer put (vd(4), vertices, 5)
Buffer put (vd(6), vertices, 6)
Buffer put (vd(2), vertices, 7)
// front
Buffer put (vd(4), vertices, 8)
Buffer put (vd(5), vertices, 9)
Buffer put (vd(7), vertices, 10)
Buffer put (vd(6), vertices, 11)
// left
Buffer put (vd(5), vertices, 12)
Buffer put (vd(0), vertices, 13)
Buffer put (vd(3), vertices, 14)
Buffer put (vd(7), vertices, 15)
// top
Buffer put (vd(2), vertices, 16)
Buffer put (vd(6), vertices, 17)
Buffer put (vd(7), vertices, 18)
Buffer put (vd(3), vertices, 19)
// bottom
Buffer put (vd(0), vertices, 20)
Buffer put (vd(5), vertices, 21)
Buffer put (vd(4), vertices, 22)
Buffer put (vd(1), vertices, 23)
// -- Normals --------------------------------------------------------------
val normals = data.allocNormals(24)
// back
for(i <- 0 until 4)
normals put 0 put 0 put -1
// right
for(i <- 0 until 4)
normals put 1 put 0 put 0
// front
for(i <- 0 until 4)
normals put 0 put 0 put 1
// left
for(i <- 0 until 4)
normals put -1 put 0 put 0
// top
for(i <- 0 until 4)
normals put 0 put 1 put 0
// bottom
for(i <- 0 until 4)
normals put 0 put -1 put 0
// -- Texture Coordinates --------------------------------------------------
val textureCoords = data.allocTextureCoords(24)
for(i <- 0 until 6) {
textureCoords put 1 put 0
textureCoords put 0 put 0
textureCoords put 0 put 1
textureCoords put 1 put 1
}
// -- Indices --------------------------------------------------------------
if(useQuads) {
data.indexModes(0) = IndexMode.QUADS
} else {
val indices = data.allocIndices(36)
indices put Array(2, 1, 0,
3, 2, 0,
6, 5, 4,
7, 6, 4,
10, 9, 8,
11, 10, 8,
14, 13, 12,
15, 14, 12,
18, 17, 16,
19, 18, 16,
22, 21, 20,
23, 22, 20)
}
}
/**
* @return a size 8 array of Vectors representing the 8 points of the box.
*/
protected def computeVertices = {
val a = new Array[Vec3](8)
a(0) = Vec3(center) += (-extentX, -extentY, -extentZ)
a(1) = Vec3(center) += (extentX, -extentY, -extentZ)
a(2) = Vec3(center) += (extentX, extentY, -extentZ)
a(3) = Vec3(center) += (-extentX, extentY, -extentZ)
a(4) = Vec3(center) += (extentX, -extentY, extentZ)
a(5) = Vec3(center) += (-extentX, -extentY, extentZ)
a(6) = Vec3(center) += (extentX, extentY, extentZ)
a(7) = Vec3(center) += (-extentX, extentY, extentZ)
a
}
} | field/FieldKit.scala | src.gl/field/kit/gl/scene/shape/Box.scala | Scala | lgpl-3.0 | 4,875 |
package com.ihidea.component.datastore.archive;
import java.awt.Graphics2D;
import java.awt.Image;
import java.awt.image.BufferedImage;
import java.io.BufferedInputStream;
import java.io.BufferedOutputStream;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.imageio.ImageIO;
import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.commons.fileupload.FileItem;
import org.apache.commons.lang.StringUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.util.FileCopyUtils;
import org.springframework.web.bind.annotation.RequestMapping;
import com.ihidea.component.datastore.FileSupportService;
import com.ihidea.component.datastore.fileio.FileIoEntity;
import com.ihidea.core.CoreConstants;
import com.ihidea.core.support.exception.ServiceException;
import com.ihidea.core.support.servlet.ServletHolderFilter;
import com.ihidea.core.util.ImageUtilsEx;
import com.ihidea.core.util.ServletUtilsEx;
import com.sun.image.codec.jpeg.JPEGCodec;
import com.sun.image.codec.jpeg.JPEGImageEncoder;
/**
* 收件扫描
* @author TYOTANN
*/
@Controller
public class ArchiveController {
protected Log logger = LogFactory.getLog(getClass());
@Autowired
private FileSupportService fileSupportService;
@Autowired
private ArchiveService archiveService;
@RequestMapping("/twain.do")
public String doTwain(ModelMap model, HttpServletRequest request) {
String twainHttp = CoreConstants.twainHost;
model.addAttribute("path", request.getParameter("path"));
model.addAttribute("params", request.getParameter("cs"));
model.addAttribute("picname", request.getParameter("picname"));
model.addAttribute("frame", request.getParameter("frame"));
model.addAttribute("HostIP", twainHttp.split(":")[0]);
model.addAttribute("HTTPPort", twainHttp.split(":")[1]);
model.addAttribute("storeName", "ds_archive");
model.addAttribute("storeType", "2");
return "archive/twain";
}
@RequestMapping("/editPicture.do")
public String doEditPicture(ModelMap model, HttpServletRequest request) {
model.addAttribute("ywid", request.getParameter("ywid"));
model.addAttribute("img", request.getParameter("img"));
model.addAttribute("name", request.getParameter("name"));
return "aie/imageeditor";
}
@RequestMapping("/showPicture.do")
public void showPicture(HttpServletRequest request, HttpServletResponse response, ModelMap model) {
OutputStream os = null;
String id = request.getParameter("id");
FileIoEntity file = fileSupportService.get(id);
byte[] b = file.getContent();
response.setContentType("image/png");
try {
os = response.getOutputStream();
FileCopyUtils.copy(b, os);
} catch (IOException e) {
logger.debug("出错啦!", e);
} finally {
if (os != null) {
try {
os.close();
} catch (IOException e) {
logger.debug("出错啦!", e);
}
}
}
}
/**
* 扫描收件获取图片信息
* @param request
* @param response
* @param model
*/
@RequestMapping("/doPictureData.do")
public void doPictureData(HttpServletRequest request, HttpServletResponse response, ModelMap model) {
String tid = request.getParameter("id");
String spcode = request.getParameter("spcode");
String sncode = request.getParameter("sncode");
String typeid = request.getParameter("typeid");
String dm = request.getParameter("dm");
String dwyq = request.getParameter("dwyq");
if (tid == null || tid.trim().equals("") || tid.trim().equals("null")) {
tid = "-1";
}
List<Map<String, Object>> pList = null;
// 根据sncode或spcode查询所有收件
if (StringUtils.isBlank(spcode) && StringUtils.isBlank(sncode)) {
pList = archiveService.getPicture(Integer.valueOf(tid));
} else {
Map<String, Object> params = new HashMap<String, Object>();
params.put("spcode", spcode);
params.put("sncode", sncode);
params.put("typeid", typeid);
params.put("dm", dm);
pList = archiveService.getPicture("09100E", params);
}
// 查询单位印签只需要最后一张
List<Map<String, Object>> picList = new ArrayList<Map<String, Object>>();
if (!StringUtils.isBlank(dwyq)) {
for (int i = 0; i < pList.size(); i++) {
Map<String, Object> pic = pList.get(i);
if (dwyq.equals(pic.get("ino").toString())) {
picList.add(pic);
break;
}
}
} else {
picList = pList;
}
Map<String, List<Map<String, Object>>> map = new HashMap<String, List<Map<String, Object>>>();
map.put("images", picList);
ServletUtilsEx.renderJson(response, map);
}
@SuppressWarnings({ "unchecked" })
@RequestMapping("/uploadDataFile.do")
public String uploadFjToFile(HttpServletRequest request, HttpServletResponse response, ModelMap model) {
String ino = null;
int id = request.getParameter("id") == null ? 0 : Integer.valueOf(request.getParameter("id"));
String strFileName = request.getParameter("filename");
Map<String, Object> paramMap = ServletHolderFilter.getContext().getParamMap();
FileItem cfile = null;
// 得到上传的文件
for (String key : paramMap.keySet()) {
if (paramMap.get(key) instanceof List) {
if (((List) paramMap.get(key)).get(0) instanceof FileItem)
cfile = ((List<FileItem>) paramMap.get(key)).get(0);
break;
}
}
ino = fileSupportService.add(cfile.getName(), cfile.get(), "ds_archive");
fileSupportService.submit(ino, "收件扫描-扫描");
// 保存到收件明细表ARCSJMX
archiveService.savePicture(id, ino, strFileName, "");
return null;
}
/**
* 扫描收件时上传图片
* @param request
* @param response
* @param model
* @return
* @throws Exception
*/
@SuppressWarnings({ "unchecked" })
@RequestMapping("/uploadUnScanDataFile.do")
public String uploadUnScanFjToFile(HttpServletRequest request, HttpServletResponse response, ModelMap model) throws Exception {
Map<String, Object> paramMap = ServletHolderFilter.getContext().getParamMap();
int id = paramMap.get("id") == null ? 0 : Integer.valueOf(String.valueOf(paramMap.get("id")));
String strFileName = paramMap.get("filename") == null ? StringUtils.EMPTY : String.valueOf(paramMap.get("filename"));
String storeName = "ds_archive";
FileOutputStream fos = null;
String ino = null;
try {
List<FileItem> remoteFile = (List<FileItem>) paramMap.get("uploadFile");
FileItem cfile = remoteFile.get(0);
String cfileOrjgName = cfile.getName();
String cfileName = cfileOrjgName.substring(0, cfileOrjgName.lastIndexOf("."));
ino = fileSupportService.add(cfile.getName(), cfile.get(), "ds_archive");
fileSupportService.submit(ino, "收件扫描-本地上传");
if (strFileName != null) {
cfileName = strFileName;
}
// 保存到收件明细表ARCSJMX
archiveService.savePicture(id, ino, cfileName, "");
} catch (Exception e) {
throw new ServiceException(e.getMessage());
} finally {
if (fos != null) {
fos.flush();
fos.close();
}
}
model.addAttribute("isSubmit", "1");
model.addAttribute("params", id);
model.addAttribute("path", "");
model.addAttribute("picname", strFileName);
model.addAttribute("storeName", storeName);
model.addAttribute("success", "上传成功!");
model.addAttribute("ino", ino);
return "archive/twain";
}
/**
* 扫描收件时查看
* @param request
* @param response
* @param model
* @return
*/
@RequestMapping("/doPicture.do")
public String doPicture(HttpServletRequest request, HttpServletResponse response, ModelMap model) {
String img = request.getParameter("img");
String ywid = request.getParameter("ywid");
model.addAttribute("img", img);
model.addAttribute("ywid", ywid);
model.addAttribute("storeName", "ds_archive");
return "aie/showPicture";
}
/**
* 下载图片
* @param request
* @param response
* @throws Exception
*/
@RequestMapping("/downloadFj.do")
public void downloadFj(HttpServletRequest request, HttpServletResponse response) throws Exception {
String id = request.getParameter("id") == null ? "" : String.valueOf(request.getParameter("id"));
if (StringUtils.isBlank(id)) {
id = request.getParameter("file") == null ? "" : String.valueOf(request.getParameter("file"));
}
ServletOutputStream fos = null;
try {
fos = response.getOutputStream();
response.setContentType("application/octet-stream");
FileIoEntity file = fileSupportService.get(id);
FileCopyUtils.copy(file.getContent(), fos);
} catch (Exception e) {
logger.error(e.getMessage(), e);
} finally {
if (fos != null) {
fos.flush();
fos.close();
}
}
}
@RequestMapping("/changePicture.do")
public void changePicture(HttpServletRequest request, HttpServletResponse response, ModelMap model) {
String type = request.getParameter("type");
String path = request.getParameter("imagepath");
// 旋转
if (type.equals("rotate")) {
String aktion = request.getParameter("aktion");
// 角度
if (aktion.equals("rotieren")) {
int degree = Integer.valueOf(request.getParameter("degree"));
try {
Image imageOriginal = ImageIO.read(new ByteArrayInputStream(fileSupportService.get(path).getContent()));
// if (uploadType.equals("file")) { // 文件方式存储
// File tfile = new File(path);
// if (!tfile.exists()) {
// return;
// }
// imageOriginal = ImageIO.read(tfile);
// } else { // 数据库方式存储
// String errfilename =
// this.getClass().getResource("/").getPath()
// .replace("WEB-INF/classes",
// "resources/images/sjerr.png");
// ByteArrayOutputStream os = new ByteArrayOutputStream();
// archiveService.getPictureFromDB(request.getParameter("imagepath"),
// errfilename, os);
// byte[] data = os.toByteArray();
// InputStream is = new ByteArrayInputStream(data);
// imageOriginal = ImageIO.read(is);
// }
int widthOriginal = imageOriginal.getWidth(null);
int heightOriginal = imageOriginal.getHeight(null);
BufferedImage bi = new BufferedImage(widthOriginal, heightOriginal, BufferedImage.TYPE_3BYTE_BGR);
Graphics2D g2d = bi.createGraphics();
g2d.drawImage(imageOriginal, 0, 0, null);
BufferedImage bu = ImageUtilsEx.rotateImage(bi, degree);
ByteArrayOutputStream bos = new ByteArrayOutputStream();
JPEGImageEncoder encoder = JPEGCodec.createJPEGEncoder(bos);
encoder.encode(bu);
byte[] data = bos.toByteArray();
// 更新文件内容
fileSupportService.updateContent(path, data);
// if (uploadType.equals("file")) { // 文件方式存储
// FileOutputStream fos = new FileOutputStream(path);
// JPEGImageEncoder encoder =
// JPEGCodec.createJPEGEncoder(fos);
// encoder.encode(bu);
//
// fos.flush();
// fos.close();
// fos = null;
// } else { // 数据库方式存储
// ByteArrayOutputStream bos = new ByteArrayOutputStream();
// JPEGImageEncoder encoder =
// JPEGCodec.createJPEGEncoder(bos);
// encoder.encode(bu);
// byte[] data = bos.toByteArray();
// InputStream is = new ByteArrayInputStream(data);
// archiveService.updatePictureToDB(request.getParameter("imagepath"),
// is, data.length);
//
// bos.flush();
// bos.close();
// bos = null;
//
// is.close();
// is = null;
// }
} catch (IOException e) {
e.printStackTrace();
logger.error("错误:" + e.getMessage());
}
// 翻转
} else {
String degree = request.getParameter("degree");
try {
Image imageOriginal = ImageIO.read(new ByteArrayInputStream(fileSupportService.get(path).getContent()));
// if (uploadType.equals("file")) { // 文件方式存储
// File tfile = new File(path);
// if (!tfile.exists()) {
// return;
// }
// imageOriginal = ImageIO.read(tfile);
// } else { // 数据库方式存储
// String errfilename =
// this.getClass().getResource("/").getPath()
// .replace("WEB-INF/classes",
// "resources/images/sjerr.png");
// ByteArrayOutputStream os = new ByteArrayOutputStream();
// archiveService.getPictureFromDB(request.getParameter("imagepath"),
// errfilename, os);
// byte[] data = os.toByteArray();
// InputStream is = new ByteArrayInputStream(data);
// imageOriginal = ImageIO.read(is);
// }
int widthOriginal = imageOriginal.getWidth(null);
int heightOriginal = imageOriginal.getHeight(null);
BufferedImage bi = new BufferedImage(widthOriginal, heightOriginal, BufferedImage.TYPE_3BYTE_BGR);
Graphics2D g2d = bi.createGraphics();
g2d.drawImage(imageOriginal, 0, 0, null);
BufferedImage bu = null;
if (degree.equals("flip")) {
bu = ImageUtilsEx.flipImage(bi);
} else {
bu = ImageUtilsEx.flopImage(bi);
}
ByteArrayOutputStream bos = new ByteArrayOutputStream();
JPEGImageEncoder encoder = JPEGCodec.createJPEGEncoder(bos);
encoder.encode(bu);
byte[] data = bos.toByteArray();
// 更新文件内容
fileSupportService.updateContent(path, data);
// if (uploadType.equals("file")) { // 文件方式存储
// FileOutputStream fos = new FileOutputStream(path);
// JPEGImageEncoder encoder =
// JPEGCodec.createJPEGEncoder(fos);
// encoder.encode(bu);
//
// fos.flush();
// fos.close();
// fos = null;
// } else { // 数据库方式存储
// ByteArrayOutputStream bos = new ByteArrayOutputStream();
// JPEGImageEncoder encoder =
// JPEGCodec.createJPEGEncoder(bos);
// encoder.encode(bu);
// byte[] data = bos.toByteArray();
// InputStream is = new ByteArrayInputStream(data);
// archiveService.updatePictureToDB(request.getParameter("imagepath"),
// is, data.length);
//
// bos.flush();
// bos.close();
// bos = null;
//
// is.close();
// is = null;
// }
} catch (IOException e) {
e.printStackTrace();
logger.error("错误:" + e.getMessage());
}
}
}
}
// 公共方法
// 下载附件
@RequestMapping("/arcDownloadFj.do")
public void arcDownloadFj(HttpServletRequest request, HttpServletResponse response) {
int id = Integer.parseInt(request.getParameter("id"));
Map<String, Object> map = this.archiveService.getArcfj(id);
if (map == null) {
return;
}
ServletOutputStream fos = null;
FileInputStream fis = null;
BufferedInputStream bfis = null;
BufferedOutputStream bfos = null;
try {
File file = new File(map.get("filepath").toString());
if (!file.exists()) {
response.setCharacterEncoding("GBK");
response.getWriter().write("<script>alert('文件不存在');window.history.back();</script>");
return;
}
fos = response.getOutputStream();
response.setHeader("Content-Disposition", "attachment; filename=\""
+ new String(map.get("filename").toString().getBytes("GBK"), "ISO8859_1") + "\"");
fis = new FileInputStream(file);
bfis = new BufferedInputStream(fis);
bfos = new BufferedOutputStream(fos);
FileCopyUtils.copy(bfis, bfos);
} catch (Exception e) {
// e.printStackTrace();
} finally {
try {
if (fos != null) {
fos.close();
}
if (bfis != null) {
bfis.close();
}
if (bfos != null) {
bfos.close();
}
if (fis != null) {
fis.close();
}
} catch (Exception e) {
}
}
}
}
| tyotann/tyo-java-frame | src/com/ihidea/component/datastore/archive/ArchiveController.java | Java | lgpl-3.0 | 15,946 |
/*
* SonarQube
* Copyright (C) 2009-2022 SonarSource SA
* mailto:info AT sonarsource DOT com
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3 of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
package org.sonar.server.almsettings.ws;
import org.sonar.api.server.ServerSide;
import org.sonar.db.DbClient;
import org.sonar.db.DbSession;
import org.sonar.db.alm.setting.ALM;
import org.sonar.db.alm.setting.AlmSettingDto;
import org.sonar.db.project.ProjectDto;
import org.sonar.server.almsettings.MultipleAlmFeatureProvider;
import org.sonar.server.component.ComponentFinder;
import org.sonar.server.exceptions.BadRequestException;
import org.sonar.server.exceptions.NotFoundException;
import org.sonar.server.user.UserSession;
import org.sonarqube.ws.AlmSettings;
import static java.lang.String.format;
import static org.sonar.api.web.UserRole.ADMIN;
@ServerSide
public class AlmSettingsSupport {
private final DbClient dbClient;
private final UserSession userSession;
private final ComponentFinder componentFinder;
private final MultipleAlmFeatureProvider multipleAlmFeatureProvider;
public AlmSettingsSupport(DbClient dbClient, UserSession userSession, ComponentFinder componentFinder,
MultipleAlmFeatureProvider multipleAlmFeatureProvider) {
this.dbClient = dbClient;
this.userSession = userSession;
this.componentFinder = componentFinder;
this.multipleAlmFeatureProvider = multipleAlmFeatureProvider;
}
public MultipleAlmFeatureProvider getMultipleAlmFeatureProvider() {
return multipleAlmFeatureProvider;
}
public void checkAlmSettingDoesNotAlreadyExist(DbSession dbSession, String almSetting) {
dbClient.almSettingDao().selectByKey(dbSession, almSetting)
.ifPresent(a -> {
throw new IllegalArgumentException(format("An ALM setting with key '%s' already exists", a.getKey()));
});
}
public void checkAlmMultipleFeatureEnabled(ALM alm) {
try (DbSession dbSession = dbClient.openSession(false)) {
if (!multipleAlmFeatureProvider.enabled() && !dbClient.almSettingDao().selectByAlm(dbSession, alm).isEmpty()) {
throw BadRequestException.create("A " + alm + " setting is already defined");
}
}
}
public ProjectDto getProjectAsAdmin(DbSession dbSession, String projectKey) {
return getProject(dbSession, projectKey, ADMIN);
}
public ProjectDto getProject(DbSession dbSession, String projectKey, String projectPermission) {
ProjectDto project = componentFinder.getProjectByKey(dbSession, projectKey);
userSession.checkProjectPermission(projectPermission, project);
return project;
}
public AlmSettingDto getAlmSetting(DbSession dbSession, String almSetting) {
return dbClient.almSettingDao().selectByKey(dbSession, almSetting)
.orElseThrow(() -> new NotFoundException(format("ALM setting with key '%s' cannot be found", almSetting)));
}
public static AlmSettings.Alm toAlmWs(ALM alm) {
switch (alm) {
case GITHUB:
return AlmSettings.Alm.github;
case BITBUCKET:
return AlmSettings.Alm.bitbucket;
case BITBUCKET_CLOUD:
return AlmSettings.Alm.bitbucketcloud;
case AZURE_DEVOPS:
return AlmSettings.Alm.azure;
case GITLAB:
return AlmSettings.Alm.gitlab;
default:
throw new IllegalStateException(format("Unknown ALM '%s'", alm.name()));
}
}
}
| SonarSource/sonarqube | server/sonar-webserver-webapi/src/main/java/org/sonar/server/almsettings/ws/AlmSettingsSupport.java | Java | lgpl-3.0 | 4,030 |
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield
*
* This library is open source and may be redistributed and/or modified under
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
* (at your option) any later version. The full license is in LICENSE file
* included with this distribution, and on the openscenegraph.org website.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* OpenSceneGraph Public License for more details.
*/
#include <osgOcean/SiltEffect>
#include <osgOcean/ShaderManager>
#include <stdlib.h>
#include <OpenThreads/ScopedLock>
#include <osg/Texture2D>
#include <osg/PointSprite>
#include <osgUtil/CullVisitor>
#include <osgUtil/GLObjectsVisitor>
#include <osg/Notify>
#include <osg/io_utils>
#include <osg/Timer>
#include <osg/Version>
using namespace osgOcean;
static float random(float min,float max) { return min + (max-min)*(float)rand()/(float)RAND_MAX; }
static void fillSpotLightImage(unsigned char* ptr, const osg::Vec4& centerColour, const osg::Vec4& backgroudColour, unsigned int size, float power)
{
if (size==1)
{
float r = 0.5f;
osg::Vec4 color = centerColour*r+backgroudColour*(1.0f-r);
*ptr++ = (unsigned char)((color[0])*255.0f);
*ptr++ = (unsigned char)((color[1])*255.0f);
*ptr++ = (unsigned char)((color[2])*255.0f);
*ptr++ = (unsigned char)((color[3])*255.0f);
return;
}
float mid = (float(size)-1.0f)*0.5f;
float div = 2.0f/float(size);
for(unsigned int r=0;r<size;++r)
{
//unsigned char* ptr = image->data(0,r,0);
for(unsigned int c=0;c<size;++c)
{
float dx = (float(c) - mid)*div;
float dy = (float(r) - mid)*div;
float r = powf(1.0f-sqrtf(dx*dx+dy*dy),power);
if (r<0.0f) r=0.0f;
osg::Vec4 color = centerColour*r+backgroudColour*(1.0f-r);
*ptr++ = (unsigned char)((color[0])*255.0f);
*ptr++ = (unsigned char)((color[1])*255.0f);
*ptr++ = (unsigned char)((color[2])*255.0f);
*ptr++ = (unsigned char)((color[3])*255.0f);
}
}
}
static osg::Image* createSpotLightImage(const osg::Vec4& centerColour, const osg::Vec4& backgroudColour, unsigned int size, float power)
{
#if 0
osg::Image* image = new osg::Image;
unsigned char* ptr = image->data(0,0,0);
fillSpotLightImage(ptr, centerColour, backgroudColour, size, power);
return image;
#else
osg::Image* image = new osg::Image;
osg::Image::MipmapDataType mipmapData;
unsigned int s = size;
unsigned int totalSize = 0;
unsigned i;
for(i=0; s>0; s>>=1, ++i)
{
if (i>0) mipmapData.push_back(totalSize);
totalSize += s*s*4;
}
unsigned char* ptr = new unsigned char[totalSize];
image->setImage(size, size, size, GL_RGBA, GL_RGBA, GL_UNSIGNED_BYTE, ptr, osg::Image::USE_NEW_DELETE,1);
image->setMipmapLevels(mipmapData);
s = size;
for(i=0; s>0; s>>=1, ++i)
{
fillSpotLightImage(ptr, centerColour, backgroudColour, s, power);
ptr += s*s*4;
}
return image;
#endif
}
SiltEffect::SiltEffect()
{
setNumChildrenRequiringUpdateTraversal(1);
setUpGeometries(1024);
setIntensity(0.5);
}
void SiltEffect::setIntensity(float intensity)
{
_wind.set(0.0f,0.0f,0.0f);
_particleSpeed = -0.75f - 0.25f*intensity;
_particleSize = 0.02f + 0.03f*intensity;
_particleColor = osg::Vec4(0.85f, 0.85f, 0.85f, 1.0f) - osg::Vec4(0.1f, 0.1f, 0.1f, 1.0f)* intensity;
_maximumParticleDensity = intensity * 8.2f;
_cellSize.set(5.0f / (0.25f+intensity), 5.0f / (0.25f+intensity), 5.0f);
_nearTransition = 25.f;
_farTransition = 100.0f - 60.0f*sqrtf(intensity);
if (!_fog) _fog = new osg::Fog;
_fog->setMode(osg::Fog::EXP);
_fog->setDensity(0.01f*intensity);
_fog->setColor(osg::Vec4(0.6, 0.6, 0.6, 1.0));
_dirty = true;
update();
}
SiltEffect::SiltEffect(const SiltEffect& copy, const osg::CopyOp& copyop):
osg::Node(copy,copyop)
{
setNumChildrenRequiringUpdateTraversal(getNumChildrenRequiringUpdateTraversal()+1);
_dirty = true;
update();
}
void SiltEffect::compileGLObjects(osg::RenderInfo& renderInfo) const
{
if (_quadGeometry.valid())
{
_quadGeometry->compileGLObjects(renderInfo);
if (_quadGeometry->getStateSet()) _quadGeometry->getStateSet()->compileGLObjects(*renderInfo.getState());
}
if (_pointGeometry.valid())
{
_pointGeometry->compileGLObjects(renderInfo);
if (_pointGeometry->getStateSet()) _pointGeometry->getStateSet()->compileGLObjects(*renderInfo.getState());
}
}
void SiltEffect::traverse(osg::NodeVisitor& nv)
{
if (nv.getVisitorType() == osg::NodeVisitor::UPDATE_VISITOR)
{
if (_dirty) update();
if (nv.getFrameStamp())
{
double currentTime = nv.getFrameStamp()->getSimulationTime();
static double previousTime = currentTime;
double delta = currentTime - previousTime;
_origin += _wind * delta;
previousTime = currentTime;
}
return;
}
if (nv.getVisitorType() == osg::NodeVisitor::NODE_VISITOR)
{
if (_dirty) update();
osgUtil::GLObjectsVisitor* globjVisitor = dynamic_cast<osgUtil::GLObjectsVisitor*>(&nv);
if (globjVisitor)
{
if (globjVisitor->getMode() & osgUtil::GLObjectsVisitor::COMPILE_STATE_ATTRIBUTES)
{
compileGLObjects(globjVisitor->getRenderInfo());
}
}
return;
}
if (nv.getVisitorType() != osg::NodeVisitor::CULL_VISITOR)
{
return;
}
osgUtil::CullVisitor* cv = dynamic_cast<osgUtil::CullVisitor*>(&nv);
if (!cv)
{
return;
}
ViewIdentifier viewIndentifier(cv, nv.getNodePath());
{
SiltDrawableSet* SiltDrawableSet = 0;
{
OpenThreads::ScopedLock<OpenThreads::Mutex> lock(_mutex);
SiltDrawableSet = &(_viewDrawableMap[viewIndentifier]);
if (!SiltDrawableSet->_quadSiltDrawable)
{
SiltDrawableSet->_quadSiltDrawable = new SiltDrawable;
SiltDrawableSet->_quadSiltDrawable->setGeometry(_quadGeometry.get());
SiltDrawableSet->_quadSiltDrawable->setStateSet(_quadStateSet.get());
SiltDrawableSet->_quadSiltDrawable->setDrawType(GL_QUADS);
SiltDrawableSet->_pointSiltDrawable = new SiltDrawable;
SiltDrawableSet->_pointSiltDrawable->setGeometry(_pointGeometry.get());
SiltDrawableSet->_pointSiltDrawable->setStateSet(_pointStateSet.get());
SiltDrawableSet->_pointSiltDrawable->setDrawType(GL_POINTS);
}
}
cull(*SiltDrawableSet, cv);
cv->pushStateSet(_stateset.get());
float depth = 0.0f;
if (!SiltDrawableSet->_quadSiltDrawable->getCurrentCellMatrixMap().empty())
{
cv->pushStateSet(SiltDrawableSet->_quadSiltDrawable->getStateSet());
cv->addDrawableAndDepth(SiltDrawableSet->_quadSiltDrawable.get(),cv->getModelViewMatrix(),depth);
cv->popStateSet();
}
if (!SiltDrawableSet->_pointSiltDrawable->getCurrentCellMatrixMap().empty())
{
cv->pushStateSet(SiltDrawableSet->_pointSiltDrawable->getStateSet());
cv->addDrawableAndDepth(SiltDrawableSet->_pointSiltDrawable.get(),cv->getModelViewMatrix(),depth);
cv->popStateSet();
}
cv->popStateSet();
}
}
void SiltEffect::update()
{
_dirty = false;
osg::notify(osg::INFO)<<"SiltEffect::update()"<<std::endl;
float length_u = _cellSize.x();
float length_v = _cellSize.y();
float length_w = _cellSize.z();
// time taken to get from start to the end of cycle
_period = fabsf(_cellSize.z() / _particleSpeed);
_du.set(length_u, 0.0f, 0.0f);
_dv.set(0.0f, length_v, 0.0f);
_dw.set(0.0f, 0.0f, length_w);
_inverse_du.set(1.0f/length_u, 0.0f, 0.0f);
_inverse_dv.set(0.0f, 1.0f/length_v, 0.0f);
_inverse_dw.set(0.0f, 0.0f, 1.0f/length_w);
osg::notify(osg::INFO)<<"Cell size X="<<length_u<<std::endl;
osg::notify(osg::INFO)<<"Cell size Y="<<length_v<<std::endl;
osg::notify(osg::INFO)<<"Cell size Z="<<length_w<<std::endl;
{
OpenThreads::ScopedLock<OpenThreads::Mutex> lock(_mutex);
_viewDrawableMap.clear();
}
// set up state/
{
if (!_stateset)
{
_stateset = new osg::StateSet;
_stateset->addUniform(new osg::Uniform("osgOcean_BaseTexture",0));
_stateset->setMode(GL_LIGHTING, osg::StateAttribute::OFF);
_stateset->setMode(GL_BLEND, osg::StateAttribute::ON);
osg::Texture2D* texture = new osg::Texture2D(createSpotLightImage(osg::Vec4(0.55f,0.55f,0.55f,0.65f),osg::Vec4(0.55f,0.55f,0.55f,0.0f),32,1.0));
_stateset->setTextureAttribute(0, texture);
}
if (!_inversePeriodUniform)
{
_inversePeriodUniform = new osg::Uniform("osgOcean_InversePeriod",1.0f/_period);
_stateset->addUniform(_inversePeriodUniform.get());
}
else _inversePeriodUniform->set(1.0f/_period);
if (!_particleColorUniform)
{
_particleColorUniform = new osg::Uniform("osgOcean_ParticleColour", _particleColor);
_stateset->addUniform(_particleColorUniform.get());
}
else _particleColorUniform->set(_particleColor);
if (!_particleSizeUniform)
{
_particleSizeUniform = new osg::Uniform("osgOcean_ParticleSize", _particleSize);
_stateset->addUniform(_particleSizeUniform.get());
}
else
_particleSizeUniform->set(_particleSize);
}
}
void SiltEffect::createGeometry(unsigned int numParticles,
osg::Geometry* quad_geometry,
osg::Geometry* point_geometry )
{
// particle corner offsets
osg::Vec2 offset00(0.0f,0.0f);
osg::Vec2 offset10(1.0f,0.0f);
osg::Vec2 offset01(0.0f,1.0f);
osg::Vec2 offset11(1.0f,1.0f);
osg::Vec2 offset0(0.5f,0.0f);
osg::Vec2 offset1(0.5f,1.0f);
osg::Vec2 offset(0.5f,0.5f);
// configure quad_geometry;
osg::Vec3Array* quad_vertices = 0;
osg::Vec2Array* quad_offsets = 0;
osg::Vec3Array* quad_vectors = 0;
if (quad_geometry)
{
quad_geometry->setName("quad");
quad_vertices = new osg::Vec3Array(numParticles*4);
quad_offsets = new osg::Vec2Array(numParticles*4);
quad_vectors = new osg::Vec3Array(numParticles*4);
quad_geometry->setVertexArray(quad_vertices);
quad_geometry->setTexCoordArray(0, quad_offsets);
quad_geometry->setNormalArray(quad_vectors);
quad_geometry->setNormalBinding(osg::Geometry::BIND_PER_VERTEX);
}
// configure point_geometry;
osg::Vec3Array* point_vertices = 0;
osg::Vec2Array* point_offsets = 0;
osg::Vec3Array* point_vectors = 0;
if (point_geometry)
{
point_geometry->setName("point");
point_vertices = new osg::Vec3Array(numParticles);
point_offsets = new osg::Vec2Array(numParticles);
point_vectors = new osg::Vec3Array(numParticles);
point_geometry->setVertexArray(point_vertices);
point_geometry->setTexCoordArray(0, point_offsets);
point_geometry->setNormalArray(point_vectors);
point_geometry->setNormalBinding(osg::Geometry::BIND_PER_VERTEX);
}
// set up vertex attribute data.
for(unsigned int i=0; i< numParticles; ++i)
{
osg::Vec3 pos( random(0.0f, 1.0f), random(0.0f, 1.0f), random(0.0f, 1.0f));
osg::Vec3 dir( random(-1.f, 1.f), random(-1.f,1.f), random(-1.f,1.f) );
// quad particles
if (quad_vertices)
{
(*quad_vertices)[i*4] = pos;
(*quad_vertices)[i*4+1] = pos;
(*quad_vertices)[i*4+2] = pos;
(*quad_vertices)[i*4+3] = pos;
(*quad_offsets)[i*4] = offset00;
(*quad_offsets)[i*4+1] = offset01;
(*quad_offsets)[i*4+2] = offset11;
(*quad_offsets)[i*4+3] = offset10;
(*quad_vectors)[i*4] = dir;
(*quad_vectors)[i*4+1] = dir;
(*quad_vectors)[i*4+2] = dir;
(*quad_vectors)[i*4+3] = dir;
}
// point particles
if (point_vertices)
{
(*point_vertices)[i] = pos;
(*point_offsets)[i] = offset;
(*point_vectors)[i] = dir;
}
}
}
#include <osgOcean/shaders/osgOcean_silt_quads_vert.inl>
#include <osgOcean/shaders/osgOcean_silt_quads_frag.inl>
#include <osgOcean/shaders/osgOcean_silt_points_vert.inl>
#include <osgOcean/shaders/osgOcean_silt_points_frag.inl>
void SiltEffect::setUpGeometries(unsigned int numParticles)
{
unsigned int quadRenderBin = 12;
unsigned int pointRenderBin = 11;
osg::notify(osg::INFO)<<"SiltEffect::setUpGeometries("<<numParticles<<")"<<std::endl;
bool needGeometryRebuild = false;
if (!_quadGeometry || _quadGeometry->getVertexArray()->getNumElements() != 4*numParticles)
{
_quadGeometry = new osg::Geometry;
_quadGeometry->setUseVertexBufferObjects(true);
needGeometryRebuild = true;
}
if (!_pointGeometry || _pointGeometry->getVertexArray()->getNumElements() != numParticles)
{
_pointGeometry = new osg::Geometry;
_pointGeometry->setUseVertexBufferObjects(true);
needGeometryRebuild = true;
}
if (needGeometryRebuild)
{
createGeometry(numParticles, _quadGeometry.get(), _pointGeometry.get());
}
if (!_quadStateSet)
{
_quadStateSet = new osg::StateSet;
_quadStateSet->setRenderBinDetails(quadRenderBin,"DepthSortedBin");
static const char osgOcean_silt_quads_vert_file[] = "osgOcean/shaders/osgOcean_silt_quads.vert";
static const char osgOcean_silt_quads_frag_file[] = "osgOcean/shaders/osgOcean_silt_quads.frag";
osg::Program* program =
ShaderManager::instance().createProgram("silt_quads",
osgOcean_silt_quads_vert_file, osgOcean_silt_quads_frag_file,
osgOcean_silt_quads_vert, osgOcean_silt_quads_frag );
_quadStateSet->setAttribute(program);
}
if (!_pointStateSet)
{
_pointStateSet = new osg::StateSet;
static const char osgOcean_silt_points_vert_file[] = "osgOcean/shaders/osgOcean_silt_points.vert";
static const char osgOcean_silt_points_frag_file[] = "osgOcean/shaders/osgOcean_silt_points.frag";
osg::Program* program =
ShaderManager::instance().createProgram("silt_point",
osgOcean_silt_points_vert_file, osgOcean_silt_points_frag_file,
osgOcean_silt_points_vert, osgOcean_silt_points_frag );
_pointStateSet->setAttribute(program);
/// Setup the point sprites
osg::PointSprite *sprite = new osg::PointSprite();
_pointStateSet->setTextureAttributeAndModes(0, sprite, osg::StateAttribute::ON);
_pointStateSet->setMode(GL_VERTEX_PROGRAM_POINT_SIZE, osg::StateAttribute::ON);
_pointStateSet->setRenderBinDetails(pointRenderBin,"DepthSortedBin");
}
}
void SiltEffect::cull(SiltDrawableSet& pds, osgUtil::CullVisitor* cv) const
{
#ifdef DO_TIMING
osg::Timer_t startTick = osg::Timer::instance()->tick();
#endif
float cellVolume = _cellSize.x() * _cellSize.y() * _cellSize.z();
int numberOfParticles = (int)(_maximumParticleDensity * cellVolume);
if (numberOfParticles==0)
return;
pds._quadSiltDrawable->setNumberOfVertices(numberOfParticles*4);
pds._pointSiltDrawable->setNumberOfVertices(numberOfParticles);
pds._quadSiltDrawable->newFrame();
pds._pointSiltDrawable->newFrame();
osg::Matrix inverse_modelview;
inverse_modelview.invert(*(cv->getModelViewMatrix()));
osg::Vec3 eyeLocal = osg::Vec3(0.0f,0.0f,0.0f) * inverse_modelview;
//osg::notify(osg::NOTICE)<<" eyeLocal "<<eyeLocal<<std::endl;
float eye_k = (eyeLocal-_origin)*_inverse_dw;
osg::Vec3 eye_kPlane = eyeLocal-_dw*eye_k-_origin;
// osg::notify(osg::NOTICE)<<" eye_kPlane "<<eye_kPlane<<std::endl;
float eye_i = eye_kPlane*_inverse_du;
float eye_j = eye_kPlane*_inverse_dv;
osg::Polytope frustum;
frustum.setToUnitFrustum(false,false);
frustum.transformProvidingInverse(*(cv->getProjectionMatrix()));
frustum.transformProvidingInverse(*(cv->getModelViewMatrix()));
float i_delta = _farTransition * _inverse_du.x();
float j_delta = _farTransition * _inverse_dv.y();
float k_delta = 1;//_nearTransition * _inverse_dw.z();
int i_min = (int)floor(eye_i - i_delta);
int j_min = (int)floor(eye_j - j_delta);
int k_min = (int)floor(eye_k - k_delta);
int i_max = (int)ceil(eye_i + i_delta);
int j_max = (int)ceil(eye_j + j_delta);
int k_max = (int)ceil(eye_k + k_delta);
//osg::notify(osg::NOTICE)<<"i_delta="<<i_delta<<" j_delta="<<j_delta<<" k_delta="<<k_delta<<std::endl;
unsigned int numTested=0;
unsigned int numInFrustum=0;
float iCyle = 0.43;
float jCyle = 0.64;
for(int i = i_min; i<=i_max; ++i)
{
for(int j = j_min; j<=j_max; ++j)
{
for(int k = k_min; k<=k_max; ++k)
{
float startTime = (float)(i)*iCyle + (float)(j)*jCyle;
startTime = (startTime-floor(startTime))*_period;
if (build(eyeLocal, i,j,k, startTime, pds, frustum, cv))
++numInFrustum;
++numTested;
}
}
}
#ifdef DO_TIMING
osg::Timer_t endTick = osg::Timer::instance()->tick();
osg::notify(osg::NOTICE)<<"time for cull "<<osg::Timer::instance()->delta_m(startTick,endTick)<<"ms numTested= "<<numTested<<" numInFrustum= "<<numInFrustum<<std::endl;
osg::notify(osg::NOTICE)<<" quads "<<pds._quadSiltDrawable->getCurrentCellMatrixMap().size()<<" points "<<pds._pointSiltDrawable->getCurrentCellMatrixMap().size()<<std::endl;
#endif
}
bool SiltEffect::build(const osg::Vec3 eyeLocal, int i, int j, int k, float startTime, SiltDrawableSet& pds, osg::Polytope& frustum, osgUtil::CullVisitor* cv) const
{
osg::Vec3 position = _origin + osg::Vec3(float(i)*_du.x(), float(j)*_dv.y(), float(k+1)*_dw.z());
osg::Vec3 scale(_du.x(), _dv.y(), -_dw.z());
osg::BoundingBox bb(position.x(), position.y(), position.z()+scale.z(),
position.x()+scale.x(), position.y()+scale.y(), position.z());
if ( !frustum.contains(bb) )
return false;
osg::Vec3 center = position + scale*0.5f;
float distance = (center-eyeLocal).length();
osg::Matrix* mymodelview = 0;
if (distance < _nearTransition)
{
SiltDrawable::DepthMatrixStartTime& mstp
= pds._quadSiltDrawable->getCurrentCellMatrixMap()[SiltDrawable::Cell(i,k,j)];
mstp.depth = distance;
mstp.startTime = startTime;
mymodelview = &mstp.modelview;
}
else if (distance <= _farTransition)
{
SiltDrawable::DepthMatrixStartTime& mstp
= pds._pointSiltDrawable->getCurrentCellMatrixMap()[SiltDrawable::Cell(i,k,j)];
mstp.depth = distance;
mstp.startTime = startTime;
mymodelview = &mstp.modelview;
}
else
{
return false;
}
*mymodelview = *(cv->getModelViewMatrix());
#if OPENSCENEGRAPH_MAJOR_VERSION > 2 || \
(OPENSCENEGRAPH_MAJOR_VERSION == 2 && OPENSCENEGRAPH_MINOR_VERSION > 7) || \
(OPENSCENEGRAPH_MAJOR_VERSION == 2 && OPENSCENEGRAPH_MINOR_VERSION == 7 && OPENSCENEGRAPH_PATCH_VERSION >= 3)
// preMultTranslate and preMultScale introduced in rev 8868, which was
// before OSG 2.7.3.
mymodelview->preMultTranslate(position);
mymodelview->preMultScale(scale);
#else
// Otherwise use unoptimized versions
mymodelview->preMult(osg::Matrix::translate(position));
mymodelview->preMult(osg::Matrix::scale(scale));
#endif
cv->updateCalculatedNearFar(*(cv->getModelViewMatrix()),bb);
return true;
}
/////////////////////////////////////////////////////////////////////////////////////////////////////
//
// Precipitation Drawable
//
////////////////////////////////////////////////////////////////////////////////////////////////////
SiltEffect::SiltDrawable::SiltDrawable():
_drawType(GL_QUADS),
_numberOfVertices(0)
{
setSupportsDisplayList(false);
}
SiltEffect::SiltDrawable::SiltDrawable(const SiltDrawable& copy, const osg::CopyOp& copyop):
osg::Drawable(copy,copyop),
_geometry(copy._geometry),
_drawType(copy._drawType),
_numberOfVertices(copy._numberOfVertices)
{
}
void SiltEffect::SiltDrawable::drawImplementation(osg::RenderInfo& renderInfo) const
{
if (!_geometry) return;
const osg::Geometry::Extensions* extensions = osg::Geometry::getExtensions(renderInfo.getContextID(),true);
glPushMatrix();
typedef std::vector<const CellMatrixMap::value_type*> DepthMatrixStartTimeVector;
DepthMatrixStartTimeVector orderedEntries;
orderedEntries.reserve(_currentCellMatrixMap.size());
for(CellMatrixMap::const_iterator citr = _currentCellMatrixMap.begin();
citr != _currentCellMatrixMap.end();
++citr)
{
orderedEntries.push_back(&(*citr));
}
std::sort(orderedEntries.begin(),orderedEntries.end(),LessFunctor());
for(DepthMatrixStartTimeVector::reverse_iterator itr = orderedEntries.rbegin();
itr != orderedEntries.rend();
++itr)
{
extensions->glMultiTexCoord1f(GL_TEXTURE0+1, (*itr)->second.startTime);
glMatrixMode( GL_MODELVIEW );
glLoadMatrix((*itr)->second.modelview.ptr());
_geometry->draw(renderInfo);
unsigned int numVertices = osg::minimum(_geometry->getVertexArray()->getNumElements(), _numberOfVertices);
glDrawArrays(_drawType, 0, numVertices);
}
glPopMatrix();
}
| onox/osgocean | src/osgOcean/SiltEffect.cpp | C++ | lgpl-3.0 | 23,252 |
<html dir="LTR" xmlns:ndoc="urn:ndoc-schema">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252" />
<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5" />
<title>AbstractLogger.Info(Object, Exception) Method</title>
<xml>
</xml>
<link rel="stylesheet" type="text/css" href="MSDN.css" />
</head>
<body id="bodyID" class="dtBODY">
<div id="nsbanner">
<div id="bannerrow1">
<table class="bannerparthead" cellspacing="0">
<tr id="hdr">
<td class="runninghead">Common Logging 2.0 API Reference</td>
<td class="product">
</td>
</tr>
</table>
</div>
<div id="TitleRow">
<h1 class="dtH1">AbstractLogger.Info(Object, Exception) Method</h1>
</div>
</div>
<div id="nstext">
<p> Log a message object with the <a href="Common.Logging~Common.Logging.LogLevel.html">Info</a> level including the stack Info of the <a href="http://msdn.microsoft.com/en-us/library/System.Exception(VS.80).aspx">Exception</a> passed as a parameter. </p>
<div class="syntax">
<span class="lang">[Visual Basic]</span>
<br />Public Overridable Overloads Sub Info( _<br /> ByVal <i>message</i> As <a href="">Object</a>, _<br /> ByVal <i>exception</i> As <a href="">Exception</a> _<br />) _<div> Implements <a href="Common.Logging~Common.Logging.ILog.Info2.html">ILog.Info</a></div></div>
<div class="syntax">
<span class="lang">[C#]</span>
<br />public virtual <a href="">void</a> Info(<br /> <a href="">object</a> <i>message</i>,<br /> <a href="">Exception</a> <i>exception</i><br />);</div>
<h4 class="dtH4">Parameters</h4>
<dl>
<dt>
<i>message</i>
</dt>
<dd>The message object to log.</dd>
<dt>
<i>exception</i>
</dt>
<dd>The exception to log, including its stack Info.</dd>
</dl>
<h4 class="dtH4">Implements</h4>
<p>
<a href="Common.Logging~Common.Logging.ILog.Info2.html">ILog.Info</a>
</p>
<h4 class="dtH4">See Also</h4>
<p>
<a href="Common.Logging~Common.Logging.AbstractLogger.html">AbstractLogger Class</a> | <a href="Common.Logging~Common.Logging.html">Common.Logging Namespace</a> | <a href="Common.Logging~Common.Logging.AbstractLogger.Info~Overloads.html">AbstractLogger.Info Overload List</a></p>
<object type="application/x-oleobject" classid="clsid:1e2a7bd0-dab9-11d0-b93a-00c04fc99f9e" viewastext="true" style="display: none;">
<param name="Keyword" value="Info method
 ">
</param>
<param name="Keyword" value="Info method, AbstractLogger class">
</param>
<param name="Keyword" value="AbstractLogger.Info method
 ">
</param>
</object>
<hr />
<div id="footer">
<p>
<a href="mailto:[email protected]?subject=Common%20Logging%202.0%20API%20Reference%20Documentation%20Feedback:%20AbstractLogger.Info Method (Object,%20Exception)">Send comments on this topic.</a>
</p>
<p>
<a>© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.</a>
</p>
<p>Generated from assembly Common.Logging [2.0.0.0] by <a href="http://ndoc3.sourceforget.net">NDoc3</a></p>
</div>
</div>
</body>
</html> | aozora/arashi | src/ThirdPartyLibraries/Common.Logging/doc/api/html/Common.Logging~Common.Logging.AbstractLogger.Info2.html | HTML | lgpl-3.0 | 3,479 |
/**
* Copyright (C) 2005-2015 Alfresco Software Limited.
*
* This file is part of Alfresco
*
* Alfresco is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Alfresco is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
*/
/**
*
* @module alfresco/search/FacetFilter
* @extends external:dijit/_WidgetBase
* @mixes external:dojo/_TemplatedMixin
* @mixes module:alfresco/core/Core
* @mixes module:alfresco/documentlibrary/_AlfDocumentListTopicMixin
* @author Dave Draper
*/
define(["dojo/_base/declare",
"dijit/_WidgetBase",
"dijit/_TemplatedMixin",
"dijit/_OnDijitClickMixin",
"dojo/text!./templates/FacetFilter.html",
"alfresco/core/Core",
"dojo/_base/lang",
"dojo/_base/array",
"dojo/dom-construct",
"dojo/dom-class",
"dojo/on",
"alfresco/util/hashUtils",
"dojo/io-query",
"alfresco/core/ArrayUtils"],
function(declare, _WidgetBase, _TemplatedMixin, _OnDijitClickMixin, template, AlfCore, lang, array, domConstruct, domClass, on, hashUtils, ioQuery, arrayUtils) {
return declare([_WidgetBase, _TemplatedMixin, AlfCore], {
/**
* An array of the i18n files to use with this widget.
*
* @instance
* @type {object[]}
* @default [{i18nFile: "./i18n/FacetFilter.properties"}]
*/
i18nRequirements: [{i18nFile: "./i18n/FacetFilter.properties"}],
/**
* An array of the CSS files to use with this widget.
*
* @instance cssRequirements {Array}
* @type {object[]}
* @default [{cssFile:"./css/FacetFilter.css"}]
*/
cssRequirements: [{cssFile:"./css/FacetFilter.css"}],
/**
* The HTML template to use for the widget.
* @instance
* @type {string}
*/
templateString: template,
/**
* Indicate whether or not the filter is currently applied
*
* @instance
* @type {boolean}
* @default
*/
applied: false,
/**
* The alt-text to use for the image that indicates that a filter has been applied
*
* @instance
* @type {string}
* @default
*/
appliedFilterAltText: "facet.filter.applied.alt-text",
/**
* The path to use as the source for the image that indicates that a filter has been applied
*
* @instance
* @type {string}
* @default
*/
appliedFilterImageSrc: "12x12-selected-icon.png",
/**
* The facet qname
*
* @instance
* @type {string}
* @default
*/
facet: null,
/**
* The filter (or more accurately the filterId) for this filter
*
* @instance
* @type {string}
* @default
*/
filter: null,
/**
* Additional data for the filter (appended after the filter with a bar, e.g. tag|sometag)
*
* @instance
* @type {string}
* @default
*/
filterData: "",
/**
* Indicates that the filter should be hidden. This will be set to "true" if any required data is missing
*
* @instance
* @type {boolean}
* @default
*/
hide: false,
/**
* When this is set to true the current URL hash fragment will be used to initialise the facet selection
* and when the facet is selected the hash fragment will be updated with the facet selection.
*
* @instance
* @type {boolean}
* @default
*/
useHash: false,
/**
* Sets up the attributes required for the HTML template.
* @instance
*/
postMixInProperties: function alfresco_search_FacetFilter__postMixInProperties() {
if (this.label && this.facet && this.filter && this.hits)
{
this.label = this.message(this.label);
// Localize the alt-text for the applied filter message...
this.appliedFilterAltText = this.message(this.appliedFilterAltText, {0: this.label});
// Set the source for the image to use to indicate that a filter is applied...
this.appliedFilterImageSrc = require.toUrl("alfresco/search") + "/css/images/" + this.appliedFilterImageSrc;
}
else
{
// Hide the filter if there is no label or no link...
this.alfLog("warn", "Not enough information provided for filter. It will not be displayed", this);
this.hide = true;
}
},
/**
* @instance
*/
postCreate: function alfresco_search_FacetFilter__postCreate() {
if (this.hide === true)
{
domClass.add(this.domNode, "hidden");
}
if (this.applied)
{
domClass.remove(this.removeNode, "hidden");
domClass.add(this.labelNode, "applied");
}
},
/**
* If the filter has previously been applied then it is removed, if the filter is not applied
* then it is applied.
*
* @instance
*/
onToggleFilter: function alfresco_search_FacetFilter__onToggleFilter(/*jshint unused:false*/ evt) {
if (this.applied)
{
this.onClearFilter();
}
else
{
this.onApplyFilter();
}
},
/**
* Applies the current filter by publishing the details of the filter along with the facet to
* which it belongs and then displays the "applied" image.
*
* @instance
*/
onApplyFilter: function alfresco_search_FacetFilter__onApplyFilter() {
var fullFilter = this.facet + "|" + this.filter;
if(this.useHash)
{
this._updateHash(fullFilter, "add");
}
else
{
this.alfPublish("ALF_APPLY_FACET_FILTER", {
filter: fullFilter
});
}
domClass.remove(this.removeNode, "hidden");
domClass.add(this.labelNode, "applied");
this.applied = true;
},
/**
* Removes the current filter by publishing the details of the filter along with the facet
* to which it belongs and then hides the "applied" image
*
* @instance
*/
onClearFilter: function alfresco_search_FacetFilter__onClearFilter() {
var fullFilter = this.facet + "|" + this.filter;
if(this.useHash)
{
this._updateHash(fullFilter, "remove");
}
else
{
this.alfPublish("ALF_REMOVE_FACET_FILTER", {
filter: fullFilter
});
}
domClass.add(this.removeNode, "hidden");
domClass.remove(this.labelNode, "applied");
this.applied = false;
},
/**
* Performs updates to the url hash as facets are selected and de-selected
*
* @instance
*/
_updateHash: function alfresco_search_FacetFilter___updateHash(fullFilter, mode) {
// Get the existing hash and extract the individual facetFilters into an array
var aHash = hashUtils.getHash(),
facetFilters = ((aHash.facetFilters) ? aHash.facetFilters : ""),
facetFiltersArr = (facetFilters === "") ? [] : facetFilters.split(",");
// Add or remove the filter from the hash object
if(mode === "add" && !arrayUtils.arrayContains(facetFiltersArr, fullFilter))
{
facetFiltersArr.push(fullFilter);
}
else if (mode === "remove" && arrayUtils.arrayContains(facetFiltersArr, fullFilter))
{
facetFiltersArr.splice(facetFiltersArr.indexOf(fullFilter), 1);
}
// Put the manipulated filters back into the hash object or remove the property if empty
if(facetFiltersArr.length < 1)
{
delete aHash.facetFilters;
}
else
{
aHash.facetFilters = facetFiltersArr.join();
}
// Send the hash value back to navigation
this.alfPublish("ALF_NAVIGATE_TO_PAGE", {
url: ioQuery.objectToQuery(aHash),
type: "HASH"
}, true);
}
});
}); | nzheyuti/Aikau | aikau/src/main/resources/alfresco/search/FacetFilter.js | JavaScript | lgpl-3.0 | 8,856 |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (1.8.0_31) on Mon Apr 06 15:30:27 CEST 2015 -->
<title>Uses of Class org.cloudbus.cloudsim.VmSchedulerTimeShared</title>
<meta name="date" content="2015-04-06">
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">
<script type="text/javascript" src="../../../../script.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="Uses of Class org.cloudbus.cloudsim.VmSchedulerTimeShared";
}
}
catch(err) {
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar.top">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.top.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../overview-summary.html">Overview</a></li>
<li><a href="../package-summary.html">Package</a></li>
<li><a href="../../../../org/cloudbus/cloudsim/VmSchedulerTimeShared.html" title="class in org.cloudbus.cloudsim">Class</a></li>
<li class="navBarCell1Rev">Use</li>
<li><a href="../package-tree.html">Tree</a></li>
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../index-files/index-1.html">Index</a></li>
<li><a href="../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li>Prev</li>
<li>Next</li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?org/cloudbus/cloudsim/class-use/VmSchedulerTimeShared.html" target="_top">Frames</a></li>
<li><a href="VmSchedulerTimeShared.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<a name="skip.navbar.top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<div class="header">
<h2 title="Uses of Class org.cloudbus.cloudsim.VmSchedulerTimeShared" class="title">Uses of Class<br>org.cloudbus.cloudsim.VmSchedulerTimeShared</h2>
</div>
<div class="classUseContainer">
<ul class="blockList">
<li class="blockList">
<table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing packages, and an explanation">
<caption><span>Packages that use <a href="../../../../org/cloudbus/cloudsim/VmSchedulerTimeShared.html" title="class in org.cloudbus.cloudsim">VmSchedulerTimeShared</a></span><span class="tabEnd"> </span></caption>
<tr>
<th class="colFirst" scope="col">Package</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tbody>
<tr class="altColor">
<td class="colFirst"><a href="#org.cloudbus.cloudsim">org.cloudbus.cloudsim</a></td>
<td class="colLast"> </td>
</tr>
</tbody>
</table>
</li>
<li class="blockList">
<ul class="blockList">
<li class="blockList"><a name="org.cloudbus.cloudsim">
<!-- -->
</a>
<h3>Uses of <a href="../../../../org/cloudbus/cloudsim/VmSchedulerTimeShared.html" title="class in org.cloudbus.cloudsim">VmSchedulerTimeShared</a> in <a href="../../../../org/cloudbus/cloudsim/package-summary.html">org.cloudbus.cloudsim</a></h3>
<table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing subclasses, and an explanation">
<caption><span>Subclasses of <a href="../../../../org/cloudbus/cloudsim/VmSchedulerTimeShared.html" title="class in org.cloudbus.cloudsim">VmSchedulerTimeShared</a> in <a href="../../../../org/cloudbus/cloudsim/package-summary.html">org.cloudbus.cloudsim</a></span><span class="tabEnd"> </span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Class and Description</th>
</tr>
<tbody>
<tr class="altColor">
<td class="colFirst"><code>class </code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/cloudbus/cloudsim/VmSchedulerTimeSharedOverSubscription.html" title="class in org.cloudbus.cloudsim">VmSchedulerTimeSharedOverSubscription</a></span></code>
<div class="block">This is a Time-Shared VM Scheduler, which allows over-subscription.</div>
</td>
</tr>
</tbody>
</table>
</li>
</ul>
</li>
</ul>
</div>
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar.bottom">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.bottom.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../overview-summary.html">Overview</a></li>
<li><a href="../package-summary.html">Package</a></li>
<li><a href="../../../../org/cloudbus/cloudsim/VmSchedulerTimeShared.html" title="class in org.cloudbus.cloudsim">Class</a></li>
<li class="navBarCell1Rev">Use</li>
<li><a href="../package-tree.html">Tree</a></li>
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../index-files/index-1.html">Index</a></li>
<li><a href="../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li>Prev</li>
<li>Next</li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?org/cloudbus/cloudsim/class-use/VmSchedulerTimeShared.html" target="_top">Frames</a></li>
<li><a href="VmSchedulerTimeShared.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<a name="skip.navbar.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</body>
</html>
| Udacity2048/CloudSimDisk | docs/org/cloudbus/cloudsim/class-use/VmSchedulerTimeShared.html | HTML | lgpl-3.0 | 6,590 |
<?php
/**
* This file is part of Goodahead_Core extension
*
* This extension is supplied with every Goodahead extension and provide common
* features, used by Goodahead extensions.
*
* Copyright (C) 2013 Goodahead Ltd. (http://www.goodahead.com)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* and GNU General Public License along with this program.
* If not, see <http://www.gnu.org/licenses/>.
*
* @category Goodahead
* @package Goodahead_Core
* @copyright Copyright (c) 2013 Goodahead Ltd. (http://www.goodahead.com)
* @license http://www.gnu.org/licenses/lgpl-3.0-standalone.html
*/
class Goodahead_Core_Model_Resource_Cms_Update_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract
{
protected function _construct()
{
$this->_init('goodahead_core/cms_update');
return $this;
}
} | goodahead/core | Goodahead_Core/app/code/community/Goodahead/Core/Model/Resource/Cms/Update/Collection.php | PHP | lgpl-3.0 | 1,396 |
/////////////////////////////////////////////////////////////////////////////
// Name: wx/utils.h
// Purpose: Miscellaneous utilities
// Author: Julian Smart
// Modified by:
// Created: 29/01/98
// Copyright: (c) 1998 Julian Smart
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_UTILS_H_
#define _WX_UTILS_H_
// ----------------------------------------------------------------------------
// headers
// ----------------------------------------------------------------------------
#include "wx/object.h"
#include "wx/list.h"
#include "wx/filefn.h"
#include "wx/hashmap.h"
#include "wx/versioninfo.h"
#include "wx/meta/implicitconversion.h"
#if wxUSE_GUI
#include "wx/gdicmn.h"
#include "wx/mousestate.h"
#endif
class WXDLLIMPEXP_FWD_BASE wxArrayString;
class WXDLLIMPEXP_FWD_BASE wxArrayInt;
// need this for wxGetDiskSpace() as we can't, unfortunately, forward declare
// wxLongLong
#include "wx/longlong.h"
// needed for wxOperatingSystemId, wxLinuxDistributionInfo
#include "wx/platinfo.h"
#ifdef __WATCOMC__
#include <direct.h>
#elif defined(__X__)
#include <dirent.h>
#include <unistd.h>
#endif
#include <stdio.h>
// ----------------------------------------------------------------------------
// Forward declaration
// ----------------------------------------------------------------------------
class WXDLLIMPEXP_FWD_BASE wxProcess;
class WXDLLIMPEXP_FWD_CORE wxFrame;
class WXDLLIMPEXP_FWD_CORE wxWindow;
class wxWindowList;
class WXDLLIMPEXP_FWD_CORE wxEventLoop;
// ----------------------------------------------------------------------------
// Arithmetic functions
// ----------------------------------------------------------------------------
template<typename T1, typename T2>
inline typename wxImplicitConversionType<T1,T2>::value
wxMax(T1 a, T2 b)
{
typedef typename wxImplicitConversionType<T1,T2>::value ResultType;
// Cast both operands to the same type before comparing them to avoid
// warnings about signed/unsigned comparisons from some compilers:
return static_cast<ResultType>(a) > static_cast<ResultType>(b) ? a : b;
}
template<typename T1, typename T2>
inline typename wxImplicitConversionType<T1,T2>::value
wxMin(T1 a, T2 b)
{
typedef typename wxImplicitConversionType<T1,T2>::value ResultType;
return static_cast<ResultType>(a) < static_cast<ResultType>(b) ? a : b;
}
template<typename T1, typename T2, typename T3>
inline typename wxImplicitConversionType3<T1,T2,T3>::value
wxClip(T1 a, T2 b, T3 c)
{
typedef typename wxImplicitConversionType3<T1,T2,T3>::value ResultType;
if ( static_cast<ResultType>(a) < static_cast<ResultType>(b) )
return b;
if ( static_cast<ResultType>(a) > static_cast<ResultType>(c) )
return c;
return a;
}
// ----------------------------------------------------------------------------
// wxMemorySize
// ----------------------------------------------------------------------------
// wxGetFreeMemory can return huge amount of memory on 32-bit platforms as well
// so to always use long long for its result type on all platforms which
// support it
#if wxUSE_LONGLONG
typedef wxLongLong wxMemorySize;
#else
typedef long wxMemorySize;
#endif
// ----------------------------------------------------------------------------
// String functions (deprecated, use wxString)
// ----------------------------------------------------------------------------
#if WXWIN_COMPATIBILITY_2_8
// A shorter way of using strcmp
wxDEPRECATED_INLINE(inline bool wxStringEq(const char *s1, const char *s2),
return wxCRT_StrcmpA(s1, s2) == 0; )
#if wxUSE_UNICODE
wxDEPRECATED_INLINE(inline bool wxStringEq(const wchar_t *s1, const wchar_t *s2),
return wxCRT_StrcmpW(s1, s2) == 0; )
#endif // wxUSE_UNICODE
#endif // WXWIN_COMPATIBILITY_2_8
// ----------------------------------------------------------------------------
// Miscellaneous functions
// ----------------------------------------------------------------------------
// Sound the bell
WXDLLIMPEXP_CORE void wxBell();
#if wxUSE_MSGDLG
// Show wxWidgets information
WXDLLIMPEXP_CORE void wxInfoMessageBox(wxWindow* parent);
#endif // wxUSE_MSGDLG
WXDLLIMPEXP_CORE wxVersionInfo wxGetLibraryVersionInfo();
// Get OS description as a user-readable string
WXDLLIMPEXP_BASE wxString wxGetOsDescription();
// Get OS version
WXDLLIMPEXP_BASE wxOperatingSystemId wxGetOsVersion(int *majorVsn = NULL,
int *minorVsn = NULL);
// Get platform endianness
WXDLLIMPEXP_BASE bool wxIsPlatformLittleEndian();
// Get platform architecture
WXDLLIMPEXP_BASE bool wxIsPlatform64Bit();
#ifdef __LINUX__
// Get linux-distro informations
WXDLLIMPEXP_BASE wxLinuxDistributionInfo wxGetLinuxDistributionInfo();
#endif
// Return a string with the current date/time
WXDLLIMPEXP_BASE wxString wxNow();
// Return path where wxWidgets is installed (mostly useful in Unices)
WXDLLIMPEXP_BASE const wxChar *wxGetInstallPrefix();
// Return path to wxWin data (/usr/share/wx/%{version}) (Unices)
WXDLLIMPEXP_BASE wxString wxGetDataDir();
#if wxUSE_GUI
// Get the state of a key (true if pressed, false if not)
// This is generally most useful getting the state of
// the modifier or toggle keys.
WXDLLIMPEXP_CORE bool wxGetKeyState(wxKeyCode key);
// Don't synthesize KeyUp events holding down a key and producing
// KeyDown events with autorepeat. On by default and always on
// in wxMSW.
WXDLLIMPEXP_CORE bool wxSetDetectableAutoRepeat( bool flag );
// Returns the current state of the mouse position, buttons and modifers
WXDLLIMPEXP_CORE wxMouseState wxGetMouseState();
#endif // wxUSE_GUI
// ----------------------------------------------------------------------------
// wxPlatform
// ----------------------------------------------------------------------------
/*
* Class to make it easier to specify platform-dependent values
*
* Examples:
* long val = wxPlatform::If(wxMac, 1).ElseIf(wxGTK, 2).ElseIf(stPDA, 5).Else(3);
* wxString strVal = wxPlatform::If(wxMac, wxT("Mac")).ElseIf(wxMSW, wxT("MSW")).Else(wxT("Other"));
*
* A custom platform symbol:
*
* #define stPDA 100
* #ifdef __WXWINCE__
* wxPlatform::AddPlatform(stPDA);
* #endif
*
* long windowStyle = wxCAPTION | (long) wxPlatform::IfNot(stPDA, wxRESIZE_BORDER);
*
*/
class WXDLLIMPEXP_BASE wxPlatform
{
public:
wxPlatform() { Init(); }
wxPlatform(const wxPlatform& platform) { Copy(platform); }
void operator = (const wxPlatform& platform) { if (&platform != this) Copy(platform); }
void Copy(const wxPlatform& platform);
// Specify an optional default value
wxPlatform(int defValue) { Init(); m_longValue = (long)defValue; }
wxPlatform(long defValue) { Init(); m_longValue = defValue; }
wxPlatform(const wxString& defValue) { Init(); m_stringValue = defValue; }
wxPlatform(double defValue) { Init(); m_doubleValue = defValue; }
static wxPlatform If(int platform, long value);
static wxPlatform IfNot(int platform, long value);
wxPlatform& ElseIf(int platform, long value);
wxPlatform& ElseIfNot(int platform, long value);
wxPlatform& Else(long value);
static wxPlatform If(int platform, int value) { return If(platform, (long)value); }
static wxPlatform IfNot(int platform, int value) { return IfNot(platform, (long)value); }
wxPlatform& ElseIf(int platform, int value) { return ElseIf(platform, (long) value); }
wxPlatform& ElseIfNot(int platform, int value) { return ElseIfNot(platform, (long) value); }
wxPlatform& Else(int value) { return Else((long) value); }
static wxPlatform If(int platform, double value);
static wxPlatform IfNot(int platform, double value);
wxPlatform& ElseIf(int platform, double value);
wxPlatform& ElseIfNot(int platform, double value);
wxPlatform& Else(double value);
static wxPlatform If(int platform, const wxString& value);
static wxPlatform IfNot(int platform, const wxString& value);
wxPlatform& ElseIf(int platform, const wxString& value);
wxPlatform& ElseIfNot(int platform, const wxString& value);
wxPlatform& Else(const wxString& value);
long GetInteger() const { return m_longValue; }
const wxString& GetString() const { return m_stringValue; }
double GetDouble() const { return m_doubleValue; }
operator int() const { return (int) GetInteger(); }
operator long() const { return GetInteger(); }
operator double() const { return GetDouble(); }
operator const wxString&() const { return GetString(); }
static void AddPlatform(int platform);
static bool Is(int platform);
static void ClearPlatforms();
private:
void Init() { m_longValue = 0; m_doubleValue = 0.0; }
long m_longValue;
double m_doubleValue;
wxString m_stringValue;
static wxArrayInt* sm_customPlatforms;
};
/// Function for testing current platform
inline bool wxPlatformIs(int platform) { return wxPlatform::Is(platform); }
// ----------------------------------------------------------------------------
// Window ID management
// ----------------------------------------------------------------------------
// Ensure subsequent IDs don't clash with this one
WXDLLIMPEXP_BASE void wxRegisterId(int id);
// Return the current ID
WXDLLIMPEXP_BASE int wxGetCurrentId();
// Generate a unique ID
WXDLLIMPEXP_BASE int wxNewId();
// ----------------------------------------------------------------------------
// Various conversions
// ----------------------------------------------------------------------------
// Convert 2-digit hex number to decimal
WXDLLIMPEXP_BASE int wxHexToDec(const wxString& buf);
// Convert 2-digit hex number to decimal
inline int wxHexToDec(const char* buf)
{
int firstDigit, secondDigit;
if (buf[0] >= 'A')
firstDigit = buf[0] - 'A' + 10;
else
firstDigit = buf[0] - '0';
if (buf[1] >= 'A')
secondDigit = buf[1] - 'A' + 10;
else
secondDigit = buf[1] - '0';
return (firstDigit & 0xF) * 16 + (secondDigit & 0xF );
}
// Convert decimal integer to 2-character hex string
WXDLLIMPEXP_BASE void wxDecToHex(int dec, wxChar *buf);
WXDLLIMPEXP_BASE void wxDecToHex(int dec, char* ch1, char* ch2);
WXDLLIMPEXP_BASE wxString wxDecToHex(int dec);
// ----------------------------------------------------------------------------
// Process management
// ----------------------------------------------------------------------------
// NB: for backwards compatibility reasons the values of wxEXEC_[A]SYNC *must*
// be 0 and 1, don't change!
enum
{
// execute the process asynchronously
wxEXEC_ASYNC = 0,
// execute it synchronously, i.e. wait until it finishes
wxEXEC_SYNC = 1,
// under Windows, don't hide the child even if it's IO is redirected (this
// is done by default)
wxEXEC_SHOW_CONSOLE = 2,
// deprecated synonym for wxEXEC_SHOW_CONSOLE, use the new name as it's
// more clear
wxEXEC_NOHIDE = wxEXEC_SHOW_CONSOLE,
// under Unix, if the process is the group leader then passing wxKILL_CHILDREN to wxKill
// kills all children as well as pid
// under Windows (NT family only), sets the CREATE_NEW_PROCESS_GROUP flag,
// which allows to target Ctrl-Break signal to the spawned process.
// applies to console processes only.
wxEXEC_MAKE_GROUP_LEADER = 4,
// by default synchronous execution disables all program windows to avoid
// that the user interacts with the program while the child process is
// running, you can use this flag to prevent this from happening
wxEXEC_NODISABLE = 8,
// by default, the event loop is run while waiting for synchronous execution
// to complete and this flag can be used to simply block the main process
// until the child process finishes
wxEXEC_NOEVENTS = 16,
// under Windows, hide the console of the child process if it has one, even
// if its IO is not redirected
wxEXEC_HIDE_CONSOLE = 32,
// convenient synonym for flags given system()-like behaviour
wxEXEC_BLOCK = wxEXEC_SYNC | wxEXEC_NOEVENTS
};
// Map storing environment variables.
typedef wxStringToStringHashMap wxEnvVariableHashMap;
// Used to pass additional parameters for child process to wxExecute(). Could
// be extended with other fields later.
struct wxExecuteEnv
{
wxString cwd; // If empty, CWD is not changed.
wxEnvVariableHashMap env; // If empty, environment is unchanged.
};
// Execute another program.
//
// If flags contain wxEXEC_SYNC, return -1 on failure and the exit code of the
// process if everything was ok. Otherwise (i.e. if wxEXEC_ASYNC), return 0 on
// failure and the PID of the launched process if ok.
WXDLLIMPEXP_BASE long wxExecute(const wxString& command,
int flags = wxEXEC_ASYNC,
wxProcess *process = NULL,
const wxExecuteEnv *env = NULL);
WXDLLIMPEXP_BASE long wxExecute(char **argv,
int flags = wxEXEC_ASYNC,
wxProcess *process = NULL,
const wxExecuteEnv *env = NULL);
#if wxUSE_UNICODE
WXDLLIMPEXP_BASE long wxExecute(wchar_t **argv,
int flags = wxEXEC_ASYNC,
wxProcess *process = NULL,
const wxExecuteEnv *env = NULL);
#endif // wxUSE_UNICODE
// execute the command capturing its output into an array line by line, this is
// always synchronous
WXDLLIMPEXP_BASE long wxExecute(const wxString& command,
wxArrayString& output,
int flags = 0,
const wxExecuteEnv *env = NULL);
// also capture stderr (also synchronous)
WXDLLIMPEXP_BASE long wxExecute(const wxString& command,
wxArrayString& output,
wxArrayString& error,
int flags = 0,
const wxExecuteEnv *env = NULL);
#if defined(__WINDOWS__) && wxUSE_IPC
// ask a DDE server to execute the DDE request with given parameters
WXDLLIMPEXP_BASE bool wxExecuteDDE(const wxString& ddeServer,
const wxString& ddeTopic,
const wxString& ddeCommand);
#endif // __WINDOWS__ && wxUSE_IPC
enum wxSignal
{
wxSIGNONE = 0, // verify if the process exists under Unix
wxSIGHUP,
wxSIGINT,
wxSIGQUIT,
wxSIGILL,
wxSIGTRAP,
wxSIGABRT,
wxSIGIOT = wxSIGABRT, // another name
wxSIGEMT,
wxSIGFPE,
wxSIGKILL,
wxSIGBUS,
wxSIGSEGV,
wxSIGSYS,
wxSIGPIPE,
wxSIGALRM,
wxSIGTERM
// further signals are different in meaning between different Unix systems
};
enum wxKillError
{
wxKILL_OK, // no error
wxKILL_BAD_SIGNAL, // no such signal
wxKILL_ACCESS_DENIED, // permission denied
wxKILL_NO_PROCESS, // no such process
wxKILL_ERROR // another, unspecified error
};
enum wxKillFlags
{
wxKILL_NOCHILDREN = 0, // don't kill children
wxKILL_CHILDREN = 1 // kill children
};
enum wxShutdownFlags
{
wxSHUTDOWN_FORCE = 1,// can be combined with other flags (MSW-only)
wxSHUTDOWN_POWEROFF = 2,// power off the computer
wxSHUTDOWN_REBOOT = 4,// shutdown and reboot
wxSHUTDOWN_LOGOFF = 8 // close session (currently MSW-only)
};
// Shutdown or reboot the PC
WXDLLIMPEXP_BASE bool wxShutdown(int flags = wxSHUTDOWN_POWEROFF);
// send the given signal to the process (only NONE and KILL are supported under
// Windows, all others mean TERM), return 0 if ok and -1 on error
//
// return detailed error in rc if not NULL
WXDLLIMPEXP_BASE int wxKill(long pid,
wxSignal sig = wxSIGTERM,
wxKillError *rc = NULL,
int flags = wxKILL_NOCHILDREN);
// Execute a command in an interactive shell window (always synchronously)
// If no command then just the shell
WXDLLIMPEXP_BASE bool wxShell(const wxString& command = wxEmptyString);
// As wxShell(), but must give a (non interactive) command and its output will
// be returned in output array
WXDLLIMPEXP_BASE bool wxShell(const wxString& command, wxArrayString& output);
// Sleep for nSecs seconds
WXDLLIMPEXP_BASE void wxSleep(int nSecs);
// Sleep for a given amount of milliseconds
WXDLLIMPEXP_BASE void wxMilliSleep(unsigned long milliseconds);
// Sleep for a given amount of microseconds
WXDLLIMPEXP_BASE void wxMicroSleep(unsigned long microseconds);
#if WXWIN_COMPATIBILITY_2_8
// Sleep for a given amount of milliseconds (old, bad name), use wxMilliSleep
wxDEPRECATED( WXDLLIMPEXP_BASE void wxUsleep(unsigned long milliseconds) );
#endif
// Get the process id of the current process
WXDLLIMPEXP_BASE unsigned long wxGetProcessId();
// Get free memory in bytes, or -1 if cannot determine amount (e.g. on UNIX)
WXDLLIMPEXP_BASE wxMemorySize wxGetFreeMemory();
#if wxUSE_ON_FATAL_EXCEPTION
// should wxApp::OnFatalException() be called?
WXDLLIMPEXP_BASE bool wxHandleFatalExceptions(bool doit = true);
#endif // wxUSE_ON_FATAL_EXCEPTION
// ----------------------------------------------------------------------------
// Environment variables
// ----------------------------------------------------------------------------
// returns true if variable exists (value may be NULL if you just want to check
// for this)
WXDLLIMPEXP_BASE bool wxGetEnv(const wxString& var, wxString *value);
// set the env var name to the given value, return true on success
WXDLLIMPEXP_BASE bool wxSetEnv(const wxString& var, const wxString& value);
// remove the env var from environment
WXDLLIMPEXP_BASE bool wxUnsetEnv(const wxString& var);
#if WXWIN_COMPATIBILITY_2_8
inline bool wxSetEnv(const wxString& var, const char *value)
{ return wxSetEnv(var, wxString(value)); }
inline bool wxSetEnv(const wxString& var, const wchar_t *value)
{ return wxSetEnv(var, wxString(value)); }
template<typename T>
inline bool wxSetEnv(const wxString& var, const wxScopedCharTypeBuffer<T>& value)
{ return wxSetEnv(var, wxString(value)); }
inline bool wxSetEnv(const wxString& var, const wxCStrData& value)
{ return wxSetEnv(var, wxString(value)); }
// this one is for passing NULL directly - don't use it, use wxUnsetEnv instead
wxDEPRECATED( inline bool wxSetEnv(const wxString& var, int value) );
inline bool wxSetEnv(const wxString& var, int value)
{
wxASSERT_MSG( value == 0, "using non-NULL integer as string?" );
wxUnusedVar(value); // fix unused parameter warning in release build
return wxUnsetEnv(var);
}
#endif // WXWIN_COMPATIBILITY_2_8
// Retrieve the complete environment by filling specified map.
// Returns true on success or false if an error occurred.
WXDLLIMPEXP_BASE bool wxGetEnvMap(wxEnvVariableHashMap *map);
// ----------------------------------------------------------------------------
// Network and username functions.
// ----------------------------------------------------------------------------
// NB: "char *" functions are deprecated, use wxString ones!
// Get eMail address
WXDLLIMPEXP_BASE bool wxGetEmailAddress(wxChar *buf, int maxSize);
WXDLLIMPEXP_BASE wxString wxGetEmailAddress();
// Get hostname.
WXDLLIMPEXP_BASE bool wxGetHostName(wxChar *buf, int maxSize);
WXDLLIMPEXP_BASE wxString wxGetHostName();
// Get FQDN
WXDLLIMPEXP_BASE wxString wxGetFullHostName();
WXDLLIMPEXP_BASE bool wxGetFullHostName(wxChar *buf, int maxSize);
// Get user ID e.g. jacs (this is known as login name under Unix)
WXDLLIMPEXP_BASE bool wxGetUserId(wxChar *buf, int maxSize);
WXDLLIMPEXP_BASE wxString wxGetUserId();
// Get user name e.g. Julian Smart
WXDLLIMPEXP_BASE bool wxGetUserName(wxChar *buf, int maxSize);
WXDLLIMPEXP_BASE wxString wxGetUserName();
// Get current Home dir and copy to dest (returns pstr->c_str())
WXDLLIMPEXP_BASE wxString wxGetHomeDir();
WXDLLIMPEXP_BASE const wxChar* wxGetHomeDir(wxString *pstr);
// Get the user's (by default use the current user name) home dir,
// return empty string on error
WXDLLIMPEXP_BASE wxString wxGetUserHome(const wxString& user = wxEmptyString);
#if wxUSE_LONGLONG
typedef wxLongLong wxDiskspaceSize_t;
#else
typedef long wxDiskspaceSize_t;
#endif
// get number of total/free bytes on the disk where path belongs
WXDLLIMPEXP_BASE bool wxGetDiskSpace(const wxString& path,
wxDiskspaceSize_t *pTotal = NULL,
wxDiskspaceSize_t *pFree = NULL);
typedef int (*wxSortCallback)(const void* pItem1,
const void* pItem2,
const void* user_data);
WXDLLIMPEXP_BASE void wxQsort(void* pbase, size_t total_elems,
size_t size, wxSortCallback cmp,
const void* user_data);
#if wxUSE_GUI // GUI only things from now on
// ----------------------------------------------------------------------------
// Launch default browser
// ----------------------------------------------------------------------------
// flags for wxLaunchDefaultBrowser
enum
{
wxBROWSER_NEW_WINDOW = 0x01,
wxBROWSER_NOBUSYCURSOR = 0x02
};
// Launch url in the user's default internet browser
WXDLLIMPEXP_CORE bool wxLaunchDefaultBrowser(const wxString& url, int flags = 0);
// Launch document in the user's default application
WXDLLIMPEXP_CORE bool wxLaunchDefaultApplication(const wxString& path, int flags = 0);
// ----------------------------------------------------------------------------
// Menu accelerators related things
// ----------------------------------------------------------------------------
// flags for wxStripMenuCodes
enum
{
// strip '&' characters
wxStrip_Mnemonics = 1,
// strip everything after '\t'
wxStrip_Accel = 2,
// strip everything (this is the default)
wxStrip_All = wxStrip_Mnemonics | wxStrip_Accel
};
// strip mnemonics and/or accelerators from the label
WXDLLIMPEXP_CORE wxString
wxStripMenuCodes(const wxString& str, int flags = wxStrip_All);
#if WXWIN_COMPATIBILITY_2_6
// obsolete and deprecated version, do not use, use the above overload instead
wxDEPRECATED(
WXDLLIMPEXP_CORE wxChar* wxStripMenuCodes(const wxChar *in, wxChar *out = NULL)
);
#if wxUSE_ACCEL
class WXDLLIMPEXP_FWD_CORE wxAcceleratorEntry;
// use wxAcceleratorEntry::Create() or FromString() methods instead
wxDEPRECATED(
WXDLLIMPEXP_CORE wxAcceleratorEntry *wxGetAccelFromString(const wxString& label)
);
#endif // wxUSE_ACCEL
#endif // WXWIN_COMPATIBILITY_2_6
// ----------------------------------------------------------------------------
// Window search
// ----------------------------------------------------------------------------
// Returns menu item id or wxNOT_FOUND if none.
WXDLLIMPEXP_CORE int wxFindMenuItemId(wxFrame *frame, const wxString& menuString, const wxString& itemString);
// Find the wxWindow at the given point. wxGenericFindWindowAtPoint
// is always present but may be less reliable than a native version.
WXDLLIMPEXP_CORE wxWindow* wxGenericFindWindowAtPoint(const wxPoint& pt);
WXDLLIMPEXP_CORE wxWindow* wxFindWindowAtPoint(const wxPoint& pt);
// NB: this function is obsolete, use wxWindow::FindWindowByLabel() instead
//
// Find the window/widget with the given title or label.
// Pass a parent to begin the search from, or NULL to look through
// all windows.
WXDLLIMPEXP_CORE wxWindow* wxFindWindowByLabel(const wxString& title, wxWindow *parent = NULL);
// NB: this function is obsolete, use wxWindow::FindWindowByName() instead
//
// Find window by name, and if that fails, by label.
WXDLLIMPEXP_CORE wxWindow* wxFindWindowByName(const wxString& name, wxWindow *parent = NULL);
// ----------------------------------------------------------------------------
// Message/event queue helpers
// ----------------------------------------------------------------------------
// Yield to other apps/messages and disable user input
WXDLLIMPEXP_CORE bool wxSafeYield(wxWindow *win = NULL, bool onlyIfNeeded = false);
// Enable or disable input to all top level windows
WXDLLIMPEXP_CORE void wxEnableTopLevelWindows(bool enable = true);
// Check whether this window wants to process messages, e.g. Stop button
// in long calculations.
WXDLLIMPEXP_CORE bool wxCheckForInterrupt(wxWindow *wnd);
// Consume all events until no more left
WXDLLIMPEXP_CORE void wxFlushEvents();
// a class which disables all windows (except, may be, the given one) in its
// ctor and enables them back in its dtor
class WXDLLIMPEXP_CORE wxWindowDisabler
{
public:
// this ctor conditionally disables all windows: if the argument is false,
// it doesn't do anything
wxWindowDisabler(bool disable = true);
// ctor disables all windows except winToSkip
wxWindowDisabler(wxWindow *winToSkip);
// dtor enables back all windows disabled by the ctor
~wxWindowDisabler();
private:
// disable all windows except the given one (used by both ctors)
void DoDisable(wxWindow *winToSkip = NULL);
#if defined(__WXOSX__) && wxOSX_USE_COCOA
wxEventLoop* m_modalEventLoop;
#endif
wxWindowList *m_winDisabled;
bool m_disabled;
wxDECLARE_NO_COPY_CLASS(wxWindowDisabler);
};
// ----------------------------------------------------------------------------
// Cursors
// ----------------------------------------------------------------------------
// Set the cursor to the busy cursor for all windows
WXDLLIMPEXP_CORE void wxBeginBusyCursor(const wxCursor *cursor = wxHOURGLASS_CURSOR);
// Restore cursor to normal
WXDLLIMPEXP_CORE void wxEndBusyCursor();
// true if we're between the above two calls
WXDLLIMPEXP_CORE bool wxIsBusy();
// Convenience class so we can just create a wxBusyCursor object on the stack
class WXDLLIMPEXP_CORE wxBusyCursor
{
public:
wxBusyCursor(const wxCursor* cursor = wxHOURGLASS_CURSOR)
{ wxBeginBusyCursor(cursor); }
~wxBusyCursor()
{ wxEndBusyCursor(); }
// FIXME: These two methods are currently only implemented (and needed?)
// in wxGTK. BusyCursor handling should probably be moved to
// common code since the wxGTK and wxMSW implementations are very
// similar except for wxMSW using HCURSOR directly instead of
// wxCursor.. -- RL.
static const wxCursor &GetStoredCursor();
static const wxCursor GetBusyCursor();
};
void WXDLLIMPEXP_CORE wxGetMousePosition( int* x, int* y );
// ----------------------------------------------------------------------------
// X11 Display access
// ----------------------------------------------------------------------------
#if defined(__X__) || defined(__WXGTK__)
#ifdef __WXGTK__
WXDLLIMPEXP_CORE void *wxGetDisplay();
#endif
#ifdef __X__
WXDLLIMPEXP_CORE WXDisplay *wxGetDisplay();
WXDLLIMPEXP_CORE bool wxSetDisplay(const wxString& display_name);
WXDLLIMPEXP_CORE wxString wxGetDisplayName();
#endif // X or GTK+
// use this function instead of the functions above in implementation code
inline struct _XDisplay *wxGetX11Display()
{
return (_XDisplay *)wxGetDisplay();
}
#endif // X11 || wxGTK
#endif // wxUSE_GUI
// ----------------------------------------------------------------------------
// wxYield(): these functions are obsolete, please use wxApp methods instead!
// ----------------------------------------------------------------------------
// avoid redeclaring this function here if it had been already declated by
// wx/app.h, this results in warnings from g++ with -Wredundant-decls
#ifndef wx_YIELD_DECLARED
#define wx_YIELD_DECLARED
// Yield to other apps/messages
WXDLLIMPEXP_CORE bool wxYield();
#endif // wx_YIELD_DECLARED
// Like wxYield, but fails silently if the yield is recursive.
WXDLLIMPEXP_CORE bool wxYieldIfNeeded();
// ----------------------------------------------------------------------------
// Windows resources access
// ----------------------------------------------------------------------------
// Windows only: get user-defined resource from the .res file.
#ifdef __WINDOWS__
// default resource type for wxLoadUserResource()
extern WXDLLIMPEXP_DATA_BASE(const wxChar*) wxUserResourceStr;
// Return the pointer to the resource data. This pointer is read-only, use
// the overload below if you need to modify the data.
//
// Notice that the resource type can be either a real string or an integer
// produced by MAKEINTRESOURCE(). In particular, any standard resource type,
// i.e any RT_XXX constant, could be passed here.
//
// Returns true on success, false on failure. Doesn't log an error message
// if the resource is not found (because this could be expected) but does
// log one if any other error occurs.
WXDLLIMPEXP_BASE bool
wxLoadUserResource(const void **outData,
size_t *outLen,
const wxString& resourceName,
const wxChar* resourceType = wxUserResourceStr,
WXHINSTANCE module = 0);
// This function allocates a new buffer and makes a copy of the resource
// data, remember to delete[] the buffer. And avoid using it entirely if
// the overload above can be used.
//
// Returns NULL on failure.
WXDLLIMPEXP_BASE char*
wxLoadUserResource(const wxString& resourceName,
const wxChar* resourceType = wxUserResourceStr,
int* pLen = NULL,
WXHINSTANCE module = 0);
#endif // __WINDOWS__
#endif
// _WX_UTILSH__
| dariusliep/LogViewer | thirdparty/wxWidgets-3.0.0/include/wx/utils.h | C | lgpl-3.0 | 30,662 |
#!/bin/bash -i
tmp=`pwd`
source ~/.bashrc
module purge
# Ensure that there is not multiple threads running
export OMP_NUM_THREADS=1
# On thul and interactive nodes, sourching leads to going back
cd $tmp
unset tmp
# We have here the installation of all the stuff for gray....
source install_funcs.sh
# Use ln to link to this file
if [ $# -ne 0 ]; then
[ ! -e $1 ] && echo "File $1 does not exist, please create." && exit 1
source $1
else
[ ! -e compiler.sh ] && echo "Please create file: compiler.sh" && exit 1
source compiler.sh
fi
if [ -z "$(build_get --installation-path)" ]; then
msg_install --message "The installation path has not been set."
echo "I do not dare to guess where to place it..."
echo "Please set it in your source file."
exit 1
fi
if [ -z "$(build_get --module-path)" ]; then
msg_install --message "The module path has not been set."
msg_install --message "Will set it to: $(build_get --installation-path)/modules"
build_set --module-path "$(build_get --installation-path)/modules"
fi
# Begin installation of various packages
# List of archives
# The order is the installation order
# Set the umask 5 means read and execute
#umask 0
# We can always set the env-variable of LMOD
export LMOD_IGNORE_CACHE=1
# Install the helper
source helpers.bash
source libs/zlib.bash
source libs/libxml2.bash
source libs/hwloc.bash
source libs/openmpi-hpc.bash
source applications/valgrind.bash
| zerothi/bash-build | custom/valgrind.sh | Shell | lgpl-3.0 | 1,457 |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="de">
<head>
<!-- Generated by javadoc (1.8.0_45) on Mon Jan 16 14:28:58 CET 2017 -->
<title>A-Index</title>
<meta name="date" content="2017-01-16">
<link rel="stylesheet" type="text/css" href="../docstyle.css" title="Style">
<script type="text/javascript" src="../script.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="A-Index";
}
}
catch(err) {
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar.top">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.top.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../de/pniehus/jalienfx/package-summary.html">Package</a></li>
<li>Class</li>
<li>Use</li>
<li><a href="../de/pniehus/jalienfx/package-tree.html">Tree</a></li>
<li><a href="../deprecated-list.html">Deprecated</a></li>
<li class="navBarCell1Rev">Index</li>
<li><a href="../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li>Prev Letter</li>
<li><a href="index-2.html">Next Letter</a></li>
</ul>
<ul class="navList">
<li><a href="../index.html?index-files/index-1.html" target="_top">Frames</a></li>
<li><a href="index-1.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<a name="skip.navbar.top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<div class="contentContainer"><a href="index-1.html">A</a> <a href="index-2.html">D</a> <a href="index-3.html">F</a> <a href="index-4.html">G</a> <a href="index-5.html">I</a> <a href="index-6.html">R</a> <a href="index-7.html">S</a> <a href="index-8.html">U</a> <a name="I:A">
<!-- -->
</a>
<h2 class="title">A</h2>
<dl>
<dt><a href="../de/pniehus/jalienfx/AlienFXController.html" title="class in de.pniehus.jalienfx"><span class="typeNameLink">AlienFXController</span></a> - Class in <a href="../de/pniehus/jalienfx/package-summary.html">de.pniehus.jalienfx</a></dt>
<dd>
<div class="block">This class can be used to control the AlienFX lighting of AlienFX compatible windows devices.</div>
</dd>
<dt><span class="memberNameLink"><a href="../de/pniehus/jalienfx/AlienFXController.html#AlienFXController--">AlienFXController()</a></span> - Constructor for class de.pniehus.jalienfx.<a href="../de/pniehus/jalienfx/AlienFXController.html" title="class in de.pniehus.jalienfx">AlienFXController</a></dt>
<dd> </dd>
</dl>
<a href="index-1.html">A</a> <a href="index-2.html">D</a> <a href="index-3.html">F</a> <a href="index-4.html">G</a> <a href="index-5.html">I</a> <a href="index-6.html">R</a> <a href="index-7.html">S</a> <a href="index-8.html">U</a> </div>
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar.bottom">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.bottom.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../de/pniehus/jalienfx/package-summary.html">Package</a></li>
<li>Class</li>
<li>Use</li>
<li><a href="../de/pniehus/jalienfx/package-tree.html">Tree</a></li>
<li><a href="../deprecated-list.html">Deprecated</a></li>
<li class="navBarCell1Rev">Index</li>
<li><a href="../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li>Prev Letter</li>
<li><a href="index-2.html">Next Letter</a></li>
</ul>
<ul class="navList">
<li><a href="../index.html?index-files/index-1.html" target="_top">Frames</a></li>
<li><a href="index-1.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<a name="skip.navbar.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</body>
</html>
| serious-scribbler/JAlienFX | docs/index-files/index-1.html | HTML | lgpl-3.0 | 4,891 |
mozHistDownload
===============
firefox 26 + download history extractor to standard json
Have you downloaded lots and lots of files with firefox and then gone and lost them? Well this script takes a firefox places.sqlite file as argument and extracts the download history and saves it as a standard json with name and url so you can parse it and redownload everything at once. Enjoy.
| costastf/mozHistDownload | README.md | Markdown | lgpl-3.0 | 387 |
/******************************************************************************/
/* */
/* EntityCollection.hpp */
/* */
/* Copyright (C) 2015, Joseph Andrew Staedelin IV */
/* */
/* This file is part of the FastGdk project. */
/* */
/* The FastGdk is free software: you can redistribute it and/or modify */
/* it under the terms of the GNU Lesser General Public License as published */
/* by the Free Software Foundation, either version 3 of the License, or */
/* (at your option) any later version. */
/* */
/* The FastGdk is distributed in the hope that it will be useful, */
/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
/* GNU Lesser General Public License for more details. */
/* */
/* You should have received a copy of the GNU Lesser General Public License */
/* along with the FastGdk. If not, see <http://www.gnu.org/licenses/>. */
/* */
/******************************************************************************/
#ifndef FastEntityCollectionHppIncluded
#define FastEntityCollectionHppIncluded
#include <Fast/Types.hpp>
#include <Fast/Array.hpp>
#include <Fast/EntityEntry.hpp>
namespace Fast
{
class GraphicsContext;
class PhysicsScene;
class Entity;
template class FastApi Array<EntityEntry>;
class FastApi EntityCollection
{
private:
PhysicsScene &mPhysicsScene;
Array<EntityEntry> mEntityEntries;
// Hide these functions. No copying collections!
EntityCollection(const EntityCollection &that)
: mPhysicsScene(that.mPhysicsScene)
{}
EntityCollection& operator=(const EntityCollection &that)
{ return *this; }
public:
// (Con/De)structors
EntityCollection(PhysicsScene *physicsScene);
~EntityCollection();
// Entity functions
Int AddEntity(Entity *entity);
void RemoveEntity(Int id);
void RemoveAllEntities();
Entity* GetEntity(Int id);
const Entity& GetEntity(Int id) const;
PhysicsScene* GetPhysicsScene();
const PhysicsScene& GetPhysicsScene() const;
void Update(Long deltaTimeMicroseconds);
void Draw();
};
}
#endif // FastEntityCollectionHppIncluded
| JSandrew4/FastGdk | include/Fast/EntityCollection.hpp | C++ | lgpl-3.0 | 2,905 |
/*
Copyright 2013-2021 Paul Colby
This file is part of QtAws.
QtAws is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
QtAws is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with the QtAws. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef QTAWS_VOTEONPROPOSALRESPONSE_H
#define QTAWS_VOTEONPROPOSALRESPONSE_H
#include "managedblockchainresponse.h"
#include "voteonproposalrequest.h"
namespace QtAws {
namespace ManagedBlockchain {
class VoteOnProposalResponsePrivate;
class QTAWSMANAGEDBLOCKCHAIN_EXPORT VoteOnProposalResponse : public ManagedBlockchainResponse {
Q_OBJECT
public:
VoteOnProposalResponse(const VoteOnProposalRequest &request, QNetworkReply * const reply, QObject * const parent = 0);
virtual const VoteOnProposalRequest * request() const Q_DECL_OVERRIDE;
protected slots:
virtual void parseSuccess(QIODevice &response) Q_DECL_OVERRIDE;
private:
Q_DECLARE_PRIVATE(VoteOnProposalResponse)
Q_DISABLE_COPY(VoteOnProposalResponse)
};
} // namespace ManagedBlockchain
} // namespace QtAws
#endif
| pcolby/libqtaws | src/managedblockchain/voteonproposalresponse.h | C | lgpl-3.0 | 1,542 |
<?php
$oForm=new plugin_form($this->oAdresse);
$oForm->setMessage($this->tMessage);
?>
<form class="form-horizontal" action="" method="POST" >
<div class="form-group">
<label class="col-sm-2 control-label">rue</label>
<div class="col-sm-10"><?php echo $oForm->getInputText('rue',array('class'=>'form-control')) ?></div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">ville</label>
<div class="col-sm-10"><?php echo $oForm->getInputText('ville',array('class'=>'form-control')) ?></div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">pays</label>
<div class="col-sm-10"><?php echo $oForm->getInputText('pays',array('class'=>'form-control')) ?></div>
</div>
<?php echo $oForm->getToken('token',$this->token)?>
<div class="form-group">
<div class="col-sm-offset-2 col-sm-10">
<input type="submit" class="btn btn-success" value="Ajouter" /> <a class="btn btn-link" href="<?php echo $this->getLink('adresse::list')?>">Annuler</a>
</div>
</div>
</form>
| totobill/CadosProject | data/genere/proj/module/adresse/view/new.php | PHP | lgpl-3.0 | 1,034 |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns='http://www.w3.org/1999/xhtml' lang='he' dir='rtl'>
<head>
<meta http-equiv='Content-Type' content='text/html; charset=windows-1255' />
<meta http-equiv='Content-Script-Type' content='text/javascript' />
<meta http-equiv='revisit-after' content='15 days' />
<link rel='stylesheet' href='../../../_script/klli.css' />
<link rel='stylesheet' href='../../_themes/klli.css' />
<link rel='canonical' href='http://tora.us.fm/tnk1/ktuv/mja/16-24.html' />
<title>øéôåé áãéáåø</title>
<meta name='author' content='àøàì' />
<meta name='receiver' content='' />
<meta name='jmQovc' content='tnk1/ktuv/mja/16-24.html' />
<meta name='tvnit' content='' />
</head>
<body lang='he' class='newsubject'><div class='pnim'>
<!--NiwutElyon0-->
<div class='NiwutElyon'>
<div class='NiwutElyon'><a class='link_to_homepage' href='../../index.html'>øàùé</a>><a href='../../ktuv/mja/16-24.html'></a>></div>
</div>
<!--NiwutElyon1-->
<h1 id='h1'>øéôåé áãéáåø</h1>
<div id='idfields'>
<p>îàú: àøàì</p>
</div>
<script type='text/javascript' src='../../../_script/vars.js'></script>
<script type='text/javascript'>kotrt()</script>
<div id='tokn'>
<table class='inner_navigation'><tr>
<td class='previous'><a href='16-23.html'> →èæ 23— </a></td>
<td class='current'>îùìé èæ 24</td>
<td class='next'><a href='16-25.html'> — èæ 25← </a></td>
</tr></table><!-- inner_navigation -->
<div class='page single_height'>
<p><a class='psuq' href='/tnk1/prqim/t2816.htm#24'>
îùìé èæ24
</a>: "<q class='psuq'>öåÌó ãÌÀáÇùÑ àÄîÀøÅé ðÉòÇí,
îÈúåÉ÷ ìÇðÌÆôÆùÑ åÌîÇøÀôÌÅà ìÈòÈöÆí.</q>"</p>
<div class='short'>
<div class='tirgum'><p>
<strong>àîéøåú ðòéîåú</strong>, éãéãåúéåú åçëîåú, äï ëîå
<strong>öåó ãáù</strong> - äï âí
<strong>îúå÷åú ìðôù</strong> åâí
<strong>îøôàåú</strong> àú
<strong>äòöí</strong> (äâåó åäîùôçä).</p></div>
</div><!--short-->
<div class='long'>
<div class='cell hqblot longcell'>
<h2 class='subtitle'>ä÷áìåú</h2>
<p>
<strong> öåó ãáù</strong> - ùìåùä ôñå÷éí ðåñôéí áñôø îùìé îãáøéí òì
<strong>ãáù</strong> ëîùì, åðéúï ììîåã îäí âí òì øéôåé áãéáåø:</p> <ul><li>
<a class="psuq" href="/tnk1/prqim/t2824.htm#13">îùìé ëã13</a>: "<q class="psuq">àÁëÈì áÌÀðÄé
<strong>ãÀáÇùÑ</strong> ëÌÄé èåÉá, åÀðÉôÆú îÈúåÉ÷ òÇì
<strong>çÄëÌÆêÈ</strong></q>" - ìëì àçã éù èòí ùåðä, ìëì àçã éù ñåâ àçø ùì ãáù
äîúå÷ ìçéëå. ëê âí àîøé ðåòí - éù ìäúàéí ìëì àçã àú äãáøéí äîúàéîéí ìå,
ìà ìäùúîù áðåñçä àçéãä. äãáø ãåøù çëîä øáä, ëîå ùëúåá áôñå÷ ùàçøéå,
äîîùéì àú äçëîä ìãáù: "<q class="psuq">ëï ãòä
<strong>çëîä</strong> ìðôùê, àí îöàú åéù àçøéú...</q>"
</li><li>
<a class="psuq" href="/tnk1/prqim/t2825.htm#16">îùìé ëä16</a>: "<q class="psuq"><strong>ãÌÀáÇùÑ</strong> îÈöÈàúÈ - àÁëÉì ãÌÇéÌÆêÌÈ, ôÌÆï úÌÄùÒÀáÌÈòÆðÌåÌ åÇäÂ÷ÅàúåÉ</q>"
- äãáù îåòéì áëîåú ÷èðä  àê îæé÷ áëîåú âãåìä. ëê âí àîøé ðåòí - òí ëì
îúé÷åúí, éù ìäùúîù áäí áîéãä, ëãé ùìà ìâøåí ìæåìú ìîàåñ áäí; ëîå ùëúåá
áôñå÷ ùàçøéå "<q class="psuq">ä÷ø øâìê îáéú øòê, ôï éùáòê åùðàê</q>".
</li><li>
<a class="psuq" href="/tnk1/prqim/t2825.htm#27">îùìé ëä27</a>: "<q class="psuq">àÈëÉì
<strong>ãÌÀáÇùÑ</strong> äÇøÀáÌåÉú ìÉà èåÉá, åÀçÅ÷Æø ëÌÀáÉãÈí
<strong>ëÌÈáåÉã</strong></q>" - ìà èåá ìäøáåú áàëéìú ãáù åìà èåá ìäøáåú áîçùáåú òì àéê ìäùéâ òåã ëáåã (<a href="/tnk1/ktuv/mjly/mj-25-27.html">ôéøåè</a>); ëê âí
<strong>àîøé ðåòí</strong> - ìà èåá ìäùúîù áäí òì-îðú ìäùéâ ëáåã îï
äæåìú. àîøé ðåòí ãåøùéí îäàåîø ìäéåú áàåúä øîä ùì äùåîò, áâåáä äòéðééí.
îé ùîðñä ìäùéâ ëáåã, ëîå ìîùì ôåìéèé÷àé ùîðñä ìðçí àáìéí á"àîøé ðåòí"
îæåééôéí òì-îðú ìäùéâ àú úîéëúí á÷ìôé, ìà éöìéç ìøôà.</li></ul>
<p>
<strong>îøôà ìòöí</strong> - àîøé ðåòí îøôàéí àú
äòöîåú, ëìåîø àú äâåó; àáì ìà ø÷ àú äâåó:
</p> <ul><li>
<a class="psuq" href="/tnk1/prqim/t2812.htm#4">îùìé éá4</a>: "<q class="psuq">àÅùÑÆú çÇéÄì òÂèÆøÆú áÌÇòÀìÈäÌ, åÌëÀøÈ÷Èá
<strong>áÌÀòÇöÀîåÉúÈéå</strong> îÀáÄéùÑÈä</q>": àéùä îáéùä (òöìä åìà îåëùøú) ôåâòú ááøéàåúå ùì áòìä, ëé äàéù åàùúå äí ëîå òöîåú áâåó àçã (<a href="/tnk1/ktuv/mjly/mj-12-04.html">ôéøåè</a>); àáì
<strong>àîøé ðåòí</strong>
<strong>îøôàéí</strong> àú
<strong>äòöí</strong> - äàéù äîãáø
<strong>àîøé ðåòí</strong> òí àùúå éëåì ìøôà àú äéçñéí òîä, åìäôåê àåúä î<strong>ø÷á áòöîåúéå</strong> ì<strong>àùú çéì</strong>.</li><li>
<a class="psuq" href="/tnk1/prqim/t2814.htm#30">îùìé éã30</a>: "<q class="psuq">çÇéÌÅé áÀùÒÈøÄéí ìÅá îÇøÀôÌÅà, åÌøÀ÷Çá
<strong>òÂöÈîåÉú</strong> ÷ÄðÀàÈä</q>": ÷ðàä áàãí îöìéç ôåâòú ááøéàåú (<a href="/tnk1/ktuv/mjly/mj-14-30.html">ôéøåè</a>), àê ëùäàãí äîöìéç îãáø
<strong>àîøé ðåòí</strong>, îãáø áçáéáåú åáðòéîåú òí ëì îëøéå, äí ôçåú ðåèéí ì÷ðà áå, åëê àîøé äðåòí ùìå
<strong>îøôàéí</strong> àú
<strong>òöîåúéäí</strong>.</li></ul>
<p>ä÷áìåú ðåñôåú:</p> <ul><li>ãéáåøéí ðòéîéí îåòéìéí ìà ø÷ ìùåîò àìà âí ìîãáø,
<a class="psuq" href="/tnk1/prqim/t2811.htm#25">îùìé éà25</a>: "<q class="psuq">ðÆôÆùÑ áÌÀøÈëÈä úÀãËùÌÈï, åÌîÇøÀåÆä âÌÇí äåÌà éåÉøÆà</q>" - àãí ùðôùå îìàä ááøëä ëìôé àðùéí àçøéí, éæëä ìáøéàåú åùôò (<a href="/tnk1/ktuv/mjly/mj-11-2526.html">ôéøåè</a>).
</li><li> ëîå ùäãéáåø éëåì ìøôà, äåà éëåì âí ìäøåñ, åìëï ãøåùä æäéøåú øáä ëùîãáøéí òí àãí äæ÷å÷ ìøéôåé,
<a class="psuq" href="/tnk1/prqim/t2815.htm#4">îùìé èå4</a>: "<q class="psuq"><strong>îÇøÀôÌÅà</strong> ìÈùÑåÉï òÅõ çÇéÌÄéí, åÀñÆìÆó áÌÈäÌ ùÑÆáÆø áÌÀøåÌçÇ</q>" - ñéìåó åòéååú áìùåï äîøôàú òìåì ìùáåø àú øåçå ùì äùåîò (<a href="/tnk1/ktuv/mjly/mj-15-04.html">ôéøåè</a>).</li><li>
<a class="psuq" href="/tnk1/prqim/t2815.htm#26">îùìé èå26</a>: "<q class="psuq">úÌåÉòÂáÇú ä' îÇçÀùÑÀáåÉú øÈò, åÌèÀäÉøÄéí àÄîÀøÅé
<strong>ðÉòÇí</strong></q>"  - ä' ùåðà
ùàðùéí çåùáéí øò æä òì æä, àê èäåøéí áòéðéå äãéáåøéí ùàðùéí îãáøéí æä
òí æä áðåòí - ãáøé éãéãåú åàäáä, ãéáåøéí îúå÷éí äîøôàéí àú äùðàä (<a href="/tnk1/ktuv/mjly/mj-15-26.html">ôéøåè</a>).
</li><li>
<a class="psuq" href="/tnk1/prqim/t2827.htm#9">îùìé ëæ9</a>: "<q class="psuq">ùÑÆîÆï åÌ÷ÀèÉøÆú éÀùÒÇîÌÇç ìÅá,
<strong>åÌîÆúÆ÷</strong> øÅòÅäåÌ îÅòÂöÇú ðÈôÆùÑ</q>" (<a href="/tnk1/ktuv/mjly/mj-27-09.html">ôéøåè</a>)</li></ul>
<div class="future">øàå âí
<a href="/tnk1/ktuv/mjly/ecm.html">òöîåú áñôø îùìé</a>,
<a href="/tnk1/ktuv/mjly/dvj.html">ãáù áñôø îùìé</a>.
</div>
<div class="future">
<h2>ôñå÷éí ðåñôéí òí äùåøù "ðòí"
</h2>
<ul><li>
<a class="psuq" href="/tnk1/prqim/t1017.htm#10">éùòéäå éæ10</a>: "<q class="psuq">ëÌÄé ùÑÈëÇçÇúÌÀ àÁìÉäÅé éÄùÑÀòÅêÀ åÀöåÌø îÈòËæÌÅêÀ ìÉà æÈëÈøÀúÌÀ òÇì ëÌÅï úÌÄèÌÀòÄé ðÄèÀòÅé
<strong>ðÇòÂîÈðÄéí</strong> åÌæÀîÉøÇú æÈø úÌÄæÀøÈòÆðÌåÌ</q>"
</li><li>
<a class="psuq" href="/tnk1/prqim/t1232.htm#19">éçæ÷àì ìá19</a>: "<q class="psuq">îÄîÌÄé
<strong>ðÈòÈîÀúÌÈ</strong> øÀãÈä åÀäÈùÑÀëÌÀáÈä àÆú òÂøÅìÄéí</q>"
</li><li>
<a class="psuq" href="/tnk1/prqim/t2616.htm#6">úäìéí èæ6</a>: "<q class="psuq">çÂáÈìÄéí ðÈôÀìåÌ ìÄé
<strong>áÌÇðÌÀòÄîÄéí</strong> àÇó ðÇçÂìÈú ùÑÈôÀøÈä òÈìÈé</q>"
</li><li>
<a class="psuq" href="/tnk1/prqim/t2616.htm#11">úäìéí èæ11</a>: "<q class="psuq">úÌåÉãÄéòÅðÄé àÉøÇç çÇéÌÄéí ùÒÉáÇò ùÒÀîÈçåÉú àÆú ôÌÈðÆéêÈ
<strong>ðÀòÄîåÉú</strong> áÌÄéîÄéðÀêÈ ðÆöÇç</q>"
</li><li>
<a class="psuq" href="/tnk1/prqim/t2681.htm#3">úäìéí ôà3</a>: "<q class="psuq">ùÒÀàåÌ æÄîÀøÈä åÌúÀðåÌ úÉó ëÌÄðÌåÉø
<strong>ðÈòÄéí</strong> òÄí ðÈáÆì</q>"
</li><li>
<a class="psuq" href="/tnk1/prqim/t2690.htm#17">úäìéí ö17</a>: "<q class="psuq">åÄéäÄé
<strong>ðÉòÇí</strong> àÂãÉðÈé àÁìÉäÅéðåÌ òÈìÅéðåÌ åÌîÇòÂùÒÅä éÈãÅéðåÌ ëÌåÉðÀðÈä òÈìÅéðåÌ åÌîÇòÂùÒÅä éÈãÅéðåÌ ëÌåÉðÀðÅäåÌ</q>"
</li><li>
<a class="psuq" href="/tnk1/prqim/t26d5.htm#3">úäìéí ÷ìä3</a>: "<q class="psuq">äÇìÀìåÌ éÈäÌ ëÌÄé èåÉá ä'. æÇîÌÀøåÌ ìÄùÑÀîåÉ ëÌÄé
<strong>ðÈòÄéí</strong></q>"
</li><li>
<a class="psuq" href="/tnk1/prqim/t26e1.htm#4">úäìéí ÷îà4</a>: "<q class="psuq">àÇì úÌÇè ìÄáÌÄé ìÀãÈáÈø øÈò ìÀäÄúÀòåÉìÅì òÂìÄìåÉú áÌÀøÆùÑÇò àÆú àÄéùÑÄéí ôÌÉòÂìÅé àÈåÆï åÌáÇì àÆìÀçÇí
<strong>áÌÀîÇðÀòÇîÌÅéäÆí</strong></q>"
</li><li>
<a class="psuq" href="/tnk1/prqim/t26e1.htm#6">úäìéí ÷îà6</a>: "<q class="psuq">ðÄùÑÀîÀèåÌ áÄéãÅé ñÆìÇò ùÑÉôÀèÅéäÆí åÀùÑÈîÀòåÌ àÂîÈøÇé ëÌÄé
<strong>ðÈòÅîåÌ</strong></q>"
</li><li>
<a class="psuq" href="/tnk1/prqim/t2736.htm#11">àéåá ìå11</a>: "<q class="psuq">àÄí éÄùÑÀîÀòåÌ åÀéÇòÂáÉãåÌ éÀëÇìÌåÌ éÀîÅéäÆí áÌÇèÌåÉá åÌùÑÀðÅéäÆí
<strong>áÌÇðÌÀòÄéîÄéí</strong></q>"
</li><li>
<a class="psuq" href="/tnk1/prqim/t2809.htm#17">îùìé è17</a>: "<q class="psuq">àÅùÑÆú
ëÌÀñÄéìåÌú äÉîÄéÌÈä ôÌÀúÇéÌåÌú åÌáÇì-éÈãÀòÈä îÌÈä. åÀéÈùÑÀáÈä ìÀôÆúÇç
áÌÅéúÈäÌ--òÇì-ëÌÄñÌÅà îÀøÉîÅé ÷ÈøÆú ìÄ÷ÀøÉà ìÀòÉáÀøÅé-ãÈøÆêÀ äÇîÀéÇùÌÑÀøÄéí
àÉøÀçåÉúÈí. îÄé-ôÆúÄé éÈñËø äÅðÌÈä åÇçÂñÇø-ìÅá åÀàÈîÀøÈä ìÌåÉ: îÇéÄí-âÌÀðåÌáÄéí
<strong>éÄîÀúÌÈ÷åÌ</strong> åÀìÆçÆí ñÀúÈøÄéí
<strong>éÄðÀòÈí</strong>. åÀìÉà-éÈãÇò ëÌÄé-øÀôÈàÄéí ùÑÈí áÌÀòÄîÀ÷Åé ùÑÀàåÉì ÷ÀøËàÆéäÈ</q>"- çåáä ìäæäéø åìäãâéù ëé îùì æä ðàîø òì-ãøê ääèòéä
<small>(øîé ðéø)</small>.
</li><li>
<a class="psuq" href="/tnk1/prqim/t2822.htm#18">îùìé ëá18</a>: "<q class="psuq">ëÌÄé
<strong>ðÈòÄéí</strong> ëÌÄé úÄùÑÀîÀøÅí áÌÀáÄèÀðÆêÈ, éÄëÌÉðåÌ éÇçÀãÌÈå òÇì ùÒÀôÈúÆéêÈ</q>"
</li><li>
<a class="psuq" href="/tnk1/prqim/t2823.htm#8">îùìé ëâ8</a>: "<q class="psuq">ôÌÄúÌÀêÈ àÈëÇìÀúÌÈ úÀ÷ÄéàÆðÌÈä' åÀùÑÄçÇúÌÈ ãÌÀáÈøÆéêÈ
<strong>äÇðÌÀòÄéîÄéí</strong></q>"
</li><li>
<a class="psuq" href="/tnk1/prqim/t2824.htm#4">îùìé ëã4</a>: "<q class="psuq">åÌáÀãÇòÇú çÂãÈøÄéí éÄîÌÈìÀàåÌ ëÌÈì äåÉï éÈ÷Èø
<strong>åÀðÈòÄéí</strong></q>"
</li><li>
<a class="psuq" href="/tnk1/prqim/t2824.htm#25">îùìé ëã25</a>: "<q class="psuq">åÀìÇîÌåÉëÄéçÄéí
<strong>éÄðÀòÈí</strong>, åÇòÂìÅéäÆí úÌÈáåÉà áÄøÀëÌÇú
<strong>èåÉá</strong></q>" - áðéâåã ìîä ùàôùø ìçùåá, ãåå÷à ìîåëéçéí éäéå éãéãéí.
</li><li>
<a class="psuq" href="/tnk1/prqim/t3001.htm#16">ùéø äùéøéí à16</a>: "<q class="psuq">äÄðÌÀêÈ éÈôÆä
<strong>ãåÉãÄé</strong>, àÇó
<strong>ðÈòÄéí</strong>, àÇó òÇøÀùÒÅðåÌ øÇòÂðÈðÈä</q>"
</li><li>
<a class="psuq" href="/tnk1/prqim/t3007.htm#7">ùéø äùéøéí æ7</a>: "<q class="psuq">îÇä éÌÈôÄéú åÌîÇä
<strong>ðÌÈòÇîÀúÌÀ, àÇäÂáÈä</strong> áÌÇúÌÇòÂðåÌâÄéí</q>"</li></ul></div>
</div>
<div class='cell ecot longcell'>
<h2 class='subtitle'>òöåú</h2>
<p>äôñå÷ îééòõ ìøôà àú äâåó åàú äðôù áàîöòåú ãéáåøéí -
<strong>àîøé ðåòí</strong>. ìîåùâ <strong>ðåòí</strong> éùðï îùîòåéåú ùåðåú, ùàôùø ìñãøï ëðâã àøáòú äòåìîåú:</p><p>1.
<strong>ðåòí</strong> ÷ùåø ìéãéãåú, àäáä åáøéú<small class="small"> (ëðâã òåìí äîòùä)</small>:<br />
</p> <ul><li>
<a class="psuq" href="/tnk1/prqim/t08b01.htm#23">ùîåàì á à23-26</a>: "<q class="psuq">ùÑÈàåÌì åÄéäåÉðÈúÈï,
äÇðÌÆàÁäÈáÄéí
<strong>
åÀäÇðÌÀòÄéîÄí</strong> áÌÀçÇéÌÅéäÆí åÌáÀîåÉúÈí ìÉà ðÄôÀøÈãåÌ, îÄðÌÀùÑÈøÄéí ÷ÇìÌåÌ îÅàÂøÈéåÉú âÌÈáÅøåÌ... öÇø ìÌÄé òÈìÆéêÈ àÈçÄé éÀäåÉðÈúÈï
<strong>
ðÈòÇîÀúÌÈ</strong> ìÄé îÀàÉã ðÄôÀìÀàÇúÈä
àÇäÂáÈúÀêÈ ìÄé îÅàÇäÂáÇú ðÈùÑÄéí</q>"
</li><li>
<a class="psuq" href="/tnk1/prqim/t2311.htm#10">æëøéä éà10</a>: "<q class="psuq">åÈàÆ÷ÌÇç àÆú îÇ÷ÀìÄé àÆú
<strong>ðÉòÇí</strong> åÈàÆâÀãÌÇò àÉúåÉ, ìÀäÈôÅéø àÆú
<strong>áÌÀøÄéúÄé</strong> àÂùÑÆø ëÌÈøÇúÌÄé àÆú ëÌÈì äÈòÇîÌÄéí</q>"
</li><li>
<a class="psuq" href="/tnk1/prqim/t26d3.htm#1">úäìéí ÷ìâ1</a>: "<q class="psuq">ùÑÄéø äÇîÌÇòÂìåÉú ìÀãÈåÄã äÄðÌÅä îÇä èÌåÉá åÌîÇä
<strong>ðÌÈòÄéí</strong> ùÑÆáÆú
<strong>àÇçÄéí</strong> âÌÇí éÈçÇã</q>"</li></ul>
<p> àí ëê, àôùø ìøôà àãí çåìä áëê ùîãáøéí òîå ãéáåøéí ùì éãéãåú åàäáä.</p>
<p>2.
<strong>ðåòí</strong> ÷ùåø âí ìùéøéí<small class="small"> (ëðâã òåìí äøâù)</small>:
<br />
</p> <ul><li>
<a class="psuq" href="/tnk1/prqim/t08b23.htm#1">ùîåàì á ëâ1</a>: "<q class="psuq">åÀàÅìÌÆä ãÌÄáÀøÅé ãÌÈåÄã äÈàÇçÂøÉðÄéí... îÀùÑÄéçÇ àÁìÉäÅé éÇòÂ÷Éá
<strong>åÌðÀòÄéí</strong> æÀîÄøåÉú éÄùÒÀøÈàÅì</q>"
</li><li>
<a class="psuq" href="/tnk1/prqim/t26e7.htm#1">úäìéí ÷îæ1</a>: "<q class="psuq">äÇìÀìåÌ éÈäÌ, ëÌÄé èåÉá æÇîÌÀøÈä àÁìÉäÅéðåÌ, ëÌÄé
<strong>ðÈòÄéí</strong> ðÈàåÈä úÀäÄìÌÈä</q>"</li></ul>
<p> àí ëê, àôùø ìøôà àãí çåìä áëê ùùøéí ìå ùéøéí éôéí.</p><p>3.
<strong>ðåòí</strong> ÷ùåø âí ìçëîä<small class="small"> (ëðâã òåìí äùëì)</small>:<br />
</p> <ul><li>
<a class="psuq" href="/tnk1/prqim/t2802.htm#10">îùìé á10</a>: "<q class="psuq">ëÌÄé úÈáåÉà çÈëÀîÈä áÀìÄáÌÆêÈ, åÀãÇòÇú ìÀðÇôÀùÑÀêÈ<strong> éÄðÀòÈí</strong></q>" (<a href="/tnk1/ktuv/mj/02-10.html">ôéøåè</a>).</li><li>
<a class="psuq" href="/tnk1/prqim/t2803.htm#17">îùìé â17</a>: "<q class="psuq">ãÌÀøÈëÆéäÈ ãÇøÀëÅé<strong> ðÉòÇí,</strong> åÀëÈì ðÀúÄéáåÉúÆéäÈ ùÑÈìåÉí</q>" (<a href="/tnk1/ktuv/mj/03-17.html">ôéøåè</a>).
</li></ul>
<p> àí ëê, àôùø ìøôà àãí çåìä áãéáåøéí ùì çëîä åìéîåã: "<q class="mfrj">éù
ëîä áðé àãí ùðôùí îøä ìäí îôðé ãåç÷í, åðôù îøä âåøîú çåìàéí øòéí øáéí
àì äâåó, åàí éúðå ìéáí ìù÷åã òì ãìúåú áéú äîãøù éåí éåí, äîø ðäôê ìäí
ìîúå÷, åîîéìà éîöàå øôåàä ìðôù åìâåó</q>"<small class="small"> (øî"ã ååàìé)</small>. </p>
<p>4.
<strong>ðåòí</strong> ÷ùåø âí ìðåëçåú ä'<small class="small"> (ëðâã òåìí äðùîä)</small>:<br />
</p> <ul><li>
<a class="psuq" href="/tnk1/prqim/t2627.htm#4">úäìéí ëæ4</a>: "<q class="psuq">àÇçÇú ùÑÈàÇìÀúÌÄé îÅàÅú ä' àåÉúÈäÌ àÂáÇ÷ÌÅùÑ, ùÑÄáÀúÌÄé áÌÀáÅéú ä' ëÌÈì éÀîÅé çÇéÌÇé ìÇçÂæåÉú
<strong>áÌÀðÉòÇí</strong> ä' åÌìÀáÇ÷ÌÅø áÌÀäÅéëÈìåÉ</q>"</li></ul>
<p> àí ëê, àôùø ìøôà àãí çåìä áãéáåøéí ùîøàéí ìå àú ðåëçåú ä' áëì î÷åí åáëì àéøåò ù÷åøä ìå.</p>
</div>
<div class='cell full longcell'>
<h2 class='subtitle'>ìòéåï ðåñó</h2>
<p><a href="/tnk1/ktuv/mjly/mj-16-24.html">äîàîø äî÷åøé</a></p><br />
</div>
</div><!--long-->
</div><!--page-->
<table class='inner_navigation'><tr>
<td class='previous'><a href='16-23.html'> →èæ 23— </a></td>
<td class='current'>îùìé èæ 24</td>
<td class='next'><a href='16-25.html'> — èæ 25← </a></td>
</tr></table><!-- inner_navigation -->
</div><!--tokn-->
<h2 id='tguvot'>úâåáåú</h2>
<ul id='ultguvot'>
<li></li>
</ul><!--end-->
<script type='text/javascript'>tguva();txtit()</script>
</div><!--pnim-->
</body>
</html>
| erelsgl/erel-sites | tnk1/ktuv/mja/16-24.html | HTML | lgpl-3.0 | 14,305 |
<import resource="classpath:alfresco/site-webscripts/org/alfresco/callutils.js">
if (!json.isNull("wikipage"))
{
var wikipage = String(json.get("wikipage"));
model.pagecontent = getPageText(wikipage);
model.title = wikipage.replace(/_/g, " ");
}
else
{
model.pagecontent = "<h3>" + msg.get("message.nopage") + "</h3>";
model.title = "";
}
function getPageText(wikipage)
{
var c = sitedata.getComponent(url.templateArgs.componentId);
c.properties["wikipage"] = wikipage;
c.save();
var siteId = String(json.get("siteId"));
var uri = "/slingshot/wiki/page/" + siteId + "/" + encodeURIComponent(wikipage) + "?format=mediawiki";
var connector = remote.connect("alfresco");
var result = connector.get(uri);
if (result.status == status.STATUS_OK)
{
/**
* Always strip unsafe tags here.
* The config to option this is currently webscript-local elsewhere, so this is the safest option
* until the config can be moved to share-config scope in a future version.
*/
return stringUtils.stripUnsafeHTML(result.response);
}
else
{
return "";
}
} | loftuxab/community-edition-old | projects/slingshot/config/alfresco/site-webscripts/org/alfresco/modules/wiki/config-wiki.post.json.js | JavaScript | lgpl-3.0 | 1,134 |
#!/bin/bash
# Usage: ./grab_core_on_segfault.sh <firmeare.elf> \
# <piksi_dev> <bmp_dev> \
# <seconds-to-sleep>
#
# Intended to be called from HITL log capture:
# if [ -e $MD_EXTERNAL_RESOURCES_LOCKED_BMP1 ]; then
# ./grab_core_on_segfault.sh ../../piksi_firmware_$GIT_DESCRIBE.elf \
# $MD_EXTERNAL_RESOURCES_LOCKED_PORT1 \
# $MD_EXTERNAL_RESOURCES_LOCKED_BMP1 \
# $SECONDS
# fi
set -e
[ -e $1 ]
[ -e $2 ]
[ -e $3 ]
# Find serial number from Piksi device name
export PIKSI=`echo $2 | egrep -o "PK[0-9]{4}"`
gdb-multiarch -batch -nx \
-ex "tar ext $3" \
-ex "source coredump3.py" \
-ex "set gcore-file-name core-$PIKSI" \
-ex "mon jtag 4 5 6" \
-ex "att 1" \
-ex "run" \
$1 \
&>gdblog.$PIKSI &
sleep 1
trap 'kill $(jobs -p)' SIGINT SIGTERM EXIT
tail -f gdblog.$PIKSI | grep "core dumped" &
sleep $4
| henryhallam/piksi_tools | piksi_tools/testing/grab_core_on_segfault.sh | Shell | lgpl-3.0 | 1,075 |
package org.eso.ias.plugin;
/**
* The exception returned by the Plugin
* @author acaproni
*
*/
public class PluginException extends Exception {
public PluginException() {
}
public PluginException(String message) {
super(message);
}
public PluginException(Throwable cause) {
super(cause);
}
public PluginException(String message, Throwable cause) {
super(message, cause);
}
public PluginException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) {
super(message, cause, enableSuppression, writableStackTrace);
}
}
| IntegratedAlarmSystem-Group/ias | plugin/src/main/java/org/eso/ias/plugin/PluginException.java | Java | lgpl-3.0 | 581 |
package clearvolume.renderer;
/**
* Overlays that implement this interface can declare a key binding that will be
* used to toggle it's display on/off
*
* @author Loic Royer (2015)
*
*/
public interface SingleKeyToggable
{
/**
* Returns key code of toggle key combination.
*
* @return toggle key as short code.
*/
public short toggleKeyCode();
/**
* Returns modifier of toggle key combination.
*
* @return toggle key as short code.
*/
public int toggleKeyModifierMask();
/**
* Toggle on/off
*
* @return new state
*/
public boolean toggle();
}
| ClearVolume/ClearVolume | src/java/clearvolume/renderer/SingleKeyToggable.java | Java | lgpl-3.0 | 587 |
// Copyright 2020 The go-ethereum Authors
// This file is part of the go-ethereum library.
//
// The go-ethereum library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// The go-ethereum library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with the go-ethereum library. If not, see <http://www.gnu.org/licenses/>.
package abi
import (
"math/big"
"github.com/matthieu/go-ethereum/common"
)
type packUnpackTest struct {
def string
unpacked interface{}
packed string
}
var packUnpackTests = []packUnpackTest{
// Booleans
{
def: `[{ "type": "bool" }]`,
packed: "0000000000000000000000000000000000000000000000000000000000000001",
unpacked: true,
},
{
def: `[{ "type": "bool" }]`,
packed: "0000000000000000000000000000000000000000000000000000000000000000",
unpacked: false,
},
// Integers
{
def: `[{ "type": "uint8" }]`,
unpacked: uint8(2),
packed: "0000000000000000000000000000000000000000000000000000000000000002",
},
{
def: `[{ "type": "uint8[]" }]`,
unpacked: []uint8{1, 2},
packed: "0000000000000000000000000000000000000000000000000000000000000020" +
"0000000000000000000000000000000000000000000000000000000000000002" +
"0000000000000000000000000000000000000000000000000000000000000001" +
"0000000000000000000000000000000000000000000000000000000000000002",
},
{
def: `[{ "type": "uint16" }]`,
unpacked: uint16(2),
packed: "0000000000000000000000000000000000000000000000000000000000000002",
},
{
def: `[{ "type": "uint16[]" }]`,
unpacked: []uint16{1, 2},
packed: "0000000000000000000000000000000000000000000000000000000000000020" +
"0000000000000000000000000000000000000000000000000000000000000002" +
"0000000000000000000000000000000000000000000000000000000000000001" +
"0000000000000000000000000000000000000000000000000000000000000002",
},
{
def: `[{"type": "uint17"}]`,
packed: "0000000000000000000000000000000000000000000000000000000000000001",
unpacked: big.NewInt(1),
},
{
def: `[{"type": "uint32"}]`,
packed: "0000000000000000000000000000000000000000000000000000000000000001",
unpacked: uint32(1),
},
{
def: `[{"type": "uint32[]"}]`,
unpacked: []uint32{1, 2},
packed: "0000000000000000000000000000000000000000000000000000000000000020" +
"0000000000000000000000000000000000000000000000000000000000000002" +
"0000000000000000000000000000000000000000000000000000000000000001" +
"0000000000000000000000000000000000000000000000000000000000000002",
},
{
def: `[{"type": "uint64"}]`,
unpacked: uint64(2),
packed: "0000000000000000000000000000000000000000000000000000000000000002",
},
{
def: `[{"type": "uint64[]"}]`,
unpacked: []uint64{1, 2},
packed: "0000000000000000000000000000000000000000000000000000000000000020" +
"0000000000000000000000000000000000000000000000000000000000000002" +
"0000000000000000000000000000000000000000000000000000000000000001" +
"0000000000000000000000000000000000000000000000000000000000000002",
},
{
def: `[{"type": "uint256"}]`,
unpacked: big.NewInt(2),
packed: "0000000000000000000000000000000000000000000000000000000000000002",
},
{
def: `[{"type": "uint256[]"}]`,
unpacked: []*big.Int{big.NewInt(1), big.NewInt(2)},
packed: "0000000000000000000000000000000000000000000000000000000000000020" +
"0000000000000000000000000000000000000000000000000000000000000002" +
"0000000000000000000000000000000000000000000000000000000000000001" +
"0000000000000000000000000000000000000000000000000000000000000002",
},
{
def: `[{"type": "int8"}]`,
unpacked: int8(2),
packed: "0000000000000000000000000000000000000000000000000000000000000002",
},
{
def: `[{"type": "int8[]"}]`,
unpacked: []int8{1, 2},
packed: "0000000000000000000000000000000000000000000000000000000000000020" +
"0000000000000000000000000000000000000000000000000000000000000002" +
"0000000000000000000000000000000000000000000000000000000000000001" +
"0000000000000000000000000000000000000000000000000000000000000002",
},
{
def: `[{"type": "int16"}]`,
unpacked: int16(2),
packed: "0000000000000000000000000000000000000000000000000000000000000002",
},
{
def: `[{"type": "int16[]"}]`,
unpacked: []int16{1, 2},
packed: "0000000000000000000000000000000000000000000000000000000000000020" +
"0000000000000000000000000000000000000000000000000000000000000002" +
"0000000000000000000000000000000000000000000000000000000000000001" +
"0000000000000000000000000000000000000000000000000000000000000002",
},
{
def: `[{"type": "int17"}]`,
packed: "0000000000000000000000000000000000000000000000000000000000000001",
unpacked: big.NewInt(1),
},
{
def: `[{"type": "int32"}]`,
unpacked: int32(2),
packed: "0000000000000000000000000000000000000000000000000000000000000002",
},
{
def: `[{"type": "int32"}]`,
packed: "0000000000000000000000000000000000000000000000000000000000000001",
unpacked: int32(1),
},
{
def: `[{"type": "int32[]"}]`,
unpacked: []int32{1, 2},
packed: "0000000000000000000000000000000000000000000000000000000000000020" +
"0000000000000000000000000000000000000000000000000000000000000002" +
"0000000000000000000000000000000000000000000000000000000000000001" +
"0000000000000000000000000000000000000000000000000000000000000002",
},
{
def: `[{"type": "int64"}]`,
unpacked: int64(2),
packed: "0000000000000000000000000000000000000000000000000000000000000002",
},
{
def: `[{"type": "int64[]"}]`,
unpacked: []int64{1, 2},
packed: "0000000000000000000000000000000000000000000000000000000000000020" +
"0000000000000000000000000000000000000000000000000000000000000002" +
"0000000000000000000000000000000000000000000000000000000000000001" +
"0000000000000000000000000000000000000000000000000000000000000002",
},
{
def: `[{"type": "int256"}]`,
unpacked: big.NewInt(2),
packed: "0000000000000000000000000000000000000000000000000000000000000002",
},
{
def: `[{"type": "int256"}]`,
packed: "ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",
unpacked: big.NewInt(-1),
},
{
def: `[{"type": "int256[]"}]`,
unpacked: []*big.Int{big.NewInt(1), big.NewInt(2)},
packed: "0000000000000000000000000000000000000000000000000000000000000020" +
"0000000000000000000000000000000000000000000000000000000000000002" +
"0000000000000000000000000000000000000000000000000000000000000001" +
"0000000000000000000000000000000000000000000000000000000000000002",
},
// Address
{
def: `[{"type": "address"}]`,
packed: "0000000000000000000000000100000000000000000000000000000000000000",
unpacked: common.Address{1},
},
{
def: `[{"type": "address[]"}]`,
unpacked: []common.Address{{1}, {2}},
packed: "0000000000000000000000000000000000000000000000000000000000000020" +
"0000000000000000000000000000000000000000000000000000000000000002" +
"0000000000000000000000000100000000000000000000000000000000000000" +
"0000000000000000000000000200000000000000000000000000000000000000",
},
// Bytes
{
def: `[{"type": "bytes1"}]`,
unpacked: [1]byte{1},
packed: "0100000000000000000000000000000000000000000000000000000000000000",
},
{
def: `[{"type": "bytes2"}]`,
unpacked: [2]byte{1},
packed: "0100000000000000000000000000000000000000000000000000000000000000",
},
{
def: `[{"type": "bytes3"}]`,
unpacked: [3]byte{1},
packed: "0100000000000000000000000000000000000000000000000000000000000000",
},
{
def: `[{"type": "bytes4"}]`,
unpacked: [4]byte{1},
packed: "0100000000000000000000000000000000000000000000000000000000000000",
},
{
def: `[{"type": "bytes5"}]`,
unpacked: [5]byte{1},
packed: "0100000000000000000000000000000000000000000000000000000000000000",
},
{
def: `[{"type": "bytes6"}]`,
unpacked: [6]byte{1},
packed: "0100000000000000000000000000000000000000000000000000000000000000",
},
{
def: `[{"type": "bytes7"}]`,
unpacked: [7]byte{1},
packed: "0100000000000000000000000000000000000000000000000000000000000000",
},
{
def: `[{"type": "bytes8"}]`,
unpacked: [8]byte{1},
packed: "0100000000000000000000000000000000000000000000000000000000000000",
},
{
def: `[{"type": "bytes9"}]`,
unpacked: [9]byte{1},
packed: "0100000000000000000000000000000000000000000000000000000000000000",
},
{
def: `[{"type": "bytes10"}]`,
unpacked: [10]byte{1},
packed: "0100000000000000000000000000000000000000000000000000000000000000",
},
{
def: `[{"type": "bytes11"}]`,
unpacked: [11]byte{1},
packed: "0100000000000000000000000000000000000000000000000000000000000000",
},
{
def: `[{"type": "bytes12"}]`,
unpacked: [12]byte{1},
packed: "0100000000000000000000000000000000000000000000000000000000000000",
},
{
def: `[{"type": "bytes13"}]`,
unpacked: [13]byte{1},
packed: "0100000000000000000000000000000000000000000000000000000000000000",
},
{
def: `[{"type": "bytes14"}]`,
unpacked: [14]byte{1},
packed: "0100000000000000000000000000000000000000000000000000000000000000",
},
{
def: `[{"type": "bytes15"}]`,
unpacked: [15]byte{1},
packed: "0100000000000000000000000000000000000000000000000000000000000000",
},
{
def: `[{"type": "bytes16"}]`,
unpacked: [16]byte{1},
packed: "0100000000000000000000000000000000000000000000000000000000000000",
},
{
def: `[{"type": "bytes17"}]`,
unpacked: [17]byte{1},
packed: "0100000000000000000000000000000000000000000000000000000000000000",
},
{
def: `[{"type": "bytes18"}]`,
unpacked: [18]byte{1},
packed: "0100000000000000000000000000000000000000000000000000000000000000",
},
{
def: `[{"type": "bytes19"}]`,
unpacked: [19]byte{1},
packed: "0100000000000000000000000000000000000000000000000000000000000000",
},
{
def: `[{"type": "bytes20"}]`,
unpacked: [20]byte{1},
packed: "0100000000000000000000000000000000000000000000000000000000000000",
},
{
def: `[{"type": "bytes21"}]`,
unpacked: [21]byte{1},
packed: "0100000000000000000000000000000000000000000000000000000000000000",
},
{
def: `[{"type": "bytes22"}]`,
unpacked: [22]byte{1},
packed: "0100000000000000000000000000000000000000000000000000000000000000",
},
{
def: `[{"type": "bytes23"}]`,
unpacked: [23]byte{1},
packed: "0100000000000000000000000000000000000000000000000000000000000000",
},
{
def: `[{"type": "bytes24"}]`,
unpacked: [24]byte{1},
packed: "0100000000000000000000000000000000000000000000000000000000000000",
},
{
def: `[{"type": "bytes25"}]`,
unpacked: [25]byte{1},
packed: "0100000000000000000000000000000000000000000000000000000000000000",
},
{
def: `[{"type": "bytes26"}]`,
unpacked: [26]byte{1},
packed: "0100000000000000000000000000000000000000000000000000000000000000",
},
{
def: `[{"type": "bytes27"}]`,
unpacked: [27]byte{1},
packed: "0100000000000000000000000000000000000000000000000000000000000000",
},
{
def: `[{"type": "bytes28"}]`,
unpacked: [28]byte{1},
packed: "0100000000000000000000000000000000000000000000000000000000000000",
},
{
def: `[{"type": "bytes29"}]`,
unpacked: [29]byte{1},
packed: "0100000000000000000000000000000000000000000000000000000000000000",
},
{
def: `[{"type": "bytes30"}]`,
unpacked: [30]byte{1},
packed: "0100000000000000000000000000000000000000000000000000000000000000",
},
{
def: `[{"type": "bytes31"}]`,
unpacked: [31]byte{1},
packed: "0100000000000000000000000000000000000000000000000000000000000000",
},
{
def: `[{"type": "bytes32"}]`,
unpacked: [32]byte{1},
packed: "0100000000000000000000000000000000000000000000000000000000000000",
},
{
def: `[{"type": "bytes32"}]`,
packed: "0100000000000000000000000000000000000000000000000000000000000000",
unpacked: [32]byte{1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
},
{
def: `[{"type": "bytes"}]`,
packed: "0000000000000000000000000000000000000000000000000000000000000020" +
"0000000000000000000000000000000000000000000000000000000000000020" +
"0100000000000000000000000000000000000000000000000000000000000000",
unpacked: common.Hex2Bytes("0100000000000000000000000000000000000000000000000000000000000000"),
},
{
def: `[{"type": "bytes32"}]`,
packed: "0100000000000000000000000000000000000000000000000000000000000000",
unpacked: [32]byte{1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
},
// Functions
{
def: `[{"type": "function"}]`,
packed: "0100000000000000000000000000000000000000000000000000000000000000",
unpacked: [24]byte{1},
},
// Slice and Array
{
def: `[{"type": "uint8[]"}]`,
packed: "0000000000000000000000000000000000000000000000000000000000000020" +
"0000000000000000000000000000000000000000000000000000000000000002" +
"0000000000000000000000000000000000000000000000000000000000000001" +
"0000000000000000000000000000000000000000000000000000000000000002",
unpacked: []uint8{1, 2},
},
{
def: `[{"type": "uint8[]"}]`,
packed: "0000000000000000000000000000000000000000000000000000000000000020" +
"0000000000000000000000000000000000000000000000000000000000000000",
unpacked: []uint8{},
},
{
def: `[{"type": "uint256[]"}]`,
packed: "0000000000000000000000000000000000000000000000000000000000000020" +
"0000000000000000000000000000000000000000000000000000000000000000",
unpacked: []*big.Int{},
},
{
def: `[{"type": "uint8[2]"}]`,
packed: "0000000000000000000000000000000000000000000000000000000000000001" +
"0000000000000000000000000000000000000000000000000000000000000002",
unpacked: [2]uint8{1, 2},
},
{
def: `[{"type": "int8[2]"}]`,
packed: "0000000000000000000000000000000000000000000000000000000000000001" +
"0000000000000000000000000000000000000000000000000000000000000002",
unpacked: [2]int8{1, 2},
},
{
def: `[{"type": "int16[]"}]`,
packed: "0000000000000000000000000000000000000000000000000000000000000020" +
"0000000000000000000000000000000000000000000000000000000000000002" +
"0000000000000000000000000000000000000000000000000000000000000001" +
"0000000000000000000000000000000000000000000000000000000000000002",
unpacked: []int16{1, 2},
},
{
def: `[{"type": "int16[2]"}]`,
packed: "0000000000000000000000000000000000000000000000000000000000000001" +
"0000000000000000000000000000000000000000000000000000000000000002",
unpacked: [2]int16{1, 2},
},
{
def: `[{"type": "int32[]"}]`,
packed: "0000000000000000000000000000000000000000000000000000000000000020" +
"0000000000000000000000000000000000000000000000000000000000000002" +
"0000000000000000000000000000000000000000000000000000000000000001" +
"0000000000000000000000000000000000000000000000000000000000000002",
unpacked: []int32{1, 2},
},
{
def: `[{"type": "int32[2]"}]`,
packed: "0000000000000000000000000000000000000000000000000000000000000001" +
"0000000000000000000000000000000000000000000000000000000000000002",
unpacked: [2]int32{1, 2},
},
{
def: `[{"type": "int64[]"}]`,
packed: "0000000000000000000000000000000000000000000000000000000000000020" +
"0000000000000000000000000000000000000000000000000000000000000002" +
"0000000000000000000000000000000000000000000000000000000000000001" +
"0000000000000000000000000000000000000000000000000000000000000002",
unpacked: []int64{1, 2},
},
{
def: `[{"type": "int64[2]"}]`,
packed: "0000000000000000000000000000000000000000000000000000000000000001" +
"0000000000000000000000000000000000000000000000000000000000000002",
unpacked: [2]int64{1, 2},
},
{
def: `[{"type": "int256[]"}]`,
packed: "0000000000000000000000000000000000000000000000000000000000000020" +
"0000000000000000000000000000000000000000000000000000000000000002" +
"0000000000000000000000000000000000000000000000000000000000000001" +
"0000000000000000000000000000000000000000000000000000000000000002",
unpacked: []*big.Int{big.NewInt(1), big.NewInt(2)},
},
{
def: `[{"type": "int256[3]"}]`,
packed: "0000000000000000000000000000000000000000000000000000000000000001" +
"0000000000000000000000000000000000000000000000000000000000000002" +
"0000000000000000000000000000000000000000000000000000000000000003",
unpacked: [3]*big.Int{big.NewInt(1), big.NewInt(2), big.NewInt(3)},
},
// multi dimensional, if these pass, all types that don't require length prefix should pass
{
def: `[{"type": "uint8[][]"}]`,
packed: "0000000000000000000000000000000000000000000000000000000000000020" +
"0000000000000000000000000000000000000000000000000000000000000000",
unpacked: [][]uint8{},
},
{
def: `[{"type": "uint8[][]"}]`,
packed: "0000000000000000000000000000000000000000000000000000000000000020" +
"0000000000000000000000000000000000000000000000000000000000000002" +
"0000000000000000000000000000000000000000000000000000000000000040" +
"00000000000000000000000000000000000000000000000000000000000000a0" +
"0000000000000000000000000000000000000000000000000000000000000002" +
"0000000000000000000000000000000000000000000000000000000000000001" +
"0000000000000000000000000000000000000000000000000000000000000002" +
"0000000000000000000000000000000000000000000000000000000000000002" +
"0000000000000000000000000000000000000000000000000000000000000001" +
"0000000000000000000000000000000000000000000000000000000000000002",
unpacked: [][]uint8{{1, 2}, {1, 2}},
},
{
def: `[{"type": "uint8[][]"}]`,
packed: "0000000000000000000000000000000000000000000000000000000000000020" +
"0000000000000000000000000000000000000000000000000000000000000002" +
"0000000000000000000000000000000000000000000000000000000000000040" +
"00000000000000000000000000000000000000000000000000000000000000a0" +
"0000000000000000000000000000000000000000000000000000000000000002" +
"0000000000000000000000000000000000000000000000000000000000000001" +
"0000000000000000000000000000000000000000000000000000000000000002" +
"0000000000000000000000000000000000000000000000000000000000000003" +
"0000000000000000000000000000000000000000000000000000000000000001" +
"0000000000000000000000000000000000000000000000000000000000000002" +
"0000000000000000000000000000000000000000000000000000000000000003",
unpacked: [][]uint8{{1, 2}, {1, 2, 3}},
},
{
def: `[{"type": "uint8[2][2]"}]`,
packed: "0000000000000000000000000000000000000000000000000000000000000001" +
"0000000000000000000000000000000000000000000000000000000000000002" +
"0000000000000000000000000000000000000000000000000000000000000001" +
"0000000000000000000000000000000000000000000000000000000000000002",
unpacked: [2][2]uint8{{1, 2}, {1, 2}},
},
{
def: `[{"type": "uint8[][2]"}]`,
packed: "0000000000000000000000000000000000000000000000000000000000000020" +
"0000000000000000000000000000000000000000000000000000000000000040" +
"0000000000000000000000000000000000000000000000000000000000000060" +
"0000000000000000000000000000000000000000000000000000000000000000" +
"0000000000000000000000000000000000000000000000000000000000000000",
unpacked: [2][]uint8{{}, {}},
},
{
def: `[{"type": "uint8[][2]"}]`,
packed: "0000000000000000000000000000000000000000000000000000000000000020" +
"0000000000000000000000000000000000000000000000000000000000000040" +
"0000000000000000000000000000000000000000000000000000000000000080" +
"0000000000000000000000000000000000000000000000000000000000000001" +
"0000000000000000000000000000000000000000000000000000000000000001" +
"0000000000000000000000000000000000000000000000000000000000000001" +
"0000000000000000000000000000000000000000000000000000000000000001",
unpacked: [2][]uint8{{1}, {1}},
},
{
def: `[{"type": "uint8[2][]"}]`,
packed: "0000000000000000000000000000000000000000000000000000000000000020" +
"0000000000000000000000000000000000000000000000000000000000000000",
unpacked: [][2]uint8{},
},
{
def: `[{"type": "uint8[2][]"}]`,
packed: "0000000000000000000000000000000000000000000000000000000000000020" +
"0000000000000000000000000000000000000000000000000000000000000001" +
"0000000000000000000000000000000000000000000000000000000000000001" +
"0000000000000000000000000000000000000000000000000000000000000002",
unpacked: [][2]uint8{{1, 2}},
},
{
def: `[{"type": "uint8[2][]"}]`,
packed: "0000000000000000000000000000000000000000000000000000000000000020" +
"0000000000000000000000000000000000000000000000000000000000000002" +
"0000000000000000000000000000000000000000000000000000000000000001" +
"0000000000000000000000000000000000000000000000000000000000000002" +
"0000000000000000000000000000000000000000000000000000000000000001" +
"0000000000000000000000000000000000000000000000000000000000000002",
unpacked: [][2]uint8{{1, 2}, {1, 2}},
},
{
def: `[{"type": "uint16[]"}]`,
packed: "0000000000000000000000000000000000000000000000000000000000000020" +
"0000000000000000000000000000000000000000000000000000000000000002" +
"0000000000000000000000000000000000000000000000000000000000000001" +
"0000000000000000000000000000000000000000000000000000000000000002",
unpacked: []uint16{1, 2},
},
{
def: `[{"type": "uint16[2]"}]`,
packed: "0000000000000000000000000000000000000000000000000000000000000001" +
"0000000000000000000000000000000000000000000000000000000000000002",
unpacked: [2]uint16{1, 2},
},
{
def: `[{"type": "uint32[]"}]`,
packed: "0000000000000000000000000000000000000000000000000000000000000020" +
"0000000000000000000000000000000000000000000000000000000000000002" +
"0000000000000000000000000000000000000000000000000000000000000001" +
"0000000000000000000000000000000000000000000000000000000000000002",
unpacked: []uint32{1, 2},
},
{
def: `[{"type": "uint32[2][3][4]"}]`,
unpacked: [4][3][2]uint32{{{1, 2}, {3, 4}, {5, 6}}, {{7, 8}, {9, 10}, {11, 12}}, {{13, 14}, {15, 16}, {17, 18}}, {{19, 20}, {21, 22}, {23, 24}}},
packed: "0000000000000000000000000000000000000000000000000000000000000001" +
"0000000000000000000000000000000000000000000000000000000000000002" +
"0000000000000000000000000000000000000000000000000000000000000003" +
"0000000000000000000000000000000000000000000000000000000000000004" +
"0000000000000000000000000000000000000000000000000000000000000005" +
"0000000000000000000000000000000000000000000000000000000000000006" +
"0000000000000000000000000000000000000000000000000000000000000007" +
"0000000000000000000000000000000000000000000000000000000000000008" +
"0000000000000000000000000000000000000000000000000000000000000009" +
"000000000000000000000000000000000000000000000000000000000000000a" +
"000000000000000000000000000000000000000000000000000000000000000b" +
"000000000000000000000000000000000000000000000000000000000000000c" +
"000000000000000000000000000000000000000000000000000000000000000d" +
"000000000000000000000000000000000000000000000000000000000000000e" +
"000000000000000000000000000000000000000000000000000000000000000f" +
"0000000000000000000000000000000000000000000000000000000000000010" +
"0000000000000000000000000000000000000000000000000000000000000011" +
"0000000000000000000000000000000000000000000000000000000000000012" +
"0000000000000000000000000000000000000000000000000000000000000013" +
"0000000000000000000000000000000000000000000000000000000000000014" +
"0000000000000000000000000000000000000000000000000000000000000015" +
"0000000000000000000000000000000000000000000000000000000000000016" +
"0000000000000000000000000000000000000000000000000000000000000017" +
"0000000000000000000000000000000000000000000000000000000000000018",
},
{
def: `[{"type": "bytes32[]"}]`,
unpacked: []common.Hash{{1}, {2}},
packed: "0000000000000000000000000000000000000000000000000000000000000020" +
"0000000000000000000000000000000000000000000000000000000000000002" +
"0100000000000000000000000000000000000000000000000000000000000000" +
"0200000000000000000000000000000000000000000000000000000000000000",
},
{
def: `[{"type": "uint32[2]"}]`,
packed: "0000000000000000000000000000000000000000000000000000000000000001" +
"0000000000000000000000000000000000000000000000000000000000000002",
unpacked: [2]uint32{1, 2},
},
{
def: `[{"type": "uint64[]"}]`,
packed: "0000000000000000000000000000000000000000000000000000000000000020" +
"0000000000000000000000000000000000000000000000000000000000000002" +
"0000000000000000000000000000000000000000000000000000000000000001" +
"0000000000000000000000000000000000000000000000000000000000000002",
unpacked: []uint64{1, 2},
},
{
def: `[{"type": "uint64[2]"}]`,
packed: "0000000000000000000000000000000000000000000000000000000000000001" +
"0000000000000000000000000000000000000000000000000000000000000002",
unpacked: [2]uint64{1, 2},
},
{
def: `[{"type": "uint256[]"}]`,
packed: "0000000000000000000000000000000000000000000000000000000000000020" +
"0000000000000000000000000000000000000000000000000000000000000002" +
"0000000000000000000000000000000000000000000000000000000000000001" +
"0000000000000000000000000000000000000000000000000000000000000002",
unpacked: []*big.Int{big.NewInt(1), big.NewInt(2)},
},
{
def: `[{"type": "uint256[3]"}]`,
packed: "0000000000000000000000000000000000000000000000000000000000000001" +
"0000000000000000000000000000000000000000000000000000000000000002" +
"0000000000000000000000000000000000000000000000000000000000000003",
unpacked: [3]*big.Int{big.NewInt(1), big.NewInt(2), big.NewInt(3)},
},
{
def: `[{"type": "string[4]"}]`,
packed: "0000000000000000000000000000000000000000000000000000000000000020" +
"0000000000000000000000000000000000000000000000000000000000000080" +
"00000000000000000000000000000000000000000000000000000000000000c0" +
"0000000000000000000000000000000000000000000000000000000000000100" +
"0000000000000000000000000000000000000000000000000000000000000140" +
"0000000000000000000000000000000000000000000000000000000000000005" +
"48656c6c6f000000000000000000000000000000000000000000000000000000" +
"0000000000000000000000000000000000000000000000000000000000000005" +
"576f726c64000000000000000000000000000000000000000000000000000000" +
"000000000000000000000000000000000000000000000000000000000000000b" +
"476f2d657468657265756d000000000000000000000000000000000000000000" +
"0000000000000000000000000000000000000000000000000000000000000008" +
"457468657265756d000000000000000000000000000000000000000000000000",
unpacked: [4]string{"Hello", "World", "Go-ethereum", "Ethereum"},
},
{
def: `[{"type": "string[]"}]`,
packed: "0000000000000000000000000000000000000000000000000000000000000020" +
"0000000000000000000000000000000000000000000000000000000000000002" +
"0000000000000000000000000000000000000000000000000000000000000040" +
"0000000000000000000000000000000000000000000000000000000000000080" +
"0000000000000000000000000000000000000000000000000000000000000008" +
"457468657265756d000000000000000000000000000000000000000000000000" +
"000000000000000000000000000000000000000000000000000000000000000b" +
"676f2d657468657265756d000000000000000000000000000000000000000000",
unpacked: []string{"Ethereum", "go-ethereum"},
},
{
def: `[{"type": "bytes[]"}]`,
packed: "0000000000000000000000000000000000000000000000000000000000000020" +
"0000000000000000000000000000000000000000000000000000000000000002" +
"0000000000000000000000000000000000000000000000000000000000000040" +
"0000000000000000000000000000000000000000000000000000000000000080" +
"0000000000000000000000000000000000000000000000000000000000000003" +
"f0f0f00000000000000000000000000000000000000000000000000000000000" +
"0000000000000000000000000000000000000000000000000000000000000003" +
"f0f0f00000000000000000000000000000000000000000000000000000000000",
unpacked: [][]byte{{0xf0, 0xf0, 0xf0}, {0xf0, 0xf0, 0xf0}},
},
{
def: `[{"type": "uint256[2][][]"}]`,
packed: "0000000000000000000000000000000000000000000000000000000000000020" +
"0000000000000000000000000000000000000000000000000000000000000002" +
"0000000000000000000000000000000000000000000000000000000000000040" +
"00000000000000000000000000000000000000000000000000000000000000e0" +
"0000000000000000000000000000000000000000000000000000000000000002" +
"0000000000000000000000000000000000000000000000000000000000000001" +
"00000000000000000000000000000000000000000000000000000000000000c8" +
"0000000000000000000000000000000000000000000000000000000000000001" +
"00000000000000000000000000000000000000000000000000000000000003e8" +
"0000000000000000000000000000000000000000000000000000000000000002" +
"0000000000000000000000000000000000000000000000000000000000000001" +
"00000000000000000000000000000000000000000000000000000000000000c8" +
"0000000000000000000000000000000000000000000000000000000000000001" +
"00000000000000000000000000000000000000000000000000000000000003e8",
unpacked: [][][2]*big.Int{{{big.NewInt(1), big.NewInt(200)}, {big.NewInt(1), big.NewInt(1000)}}, {{big.NewInt(1), big.NewInt(200)}, {big.NewInt(1), big.NewInt(1000)}}},
},
// struct outputs
{
def: `[{"name":"int1","type":"int256"},{"name":"int2","type":"int256"}]`,
packed: "0000000000000000000000000000000000000000000000000000000000000001" +
"0000000000000000000000000000000000000000000000000000000000000002",
unpacked: struct {
Int1 *big.Int
Int2 *big.Int
}{big.NewInt(1), big.NewInt(2)},
},
{
def: `[{"name":"int_one","type":"int256"}]`,
packed: "0000000000000000000000000000000000000000000000000000000000000001",
unpacked: struct {
IntOne *big.Int
}{big.NewInt(1)},
},
{
def: `[{"name":"int__one","type":"int256"}]`,
packed: "0000000000000000000000000000000000000000000000000000000000000001",
unpacked: struct {
IntOne *big.Int
}{big.NewInt(1)},
},
{
def: `[{"name":"int_one_","type":"int256"}]`,
packed: "0000000000000000000000000000000000000000000000000000000000000001",
unpacked: struct {
IntOne *big.Int
}{big.NewInt(1)},
},
{
def: `[{"name":"int_one","type":"int256"}, {"name":"intone","type":"int256"}]`,
packed: "0000000000000000000000000000000000000000000000000000000000000001" +
"0000000000000000000000000000000000000000000000000000000000000002",
unpacked: struct {
IntOne *big.Int
Intone *big.Int
}{big.NewInt(1), big.NewInt(2)},
},
{
def: `[{"type": "string"}]`,
unpacked: "foobar",
packed: "0000000000000000000000000000000000000000000000000000000000000020" +
"0000000000000000000000000000000000000000000000000000000000000006" +
"666f6f6261720000000000000000000000000000000000000000000000000000",
},
{
def: `[{"type": "string[]"}]`,
unpacked: []string{"hello", "foobar"},
packed: "0000000000000000000000000000000000000000000000000000000000000020" +
"0000000000000000000000000000000000000000000000000000000000000002" + // len(array) = 2
"0000000000000000000000000000000000000000000000000000000000000040" + // offset 64 to i = 0
"0000000000000000000000000000000000000000000000000000000000000080" + // offset 128 to i = 1
"0000000000000000000000000000000000000000000000000000000000000005" + // len(str[0]) = 5
"68656c6c6f000000000000000000000000000000000000000000000000000000" + // str[0]
"0000000000000000000000000000000000000000000000000000000000000006" + // len(str[1]) = 6
"666f6f6261720000000000000000000000000000000000000000000000000000", // str[1]
},
{
def: `[{"type": "string[2]"}]`,
unpacked: [2]string{"hello", "foobar"},
packed: "0000000000000000000000000000000000000000000000000000000000000020" +
"0000000000000000000000000000000000000000000000000000000000000040" + // offset to i = 0
"0000000000000000000000000000000000000000000000000000000000000080" + // offset to i = 1
"0000000000000000000000000000000000000000000000000000000000000005" + // len(str[0]) = 5
"68656c6c6f000000000000000000000000000000000000000000000000000000" + // str[0]
"0000000000000000000000000000000000000000000000000000000000000006" + // len(str[1]) = 6
"666f6f6261720000000000000000000000000000000000000000000000000000", // str[1]
},
{
def: `[{"type": "bytes32[][]"}]`,
unpacked: [][][32]byte{{{1}, {2}}, {{3}, {4}, {5}}},
packed: "0000000000000000000000000000000000000000000000000000000000000020" +
"0000000000000000000000000000000000000000000000000000000000000002" + // len(array) = 2
"0000000000000000000000000000000000000000000000000000000000000040" + // offset 64 to i = 0
"00000000000000000000000000000000000000000000000000000000000000a0" + // offset 160 to i = 1
"0000000000000000000000000000000000000000000000000000000000000002" + // len(array[0]) = 2
"0100000000000000000000000000000000000000000000000000000000000000" + // array[0][0]
"0200000000000000000000000000000000000000000000000000000000000000" + // array[0][1]
"0000000000000000000000000000000000000000000000000000000000000003" + // len(array[1]) = 3
"0300000000000000000000000000000000000000000000000000000000000000" + // array[1][0]
"0400000000000000000000000000000000000000000000000000000000000000" + // array[1][1]
"0500000000000000000000000000000000000000000000000000000000000000", // array[1][2]
},
{
def: `[{"type": "bytes32[][2]"}]`,
unpacked: [2][][32]byte{{{1}, {2}}, {{3}, {4}, {5}}},
packed: "0000000000000000000000000000000000000000000000000000000000000020" +
"0000000000000000000000000000000000000000000000000000000000000040" + // offset 64 to i = 0
"00000000000000000000000000000000000000000000000000000000000000a0" + // offset 160 to i = 1
"0000000000000000000000000000000000000000000000000000000000000002" + // len(array[0]) = 2
"0100000000000000000000000000000000000000000000000000000000000000" + // array[0][0]
"0200000000000000000000000000000000000000000000000000000000000000" + // array[0][1]
"0000000000000000000000000000000000000000000000000000000000000003" + // len(array[1]) = 3
"0300000000000000000000000000000000000000000000000000000000000000" + // array[1][0]
"0400000000000000000000000000000000000000000000000000000000000000" + // array[1][1]
"0500000000000000000000000000000000000000000000000000000000000000", // array[1][2]
},
{
def: `[{"type": "bytes32[3][2]"}]`,
unpacked: [2][3][32]byte{{{1}, {2}, {3}}, {{3}, {4}, {5}}},
packed: "0100000000000000000000000000000000000000000000000000000000000000" + // array[0][0]
"0200000000000000000000000000000000000000000000000000000000000000" + // array[0][1]
"0300000000000000000000000000000000000000000000000000000000000000" + // array[0][2]
"0300000000000000000000000000000000000000000000000000000000000000" + // array[1][0]
"0400000000000000000000000000000000000000000000000000000000000000" + // array[1][1]
"0500000000000000000000000000000000000000000000000000000000000000", // array[1][2]
},
{
// static tuple
def: `[{"name":"a","type":"int64"},
{"name":"b","type":"int256"},
{"name":"c","type":"int256"},
{"name":"d","type":"bool"},
{"name":"e","type":"bytes32[3][2]"}]`,
unpacked: struct {
A int64
B *big.Int
C *big.Int
D bool
E [2][3][32]byte
}{1, big.NewInt(1), big.NewInt(-1), true, [2][3][32]byte{{{1}, {2}, {3}}, {{3}, {4}, {5}}}},
packed: "0000000000000000000000000000000000000000000000000000000000000001" + // struct[a]
"0000000000000000000000000000000000000000000000000000000000000001" + // struct[b]
"ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff" + // struct[c]
"0000000000000000000000000000000000000000000000000000000000000001" + // struct[d]
"0100000000000000000000000000000000000000000000000000000000000000" + // struct[e] array[0][0]
"0200000000000000000000000000000000000000000000000000000000000000" + // struct[e] array[0][1]
"0300000000000000000000000000000000000000000000000000000000000000" + // struct[e] array[0][2]
"0300000000000000000000000000000000000000000000000000000000000000" + // struct[e] array[1][0]
"0400000000000000000000000000000000000000000000000000000000000000" + // struct[e] array[1][1]
"0500000000000000000000000000000000000000000000000000000000000000", // struct[e] array[1][2]
},
{
def: `[{"name":"a","type":"string"},
{"name":"b","type":"int64"},
{"name":"c","type":"bytes"},
{"name":"d","type":"string[]"},
{"name":"e","type":"int256[]"},
{"name":"f","type":"address[]"}]`,
unpacked: struct {
FieldA string `abi:"a"` // Test whether abi tag works
FieldB int64 `abi:"b"`
C []byte
D []string
E []*big.Int
F []common.Address
}{"foobar", 1, []byte{1}, []string{"foo", "bar"}, []*big.Int{big.NewInt(1), big.NewInt(-1)}, []common.Address{{1}, {2}}},
packed: "00000000000000000000000000000000000000000000000000000000000000c0" + // struct[a] offset
"0000000000000000000000000000000000000000000000000000000000000001" + // struct[b]
"0000000000000000000000000000000000000000000000000000000000000100" + // struct[c] offset
"0000000000000000000000000000000000000000000000000000000000000140" + // struct[d] offset
"0000000000000000000000000000000000000000000000000000000000000220" + // struct[e] offset
"0000000000000000000000000000000000000000000000000000000000000280" + // struct[f] offset
"0000000000000000000000000000000000000000000000000000000000000006" + // struct[a] length
"666f6f6261720000000000000000000000000000000000000000000000000000" + // struct[a] "foobar"
"0000000000000000000000000000000000000000000000000000000000000001" + // struct[c] length
"0100000000000000000000000000000000000000000000000000000000000000" + // []byte{1}
"0000000000000000000000000000000000000000000000000000000000000002" + // struct[d] length
"0000000000000000000000000000000000000000000000000000000000000040" + // foo offset
"0000000000000000000000000000000000000000000000000000000000000080" + // bar offset
"0000000000000000000000000000000000000000000000000000000000000003" + // foo length
"666f6f0000000000000000000000000000000000000000000000000000000000" + // foo
"0000000000000000000000000000000000000000000000000000000000000003" + // bar offset
"6261720000000000000000000000000000000000000000000000000000000000" + // bar
"0000000000000000000000000000000000000000000000000000000000000002" + // struct[e] length
"0000000000000000000000000000000000000000000000000000000000000001" + // 1
"ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff" + // -1
"0000000000000000000000000000000000000000000000000000000000000002" + // struct[f] length
"0000000000000000000000000100000000000000000000000000000000000000" + // common.Address{1}
"0000000000000000000000000200000000000000000000000000000000000000", // common.Address{2}
},
{
def: `[{"components": [{"name": "a","type": "uint256"},
{"name": "b","type": "uint256[]"}],
"name": "a","type": "tuple"},
{"name": "b","type": "uint256[]"}]`,
unpacked: struct {
A struct {
FieldA *big.Int `abi:"a"`
B []*big.Int
}
B []*big.Int
}{
A: struct {
FieldA *big.Int `abi:"a"` // Test whether abi tag works for nested tuple
B []*big.Int
}{big.NewInt(1), []*big.Int{big.NewInt(1), big.NewInt(2)}},
B: []*big.Int{big.NewInt(1), big.NewInt(2)}},
packed: "0000000000000000000000000000000000000000000000000000000000000040" + // a offset
"00000000000000000000000000000000000000000000000000000000000000e0" + // b offset
"0000000000000000000000000000000000000000000000000000000000000001" + // a.a value
"0000000000000000000000000000000000000000000000000000000000000040" + // a.b offset
"0000000000000000000000000000000000000000000000000000000000000002" + // a.b length
"0000000000000000000000000000000000000000000000000000000000000001" + // a.b[0] value
"0000000000000000000000000000000000000000000000000000000000000002" + // a.b[1] value
"0000000000000000000000000000000000000000000000000000000000000002" + // b length
"0000000000000000000000000000000000000000000000000000000000000001" + // b[0] value
"0000000000000000000000000000000000000000000000000000000000000002", // b[1] value
},
{
def: `[{"components": [{"name": "a","type": "int256"},
{"name": "b","type": "int256[]"}],
"name": "a","type": "tuple[]"}]`,
unpacked: []struct {
A *big.Int
B []*big.Int
}{
{big.NewInt(-1), []*big.Int{big.NewInt(1), big.NewInt(3)}},
{big.NewInt(1), []*big.Int{big.NewInt(2), big.NewInt(-1)}},
},
packed: "0000000000000000000000000000000000000000000000000000000000000020" +
"0000000000000000000000000000000000000000000000000000000000000002" + // tuple length
"0000000000000000000000000000000000000000000000000000000000000040" + // tuple[0] offset
"00000000000000000000000000000000000000000000000000000000000000e0" + // tuple[1] offset
"ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff" + // tuple[0].A
"0000000000000000000000000000000000000000000000000000000000000040" + // tuple[0].B offset
"0000000000000000000000000000000000000000000000000000000000000002" + // tuple[0].B length
"0000000000000000000000000000000000000000000000000000000000000001" + // tuple[0].B[0] value
"0000000000000000000000000000000000000000000000000000000000000003" + // tuple[0].B[1] value
"0000000000000000000000000000000000000000000000000000000000000001" + // tuple[1].A
"0000000000000000000000000000000000000000000000000000000000000040" + // tuple[1].B offset
"0000000000000000000000000000000000000000000000000000000000000002" + // tuple[1].B length
"0000000000000000000000000000000000000000000000000000000000000002" + // tuple[1].B[0] value
"ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff", // tuple[1].B[1] value
},
{
def: `[{"components": [{"name": "a","type": "int256"},
{"name": "b","type": "int256"}],
"name": "a","type": "tuple[2]"}]`,
unpacked: [2]struct {
A *big.Int
B *big.Int
}{
{big.NewInt(-1), big.NewInt(1)},
{big.NewInt(1), big.NewInt(-1)},
},
packed: "ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff" + // tuple[0].a
"0000000000000000000000000000000000000000000000000000000000000001" + // tuple[0].b
"0000000000000000000000000000000000000000000000000000000000000001" + // tuple[1].a
"ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff", // tuple[1].b
},
{
def: `[{"components": [{"name": "a","type": "int256[]"}],
"name": "a","type": "tuple[2]"}]`,
unpacked: [2]struct {
A []*big.Int
}{
{[]*big.Int{big.NewInt(-1), big.NewInt(1)}},
{[]*big.Int{big.NewInt(1), big.NewInt(-1)}},
},
packed: "0000000000000000000000000000000000000000000000000000000000000020" +
"0000000000000000000000000000000000000000000000000000000000000040" + // tuple[0] offset
"00000000000000000000000000000000000000000000000000000000000000c0" + // tuple[1] offset
"0000000000000000000000000000000000000000000000000000000000000020" + // tuple[0].A offset
"0000000000000000000000000000000000000000000000000000000000000002" + // tuple[0].A length
"ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff" + // tuple[0].A[0]
"0000000000000000000000000000000000000000000000000000000000000001" + // tuple[0].A[1]
"0000000000000000000000000000000000000000000000000000000000000020" + // tuple[1].A offset
"0000000000000000000000000000000000000000000000000000000000000002" + // tuple[1].A length
"0000000000000000000000000000000000000000000000000000000000000001" + // tuple[1].A[0]
"ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff", // tuple[1].A[1]
},
}
| matthieu/go-ethereum | accounts/abi/packing_test.go | GO | lgpl-3.0 | 44,516 |
package co.edu.unal.sistemasinteligentes.ajedrez.agentes;
import co.edu.unal.sistemasinteligentes.ajedrez.base.*;
import co.edu.unal.sistemasinteligentes.ajedrez.reversi.Tablero;
import co.edu.unal.sistemasinteligentes.ajedrez.reversi.Reversi.EstadoReversi;
import java.io.PrintStream;
/**
* Created by jiacontrerasp on 3/30/15.
*/
public class AgenteHeuristicoBasico extends _AgenteHeuristico {
private Jugador jugador;
private PrintStream output = null;
private int niveles;
/**
* Constructor de AgenteHeuristico1
* @param niveles: niveles de recursión
*/
public AgenteHeuristicoBasico(int niveles)
{
super();
this.niveles = niveles;
}
public AgenteHeuristicoBasico(int niveles, PrintStream output)
{
super();
this.niveles = niveles;
this.output = output;
}
@Override public Jugador jugador() {
return jugador;
}
@Override public void comienzo(Jugador jugador, Estado estado) {
this.jugador = jugador;
}
@Override public void fin(Estado estado) {
// No hay implementación.
}
@Override public void movimiento(Movimiento movimiento, Estado estado) {
if(output != null){
output.println(String.format("Jugador %s mueve %s.", movimiento.jugador(), movimiento));
printEstado(estado);
}
}
protected void printEstado(Estado estado) {
if(output != null){
output.println("\t"+ estado.toString().replace("\n", "\n\t"));
}
}
@Override public String toString() {
return String.format("Agente Heuristico Basico " + jugador.toString());
}
@Override
public double darHeuristica(Estado estado) {
char miFicha = (jugador().toString() == "JugadorNegras" ? 'N' :'B');
char fichaContrario = (jugador().toString() == "JugadorNegras" ? 'B' :'N');
Tablero tablero = ((EstadoReversi)(estado)).getTablero();
int misFichas = tablero.cantidadFichas(miFicha);
int fichasContrario = tablero.cantidadFichas(fichaContrario);
return misFichas - fichasContrario;
}
@Override
public int niveles() {
return niveles;
}
@Override
public double maximoValorHeuristica() {
return 18;
}
}
| UNColombia/bog-2025995-2-2015-01 | elCinco/MinMax/src/co/edu/unal/sistemasinteligentes/ajedrez/agentes/AgenteHeuristicoBasico.java | Java | lgpl-3.0 | 2,312 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.