本文整理汇总了C++中LIBRDF_ASSERT_OBJECT_POINTER_RETURN_VALUE函数的典型用法代码示例。如果您正苦于以下问题:C++ LIBRDF_ASSERT_OBJECT_POINTER_RETURN_VALUE函数的具体用法?C++ LIBRDF_ASSERT_OBJECT_POINTER_RETURN_VALUE怎么用?C++ LIBRDF_ASSERT_OBJECT_POINTER_RETURN_VALUE使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了LIBRDF_ASSERT_OBJECT_POINTER_RETURN_VALUE函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: librdf_new_uri_from_uri
/**
* librdf_new_uri_from_uri:
* @old_uri: #librdf_uri object
*
* Copy constructor - create a new librdf_uri object from an existing librdf_uri object.
*
* Return value: a new #librdf_uri object or NULL on failure
**/
librdf_uri*
librdf_new_uri_from_uri (librdf_uri* old_uri)
{
LIBRDF_ASSERT_OBJECT_POINTER_RETURN_VALUE(old_uri, librdf_uri, NULL);
return raptor_uri_copy(old_uri);
}
开发者ID:Distrotech,项目名称:librdf,代码行数:16,代码来源:rdf_uri.c
示例2: librdf_uri_to_filename
/**
* librdf_uri_to_filename:
* @uri: #librdf_uri object
*
* Return pointer to filename of URI.
*
* Returns a pointer to a newly allocated buffer that
* the caller must free. This will fail if the URI
* is not a file: URI. This can be checked with #librdf_uri_is_file_uri
*
* Return value: pointer to filename or NULL on failure
**/
const char*
librdf_uri_to_filename(librdf_uri* uri)
{
LIBRDF_ASSERT_OBJECT_POINTER_RETURN_VALUE(uri, librdf_uri, NULL);
return raptor_uri_uri_string_to_filename(librdf_uri_as_string(uri));
}
开发者ID:Distrotech,项目名称:librdf,代码行数:20,代码来源:rdf_uri.c
示例3: librdf_statement_decode
/**
* librdf_statement_decode:
* @statement: the statement to deserialise into
* @buffer: the buffer to use
* @length: buffer size
*
* Decodes a statement from a buffer.
*
* Decodes the serialised statement (as created by librdf_statement_encode() )
* from the given buffer.
*
* Return value: number of bytes used or 0 on failure (bad encoding, allocation failure)
**/
size_t
librdf_statement_decode(librdf_statement* statement,
unsigned char *buffer, size_t length)
{
LIBRDF_ASSERT_OBJECT_POINTER_RETURN_VALUE(statement, librdf_statement, 0);
return librdf_statement_decode_parts(statement, NULL, buffer, length);
}
开发者ID:Kirushanr,项目名称:audacity,代码行数:21,代码来源:rdf_statement.c
示例4: librdf_serializer_serialize_stream_to_counted_string
/**
* librdf_serializer_serialize_stream_to_counted_string:
* @serializer: the serializer
* @base_uri: the base URI to use (or NULL)
* @stream: the #librdf_stream stream to use
* @length_p: pointer to store length or NULL
*
* Write a #librdf_stream to a counted string.
*
* Return value: stream as string or NULL on failure
**/
unsigned char*
librdf_serializer_serialize_stream_to_counted_string(librdf_serializer* serializer,
librdf_uri* base_uri,
librdf_stream* stream,
size_t* length_p)
{
LIBRDF_ASSERT_OBJECT_POINTER_RETURN_VALUE(serializer, librdf_serializer, NULL);
LIBRDF_ASSERT_OBJECT_POINTER_RETURN_VALUE(stream, librdf_stream, NULL);
if(length_p)
*length_p=0;
return serializer->factory->serialize_stream_to_counted_string(serializer->context,
base_uri,
stream,
length_p);
}
开发者ID:herc,项目名称:librdf,代码行数:28,代码来源:rdf_serializer.c
示例5: librdf_new_uri_from_uri
/**
* librdf_new_uri_from_uri:
* @old_uri: #librdf_uri object
*
* Copy constructor - create a new librdf_uri object from an existing librdf_uri object.
*
* Return value: a new #librdf_uri object or NULL on failure
**/
librdf_uri*
librdf_new_uri_from_uri (librdf_uri* old_uri) {
LIBRDF_ASSERT_OBJECT_POINTER_RETURN_VALUE(old_uri, librdf_uri, NULL);
old_uri->usage++;
return old_uri;
}
开发者ID:Kirushanr,项目名称:audacity,代码行数:16,代码来源:rdf_uri.c
示例6: librdf_storage_context_serialise
/**
* librdf_storage_context_serialise - List all statements in a storage context (DEPRECATED)
* @storage: &librdf_storage object
* @context: &librdf_node context node
*
* DEPRECATED to reduce confusion with the librdf_serializer class.
* Please use librdf_storage_context_as_stream.
*
* Return value: &librdf_stream of statements or NULL on failure or context is empty
**/
librdf_stream*
librdf_storage_context_serialise(librdf_storage* storage,
librdf_node* context)
{
LIBRDF_ASSERT_OBJECT_POINTER_RETURN_VALUE(storage, librdf_storage, NULL);
return librdf_storage_context_as_stream(storage, context);
}
开发者ID:stefanhusmann,项目名称:Amaya,代码行数:18,代码来源:rdf_storage.c
示例7: librdf_new_node
/**
* librdf_new_node:
* @world: redland world object
*
* Constructor - create a new #librdf_node object with a private identifier.
*
* Calls librdf_new_node_from_blank_identifier(world, NULL) to
* construct a new redland blank node identifier and make a
* new librdf_node object for it.
*
* Return value: a new #librdf_node object or NULL on failure
**/
librdf_node*
librdf_new_node(librdf_world *world)
{
LIBRDF_ASSERT_OBJECT_POINTER_RETURN_VALUE(world, librdf_world, NULL);
librdf_world_open(world);
return librdf_new_node_from_blank_identifier(world, (unsigned char*)NULL);
}
开发者ID:herc,项目名称:librdf,代码行数:21,代码来源:rdf_term.c
示例8: librdf_new_node_from_uri
/**
* librdf_new_node_from_uri:
* @world: redland world object
* @uri: #librdf_uri object
*
* Constructor - create a new resource #librdf_node object with a given URI.
*
* Return value: a new #librdf_node object or NULL on failure
**/
librdf_node*
librdf_new_node_from_uri(librdf_world *world, librdf_uri *uri)
{
LIBRDF_ASSERT_OBJECT_POINTER_RETURN_VALUE(world, librdf_world, NULL);
librdf_world_open(world);
return raptor_new_term_from_uri(world->raptor_world_ptr, uri);
}
开发者ID:herc,项目名称:librdf,代码行数:18,代码来源:rdf_term.c
示例9: librdf_uri_as_counted_string
/**
* librdf_uri_as_counted_string:
* @uri: #librdf_uri object
* @len_p: pointer to location to store length
*
* Get a pointer to the string representation of the URI with length.
*
* Returns a shared pointer to the URI string representation.
* Note: does not allocate a new string so the caller must not free it.
*
* Return value: string representation of URI
**/
unsigned char*
librdf_uri_as_counted_string(librdf_uri *uri, size_t* len_p)
{
LIBRDF_ASSERT_OBJECT_POINTER_RETURN_VALUE(uri, librdf_uri, NULL);
if(len_p)
*len_p=uri->string_length;
return uri->string;
}
开发者ID:Kirushanr,项目名称:audacity,代码行数:21,代码来源:rdf_uri.c
示例10: librdf_query_results_get_binding_value_by_name
/**
* librdf_query_results_get_binding_value_by_name:
* @query_results: #librdf_query_results query results
* @name: variable name
*
* Get one binding value for a given name in the current result.
*
* Return value: a new #librdf_node binding value or NULL on failure
**/
librdf_node*
librdf_query_results_get_binding_value_by_name(librdf_query_results *query_results, const char *name)
{
LIBRDF_ASSERT_OBJECT_POINTER_RETURN_VALUE(query_results, librdf_query_results, NULL);
if(query_results->query->factory->results_get_binding_value_by_name)
return query_results->query->factory->results_get_binding_value_by_name(query_results, name);
else
return NULL;
}
开发者ID:Distrotech,项目名称:librdf,代码行数:19,代码来源:rdf_query_results.c
示例11: librdf_node_get_literal_value_language
/**
* librdf_node_get_literal_value_language:
* @node: the node object
*
* Get the XML language of the node.
*
* Returns a pointer to the literal language value held by the node, it must
* be copied if it is wanted to be used by the caller.
*
* Return value: the XML language string or NULL if node is not a literal
* or there is no XML language defined.
**/
char*
librdf_node_get_literal_value_language(librdf_node *node)
{
LIBRDF_ASSERT_OBJECT_POINTER_RETURN_VALUE(node, librdf_node, NULL);
if(node->type != RAPTOR_TERM_TYPE_LITERAL)
return NULL;
return (char*)node->value.literal.language;
}
开发者ID:herc,项目名称:librdf,代码行数:22,代码来源:rdf_term.c
示例12: librdf_query_results_finished
/**
* librdf_query_results_finished:
* @query_results: #librdf_query_results query results
*
* Find out if binding results are exhausted.
*
* Return value: non-0 if results are finished or query failed
**/
int
librdf_query_results_finished(librdf_query_results *query_results)
{
LIBRDF_ASSERT_OBJECT_POINTER_RETURN_VALUE(query_results, librdf_query_results, 1);
if(query_results->query->factory->results_finished)
return query_results->query->factory->results_finished(query_results);
else
return 1;
}
开发者ID:Distrotech,项目名称:librdf,代码行数:18,代码来源:rdf_query_results.c
示例13: librdf_query_results_get_boolean
/**
* librdf_query_results_get_boolean:
* @query_results: #librdf_query_results query_results
*
* Get boolean query result.
*
* The return value is only meaningful if this is a boolean
* query result - see librdf_query_results_is_boolean()
*
* Return value: boolean query result - >0 is true, 0 is false, <0 on error or finished
*/
int
librdf_query_results_get_boolean(librdf_query_results* query_results)
{
LIBRDF_ASSERT_OBJECT_POINTER_RETURN_VALUE(query_results, query_results, -1);
if(query_results->query->factory->results_get_boolean)
return query_results->query->factory->results_get_boolean(query_results);
else
return -1;
}
开发者ID:Distrotech,项目名称:librdf,代码行数:21,代码来源:rdf_query_results.c
示例14: librdf_new_node_from_uri_string
/**
* librdf_new_node_from_uri_string:
* @world: redland world object
* @uri_string: string representing a URI
*
* Constructor - create a new #librdf_node object from a URI string.
*
* Return value: a new #librdf_node object or NULL on failure
**/
librdf_node*
librdf_new_node_from_uri_string(librdf_world *world,
const unsigned char *uri_string)
{
LIBRDF_ASSERT_OBJECT_POINTER_RETURN_VALUE(world, librdf_world, NULL);
librdf_world_open(world);
return raptor_new_term_from_uri_string(world->raptor_world_ptr, uri_string);
}
开发者ID:herc,项目名称:librdf,代码行数:19,代码来源:rdf_term.c
示例15: librdf_storage_get_contexts
/**
* librdf_storage_get_contexts - return the list of contexts in the store
* @storage: &librdf_storage object
*
* Returns an iterator of &librdf_node context nodes for each
* context in the store.
*
* Return value: &librdf_iterator of context nodes or NULL on failure or if contexts are not supported
**/
librdf_iterator*
librdf_storage_get_contexts(librdf_storage* storage)
{
LIBRDF_ASSERT_OBJECT_POINTER_RETURN_VALUE(storage, librdf_storage, NULL);
if(storage->factory->get_contexts)
return storage->factory->get_contexts(storage);
else
return NULL;
}
开发者ID:stefanhusmann,项目名称:Amaya,代码行数:19,代码来源:rdf_storage.c
示例16: librdf_query_results_is_syntax
/**
* librdf_query_results_is_syntax:
* @query_results: #librdf_query_results object
*
* Test if librdf_query_results is a syntax.
*
* If this function returns true, the ONLY result available
* from this query is a syntax that can be serialized using
* one of the #query_result_formatter class methods or with
* librdf_query_results_to_counted_string(), librdf_query_results_to_string(),
* librdf_query_results_to_file_handle() or librdf_query_results_to_file()
*
* Return value: non-0 if true
**/
int
librdf_query_results_is_syntax(librdf_query_results* query_results)
{
LIBRDF_ASSERT_OBJECT_POINTER_RETURN_VALUE(query_results, query_results, -1);
if(query_results->query->factory->results_is_syntax)
return query_results->query->factory->results_is_syntax(query_results);
else
return -1;
}
开发者ID:Distrotech,项目名称:librdf,代码行数:24,代码来源:rdf_query_results.c
示例17: librdf_node_get_uri
/**
* librdf_node_get_uri:
* @node: the node object
*
* Get the URI for a node object.
*
* Returns a pointer to the URI object held by the node, it must be
* copied if it is wanted to be used by the caller.
*
* Return value: URI object or NULL if node has no URI.
**/
librdf_uri*
librdf_node_get_uri(librdf_node *node)
{
LIBRDF_ASSERT_OBJECT_POINTER_RETURN_VALUE(node, librdf_node, NULL);
if(node->type != RAPTOR_TERM_TYPE_URI)
return NULL;
return node->value.uri;
}
开发者ID:herc,项目名称:librdf,代码行数:21,代码来源:rdf_term.c
示例18: librdf_query_results_as_stream
/**
* librdf_query_results_as_stream:
* @query_results: #librdf_query_results query_results
*
* Get a query result as an RDF graph in #librdf_stream form
*
* The return value is only meaningful if this is an RDF graph
* query result - see librdf_query_results_is_graph().
*
* Return value: a new #librdf_stream result or NULL on error
*/
librdf_stream*
librdf_query_results_as_stream(librdf_query_results* query_results)
{
LIBRDF_ASSERT_OBJECT_POINTER_RETURN_VALUE(query_results, query_results, NULL);
if(query_results->query->factory->results_as_stream)
return query_results->query->factory->results_as_stream(query_results);
else
return NULL;
}
开发者ID:Distrotech,项目名称:librdf,代码行数:21,代码来源:rdf_query_results.c
示例19: librdf_node_get_literal_value
/**
* librdf_node_get_literal_value:
* @node: the node object
*
* Get the string literal value of the node.
*
* Returns a pointer to the literal value held by the node, it must be
* copied if it is wanted to be used by the caller.
*
* Return value: the literal string or NULL if node is not a literal
**/
unsigned char*
librdf_node_get_literal_value(librdf_node *node)
{
LIBRDF_ASSERT_OBJECT_POINTER_RETURN_VALUE(node, librdf_node, NULL);
if(node->type != RAPTOR_TERM_TYPE_LITERAL)
return NULL;
return node->value.literal.string;
}
开发者ID:herc,项目名称:librdf,代码行数:21,代码来源:rdf_term.c
示例20: librdf_statement_decode_parts
/**
* librdf_statement_decode_parts:
* @statement: the statement to deserialise into
* @context_node: pointer to #librdf_node context_node to deserialise into
* @buffer: the buffer to use
* @length: buffer size
*
* Decodes a statement + context node from a buffer.
*
* @Deprecated: Replaced by librdf_statement_decode2()
*
* Decodes the serialised statement (as created by librdf_statement_encode() )
* from the given buffer. If a context node is found and context_node is
* not NULL, a pointer to the new #librdf_node is stored in *context_node.
*
* Return value: number of bytes used or 0 on failure (bad encoding, allocation failure)
**/
size_t
librdf_statement_decode_parts(librdf_statement* statement,
librdf_node** context_node,
unsigned char *buffer, size_t length)
{
LIBRDF_ASSERT_OBJECT_POINTER_RETURN_VALUE(statement, librdf_statement, 0);
return librdf_statement_decode2(statement->world, statement,
context_node, buffer, length);
}
开发者ID:nxg,项目名称:librdf,代码行数:27,代码来源:rdf_statement.c
注:本文中的LIBRDF_ASSERT_OBJECT_POINTER_RETURN_VALUE函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论