• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C++ G_OBJECT_CLASS_NAME函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中G_OBJECT_CLASS_NAME函数的典型用法代码示例。如果您正苦于以下问题:C++ G_OBJECT_CLASS_NAME函数的具体用法?C++ G_OBJECT_CLASS_NAME怎么用?C++ G_OBJECT_CLASS_NAME使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了G_OBJECT_CLASS_NAME函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: __initialize_statement_delete_query_parameters

static void
__initialize_statement_delete_query_parameters (MidgardDBObjectClass *klass, const gchar *query_string, gboolean add_workspace)
{
	GdaSqlParser *parser = gda_sql_parser_new ();
	GdaStatement *stmt;
	GError *error = NULL;
	stmt = gda_sql_parser_parse_string (parser, query_string, NULL, &error);

	if (!stmt) {
		g_error ("Couldn't create %s class DELETE(UPDATE) prepared statement. %s", 
				G_OBJECT_CLASS_NAME (klass), error && error->message ? error->message : "Unknown reason");
		return;
	}

	GdaSet *params; 
	if (!gda_statement_get_parameters (stmt, &params, &error)) {
		g_error ("Failed to create DELETE(UPDATE) GdaSet for %s class. %s", 
				G_OBJECT_CLASS_NAME (klass), error && error->message ? error->message : "Unknown reason");
	}
	
	if (add_workspace) {
		klass->dbpriv->_workspace_statement_delete = stmt;
		klass->dbpriv->_workspace_statement_delete_params = params;
		return;
	}
	
	klass->dbpriv->_statement_delete = stmt;
	klass->dbpriv->_statement_delete_params = params;

	return;
}
开发者ID:William-Wai,项目名称:midgard-core,代码行数:31,代码来源:midgard_dbobject.c


示例2: midgard_test_object_tree_basic

void midgard_test_object_tree_basic(MidgardObjectTest *mot, gconstpointer data)
{
	g_assert(mot != NULL);
	MidgardObject *object = MIDGARD_OBJECT(mot->object);
	MidgardObjectClass *klass = MIDGARD_OBJECT_GET_CLASS(object);

	/* Get parent (in tree) class and check if parent has the same child declared */
	const gchar *pname = midgard_schema_object_tree_get_parent_name (object);
	
	if (!pname)
		return;

	MidgardObjectClass *pklass = MIDGARD_OBJECT_GET_CLASS_BY_NAME(pname);
	g_assert(pklass != NULL);

	/* There is tree parent declared so parent property can not be NULL */
	const gchar *parent_property = midgard_reflector_object_get_property_parent (G_OBJECT_CLASS_NAME (klass));
	g_assert(parent_property != NULL);

	guint n_child;
	gchar **children = midgard_reflector_object_list_children (G_OBJECT_CLASS_NAME (pklass), &n_child);
	g_assert(children != NULL);

	guint i = 0;
	gboolean has_child_class = FALSE;
	
	for (i = 0; i < n_child; i++) {
		if (g_type_from_name (children[i]) == G_OBJECT_CLASS_TYPE(klass))
			has_child_class = TRUE;
	}

	g_free(children);
	g_assert(has_child_class != FALSE);
}
开发者ID:William-Wai,项目名称:midgard-core,代码行数:34,代码来源:midgard_test_object_tree.c


示例3: xfdashboard_actor_install_stylable_property

/* Register stylable property of a class */
void xfdashboard_actor_install_stylable_property(XfdashboardActorClass *klass, GParamSpec *inParamSpec)
{
	GParamSpec		*stylableParamSpec;

	g_return_if_fail(XFDASHBOARD_IS_ACTOR_CLASS(klass));
	g_return_if_fail(G_IS_PARAM_SPEC(inParamSpec));
	g_return_if_fail(inParamSpec->flags & G_PARAM_WRITABLE);
	g_return_if_fail(!(inParamSpec->flags & G_PARAM_CONSTRUCT_ONLY));

	/* Check if param-spec is already registered */
	if(g_param_spec_pool_lookup(_xfdashboard_actor_stylable_properties_pool, g_param_spec_get_name(inParamSpec), G_OBJECT_CLASS_TYPE(klass), FALSE))
	{
		g_warning("Class '%s' already contains a stylable property '%s'",
					G_OBJECT_CLASS_NAME(klass),
					g_param_spec_get_name(inParamSpec));
		return;
	}

	/* Add param-spec to pool of themable properties */
	stylableParamSpec=g_param_spec_internal(G_PARAM_SPEC_TYPE(inParamSpec),
												g_param_spec_get_name(inParamSpec),
												NULL,
												NULL,
												0);
	g_param_spec_set_qdata_full(stylableParamSpec,
									XFDASHBOARD_ACTOR_PARAM_SPEC_REF,
									g_param_spec_ref(inParamSpec),
									(GDestroyNotify)g_param_spec_unref);
	g_param_spec_pool_insert(_xfdashboard_actor_stylable_properties_pool, stylableParamSpec, G_OBJECT_CLASS_TYPE(klass));
	XFDASHBOARD_DEBUG(NULL, STYLE,
						"Registered stylable property '%s' for class '%s'",
						g_param_spec_get_name(inParamSpec), G_OBJECT_CLASS_NAME(klass));
}
开发者ID:gmc-holle,项目名称:xfdashboard,代码行数:34,代码来源:actor.c


示例4: draw_image

/*!
 * \brief Draw image
 *
 * Not optional on the PyDia side. If not implemented a runtime warning 
 * will be generated when called.
 *
 * \memberof _DiaPyRenderer
 */
static void
draw_image(DiaRenderer *renderer,
	   Point *point,
	   real width, real height,
	   DiaImage *image)
{
  PyObject *func, *res, *arg, *self = PYDIA_RENDERER (renderer);

  func = PyObject_GetAttrString (self, "draw_image");
  if (func && PyCallable_Check(func)) {
    PyObject *opoint = PyDiaPoint_New (point);
    PyObject *oimage = PyDiaImage_New (image);

    Py_INCREF(self);
    Py_INCREF(func);
    arg = Py_BuildValue ("(OddO)", opoint, width, height, oimage);
    if (arg) {
      res = PyEval_CallObject (func, arg);
      ON_RES(res, FALSE);
    }
    Py_XDECREF (arg);
    Py_XDECREF (opoint);
    Py_XDECREF (oimage);
    Py_DECREF(func);
    Py_DECREF(self);
  } else { /* member not optional */
    gchar *msg = g_strdup_printf ("%s.draw_image() implmentation missing.",
				  G_OBJECT_CLASS_NAME (G_OBJECT_GET_CLASS (renderer)));
    PyErr_Clear();
    PyErr_Warn (PyExc_RuntimeWarning, msg);
    g_free (msg);
  }
}
开发者ID:AmiGanguli,项目名称:dia,代码行数:41,代码来源:pydia-render.c


示例5: attach

static void
attach (GeglOperation *self)
{
  g_warning ("kilroy was at What The Hack (%p, %s)\n", (void *) self,
             G_OBJECT_CLASS_NAME (G_OBJECT_GET_CLASS (self)));
  return;
}
开发者ID:AjayRamanathan,项目名称:gegl,代码行数:7,代码来源:gegl-operation.c


示例6: draw_line

/*!
 * \brief Draw line
 *
 * Not optional on the PyDia side. If not implemented a runtime warning 
 * will be generated when called.
 *
 * \memberof _DiaPyRenderer
 */
static void
draw_line(DiaRenderer *renderer, 
          Point *start, Point *end, 
          Color *line_colour)
{
  PyObject *func, *res, *arg, *self = PYDIA_RENDERER (renderer);

  func = PyObject_GetAttrString (self, "draw_line");
  if (func && PyCallable_Check(func)) {
    PyObject *ostart = PyDiaPoint_New (start);
    PyObject *oend = PyDiaPoint_New (end);
    PyObject *ocolor = PyDiaColor_New (line_colour);

    Py_INCREF(self);
    Py_INCREF(func);
    arg = Py_BuildValue ("(OOO)", ostart, oend, ocolor);
    if (arg) {
      res = PyEval_CallObject (func, arg);
      ON_RES(res, FALSE);
    }
    Py_XDECREF (arg);
    Py_XDECREF (ostart);
    Py_XDECREF (oend);
    Py_XDECREF (ocolor);
    Py_DECREF(func);
    Py_DECREF(self);
  }
  else { /* member not optional */
    gchar *msg = g_strdup_printf ("%s.draw_line() implmentation missing.",
				  G_OBJECT_CLASS_NAME (G_OBJECT_GET_CLASS (renderer)));
    PyErr_Clear();
    PyErr_Warn (PyExc_RuntimeWarning, msg);
    g_free (msg);
  }
}
开发者ID:AmiGanguli,项目名称:dia,代码行数:43,代码来源:pydia-render.c


示例7: browser_perspective_uncustomize

/**
 * browser_perspective_uncustomize:
 * @perspective: an object implementing the #BrowserPerspective interface
 *
 * Remove any optional custom UI elements  which have been added
 * when browser_perspective_customize() was called.
 */
void
browser_perspective_uncustomize (BrowserPerspective *perspective)
{
	g_return_if_fail (IS_BROWSER_PERSPECTIVE (perspective));

	/* Current BrowserPage */
	GtkNotebook *nb;
	nb = (GtkNotebook*) browser_perspective_get_notebook (perspective);
	if (nb) {
		gint current_index;
		current_index = gtk_notebook_get_current_page (nb);
		if (current_index >= 0) {
			GtkWidget *current_page;
			current_page = gtk_notebook_get_nth_page (nb, current_index);
			if (current_page && IS_BROWSER_PAGE (current_page))
				browser_page_uncustomize (BROWSER_PAGE (current_page));
		}
	}

	if (BROWSER_PERSPECTIVE_GET_CLASS (perspective)->i_uncustomize)
		(BROWSER_PERSPECTIVE_GET_CLASS (perspective)->i_uncustomize) (perspective);
	else {
		g_print ("Default browser_perspective_uncustomize for %s\n",
			 G_OBJECT_CLASS_NAME (G_OBJECT_GET_CLASS (perspective)));
		if (customization_data_exists (G_OBJECT (perspective)))
			customization_data_release (G_OBJECT (perspective));
	}
}
开发者ID:arthurnn,项目名称:libgda,代码行数:35,代码来源:browser-perspective.c


示例8: ges_timeline_element_set_inpoint

/**
 * ges_timeline_element_set_inpoint:
 * @self: a #GESTimelineElement
 * @inpoint: the in-point in #GstClockTime
 *
 * Set the in-point, that is the moment at which the @self will start
 * outputting data from its contents.
 */
void
ges_timeline_element_set_inpoint (GESTimelineElement * self,
    GstClockTime inpoint)
{
  GESTimelineElementClass *klass;

  g_return_if_fail (GES_IS_TIMELINE_ELEMENT (self));

  GST_DEBUG_OBJECT (self, "current inpoint: %" GST_TIME_FORMAT
      " new inpoint: %" GST_TIME_FORMAT, GST_TIME_ARGS (inpoint),
      GST_TIME_ARGS (GES_TIMELINE_ELEMENT_INPOINT (self)));

  klass = GES_TIMELINE_ELEMENT_GET_CLASS (self);

  if (klass->set_inpoint) {
    if (klass->set_inpoint (self, inpoint)) {
      self->inpoint = inpoint;
      g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_INPOINT]);
    }

    return;
  }

  GST_WARNING_OBJECT (self, "No set_inpoint virtual method implementation"
      " on class %s. Can not set inpoint %" GST_TIME_FORMAT,
      G_OBJECT_CLASS_NAME (klass), GST_TIME_ARGS (inpoint));
}
开发者ID:pitivi,项目名称:gst-editing-services,代码行数:35,代码来源:ges-timeline-element.c


示例9: ges_timeline_element_set_duration

/**
 * ges_timeline_element_set_duration:
 * @self: a #GESTimelineElement
 * @duration: the duration in #GstClockTime
 *
 * Set the duration of the object
 *
 * Note that if the timeline snap-distance property of the timeline containing
 * @self is set, @self will properly snap to its neighboors.
 */
void
ges_timeline_element_set_duration (GESTimelineElement * self,
    GstClockTime duration)
{
  GESTimelineElementClass *klass;

  g_return_if_fail (GES_IS_TIMELINE_ELEMENT (self));

  klass = GES_TIMELINE_ELEMENT_GET_CLASS (self);

  GST_DEBUG_OBJECT (self, "current duration: %" GST_TIME_FORMAT
      " new duration: %" GST_TIME_FORMAT,
      GST_TIME_ARGS (GES_TIMELINE_ELEMENT_DURATION (self)),
      GST_TIME_ARGS (duration));

  if (klass->set_duration) {
    if (klass->set_duration (self, duration)) {
      self->duration = duration;
      g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_DURATION]);
    }

    return;
  }

  GST_WARNING_OBJECT (self, "No set_duration virtual method implementation"
      " on class %s. Can not set duration %" GST_TIME_FORMAT,
      G_OBJECT_CLASS_NAME (klass), GST_TIME_ARGS (duration));
}
开发者ID:pitivi,项目名称:gst-editing-services,代码行数:38,代码来源:ges-timeline-element.c


示例10: json_op_class_init

static void
json_op_class_init (gpointer klass, gpointer class_data)
{
  GObjectClass *object_class = G_OBJECT_CLASS (klass);
  GeglOperationClass *operation_class = GEGL_OPERATION_CLASS (klass);
  JsonOpClass *json_op_class = (JsonOpClass *) (klass);
  const gchar *description;
  gchar *name;

  json_op_class->json_root = (JsonObject *) (class_data);

  object_class->set_property = set_property;
  object_class->get_property = get_property;
  object_class->constructor  = constructor;
  object_class->finalize = finalize;

  operation_class->attach = attach;

  json_op_class->properties = g_hash_table_new_full(g_direct_hash, g_direct_equal,
                                                    NULL, (GDestroyNotify)property_target_free);
  install_properties(json_op_class);

  description = metadata_get_property(json_op_class->json_root, "description");
  name = component2geglop(metadata_get_property(json_op_class->json_root, "name"));

  gegl_operation_class_set_keys (operation_class,
    "name",        (name) ? name : g_strdup_printf("json:%s", G_OBJECT_CLASS_NAME(object_class)),
    "categories",  "meta:json",
    "description",  (description) ? description : "",
    NULL);

  g_free(name);
}
开发者ID:GNOME,项目名称:gegl,代码行数:33,代码来源:json.c


示例11: _expandable_is_expanded

static gboolean
_expandable_is_expanded(gconstpointer self)
{
  g_error("Bad implementation of expandable->is_expanded() in '%s' class.",
          G_OBJECT_CLASS_NAME(self));

  return FALSE;
}
开发者ID:jc0n,项目名称:coil,代码行数:8,代码来源:expandable.c


示例12: _expandable_build_string

static void
_expandable_build_string(gconstpointer     self,
                         GString          *buffer,
                         CoilStringFormat *format,
                         GError          **error)
{
  g_error("Bad implementation of expandable->build_string() in '%s' class.",
          G_OBJECT_CLASS_NAME(self));
}
开发者ID:jc0n,项目名称:coil,代码行数:9,代码来源:expandable.c


示例13: gst_tag_mux_init

static void
gst_tag_mux_init (GstTagMux * mux, GstTagMuxClass * mux_class)
{
  GstElementClass *element_klass = GST_ELEMENT_CLASS (mux_class);
  GstPadTemplate *tmpl;

  mux->priv =
      G_TYPE_INSTANCE_GET_PRIVATE (mux, GST_TYPE_TAG_MUX, GstTagMuxPrivate);

  /* pad through which data comes in to the element */
  tmpl = gst_element_class_get_pad_template (element_klass, "sink");
  if (tmpl) {
    mux->priv->sinkpad = gst_pad_new_from_template (tmpl, "sink");
  } else {
    g_warning ("GstTagMux subclass '%s' did not install a %s pad template!\n",
        G_OBJECT_CLASS_NAME (element_klass), "sink");
    mux->priv->sinkpad = gst_pad_new ("sink", GST_PAD_SINK);
  }
  gst_pad_set_chain_function (mux->priv->sinkpad,
      GST_DEBUG_FUNCPTR (gst_tag_mux_chain));
  gst_pad_set_event_function (mux->priv->sinkpad,
      GST_DEBUG_FUNCPTR (gst_tag_mux_sink_event));
  gst_element_add_pad (GST_ELEMENT (mux), mux->priv->sinkpad);

  /* pad through which data goes out of the element */
  tmpl = gst_element_class_get_pad_template (element_klass, "src");
  if (tmpl) {
    GstCaps *tmpl_caps = gst_pad_template_get_caps (tmpl);

    mux->priv->srcpad = gst_pad_new_from_template (tmpl, "src");
    gst_pad_use_fixed_caps (mux->priv->srcpad);
    if (tmpl_caps != NULL && gst_caps_is_fixed (tmpl_caps)) {
      gst_pad_set_caps (mux->priv->srcpad, tmpl_caps);
    }
  } else {
    g_warning ("GstTagMux subclass '%s' did not install a %s pad template!\n",
        G_OBJECT_CLASS_NAME (element_klass), "source");
    mux->priv->srcpad = gst_pad_new ("src", GST_PAD_SRC);
  }
  gst_element_add_pad (GST_ELEMENT (mux), mux->priv->srcpad);

  mux->priv->render_start_tag = TRUE;
  mux->priv->render_end_tag = TRUE;
}
开发者ID:lubing521,项目名称:gst-embedded-builder,代码行数:44,代码来源:gsttagmux.c


示例14: switch

bool ofxGstRTPServer::on_message(GstMessage * msg){
	// read messages from the pipeline like dropped packages
	switch (GST_MESSAGE_TYPE (msg)) {
	case GST_MESSAGE_ELEMENT:{
		GstObject * messageSrc = GST_MESSAGE_SRC(msg);
		ofLogVerbose(LOG_NAME) << "Got " << GST_MESSAGE_TYPE_NAME(msg) << " message from " << GST_MESSAGE_SRC_NAME(msg);
		ofLogVerbose(LOG_NAME) << "Message source type: " << G_OBJECT_CLASS_NAME(G_OBJECT_GET_CLASS(messageSrc));
		ofLogVerbose(LOG_NAME) << "With structure name: " << gst_structure_get_name(gst_message_get_structure(msg));
		ofLogVerbose(LOG_NAME) << gst_structure_to_string(gst_message_get_structure(msg));
		return true;
	}
	case GST_MESSAGE_QOS:{
		GstObject * messageSrc = GST_MESSAGE_SRC(msg);
		ofLogVerbose(LOG_NAME) << "Got " << GST_MESSAGE_TYPE_NAME(msg) << " message from " << GST_MESSAGE_SRC_NAME(msg);
		ofLogVerbose(LOG_NAME) << "Message source type: " << G_OBJECT_CLASS_NAME(G_OBJECT_GET_CLASS(messageSrc));

		GstFormat format;
		guint64 processed;
		guint64 dropped;
		gst_message_parse_qos_stats(msg,&format,&processed,&dropped);
		ofLogVerbose(LOG_NAME) << "format " << gst_format_get_name(format) << " processed " << processed << " dropped " << dropped;

		gint64 jitter;
		gdouble proportion;
		gint quality;
		gst_message_parse_qos_values(msg,&jitter,&proportion,&quality);
		ofLogVerbose(LOG_NAME) << "jitter " << jitter << " proportion " << proportion << " quality " << quality;

		gboolean live;
		guint64 running_time;
		guint64 stream_time;
		guint64 timestamp;
		guint64 duration;
		gst_message_parse_qos(msg,&live,&running_time,&stream_time,&timestamp,&duration);
		ofLogVerbose(LOG_NAME) << "live stream " << live << " runninng_time " << running_time << " stream_time " << stream_time << " timestamp " << timestamp << " duration " << duration;

		return true;
	}
	default:
		//ofLogVerbose(LOG_NAME) << "Got " << GST_MESSAGE_TYPE_NAME(msg) << " message from " << GST_MESSAGE_SRC_NAME(msg);
		return false;
	}
}
开发者ID:anchowee,项目名称:ofxGstRTP,代码行数:43,代码来源:ofxGstRTPServer.cpp


示例15: _expandable_equals

static gint
_expandable_equals(gconstpointer self,
                   gconstpointer other,
                   GError     **error)
{
  g_error("Bad implementation of expandable->equals() in '%s' class.",
          G_OBJECT_CLASS_NAME(self));

  return 0;
}
开发者ID:jc0n,项目名称:coil,代码行数:10,代码来源:expandable.c


示例16: _expandable_expand

static gboolean
_expandable_expand(gconstpointer  self,
                   const GValue **return_value,
                   GError       **error)
{
  g_error("Bad implementation of expandable->expand() in '%s' class.",
          G_OBJECT_CLASS_NAME(self));

  return FALSE;
}
开发者ID:jc0n,项目名称:coil,代码行数:10,代码来源:expandable.c


示例17: get_bounding_box

static GeglRectangle
get_bounding_box (GeglOperation *self)
{
  GeglRectangle result = { 0, 0, 0, 0 };

  g_warning ("Gegl Source '%s' does not override %s()",
             G_OBJECT_CLASS_NAME (G_OBJECT_GET_CLASS (self)),
             G_STRFUNC);

  return result;
}
开发者ID:AjayRamanathan,项目名称:gegl,代码行数:11,代码来源:gegl-operation-source.c


示例18: kms_ice_base_agent_run_agent_default

static void
kms_ice_base_agent_run_agent_default (KmsIceBaseAgent * self)
{
  KmsIceBaseAgentClass *klass =
      KMS_ICE_BASE_AGENT_CLASS (G_OBJECT_GET_CLASS (self));

  if (klass->run_agent == kms_ice_base_agent_run_agent_default) {
    GST_WARNING_OBJECT (self,
        "%s does not reimplement 'run_agent'", G_OBJECT_CLASS_NAME (klass));
  }
}
开发者ID:s-silva,项目名称:kms-elements,代码行数:11,代码来源:kmsicebaseagent.c


示例19: _expandable_copy

static CoilExpandable *
_expandable_copy(gconstpointer      self,
                 const gchar       *first_property_name,
                 va_list            properties,
                 GError           **error)
{
  g_error("Bad implementation of expandable->copy() in '%s' class.",
          G_OBJECT_CLASS_NAME(self));

  return NULL;
}
开发者ID:jc0n,项目名称:coil,代码行数:11,代码来源:expandable.c


示例20: Tell

    arrow::Status Tell(int64_t *position) const override {
      if (!G_IS_SEEKABLE(output_stream_)) {
        std::string message("[gio-output-stream][tell] "
                            "not seekable output stream: <");
        message += G_OBJECT_CLASS_NAME(G_OBJECT_GET_CLASS(output_stream_));
        message += ">";
        return arrow::Status::NotImplemented(message);
      }

      *position = g_seekable_tell(G_SEEKABLE(output_stream_));
      return arrow::Status::OK();
    }
开发者ID:CodingCat,项目名称:arrow,代码行数:12,代码来源:output-stream.cpp



注:本文中的G_OBJECT_CLASS_NAME函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ G_OBJECT_TYPE函数代码示例发布时间:2022-05-30
下一篇:
C++ G_OBJECT函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap