libopc
Macros | Typedefs | Functions
part.h File Reference
#include <opc/config.h>

Go to the source code of this file.

Macros

#define OPC_PART_INVALID
 

Typedefs

typedef xmlChar * opcPart
 

Functions

opcPart opcPartFind (opcContainer *container, const xmlChar *absolutePath, const xmlChar *type, int flags)
 
opcPart opcPartCreate (opcContainer *container, const xmlChar *absolutePath, const xmlChar *type, int flags)
 
const xmlChar * opcPartGetType (opcContainer *c, opcPart part)
 
const xmlChar * opcPartGetTypeEx (opcContainer *c, opcPart part, opc_bool_t override_only)
 
opc_error_t opcPartDelete (opcContainer *container, const xmlChar *absolutePath)
 
opcPart opcPartGetFirst (opcContainer *container)
 
opcPart opcPartGetNext (opcContainer *container, opcPart part)
 
opc_ofs_t opcPartGetSize (opcContainer *c, opcPart part)
 

Macro Definition Documentation

#define OPC_PART_INVALID

Represents an invalid (resp. NULL) part. In releations OPC_PART_INVALID also represents the root part.

Examples:
opc_extract.c, opc_generate.c, opc_image.c, opc_part.c, opc_relation.c, and opc_type.c.

Typedef Documentation

typedef xmlChar* opcPart

Handle to an OPC part created by opcPartOpen.

See also
opcPartOpen.

Function Documentation

opcPart opcPartCreate ( opcContainer container,
const xmlChar *  absolutePath,
const xmlChar *  type,
int  flags 
)

Creates a part in a \ container with absolutePath and type. Currently no flags are supported.

Examples:
mce_write.c.
opc_error_t opcPartDelete ( opcContainer container,
const xmlChar *  absolutePath 
)

Deleted that part absolutePath in the container.

opcPart opcPartFind ( opcContainer container,
const xmlChar *  absolutePath,
const xmlChar *  type,
int  flags 
)

Find a part in a \ container by absolutePath and/or type. Currently no flags are supported.

Examples:
opc_extract.c, opc_part.c, and opc_relation.c.
opcPart opcPartGetFirst ( opcContainer container)

Get the first part.

1 for(opcPart part=opcPartGetFirst(c);OPC_PART_INVALID!=part;part=opcPartGetNext(c, part)) {
2  printf("%s; \n", part, opcPartGetType(c, part));
3 }
Examples:
opc_generate.c, and opc_image.c.
opcPart opcPartGetNext ( opcContainer container,
opcPart  part 
)

Get the next part.

See also
opcPartGetFirst
Examples:
opc_generate.c, and opc_image.c.
opc_ofs_t opcPartGetSize ( opcContainer c,
opcPart  part 
)

Returns the size in bytes of the part.

Examples:
opc_generate.c.
const xmlChar* opcPartGetType ( opcContainer c,
opcPart  part 
)

Returns the type of the container. The string is interned and must not be freed.

Examples:
opc_generate.c, opc_image.c, opc_part.c, and opc_type.c.
const xmlChar* opcPartGetTypeEx ( opcContainer c,
opcPart  part,
opc_bool_t  override_only 
)

Returns the type of the container. If override_only then the return value will be NULL for parts not having an override type. The string is interned and must not be freed.

Examples:
opc_generate.c.