OCCT-Light 0.1
C ABI and C++ veneer for multi-language CAD workflows
Loading...
Searching...
No Matches
occtl_de.h
Go to the documentation of this file.
1// Copyright (c) 2026 Capgemini Engineering Research and Development.
2//
3// This file is part of OCCT-Light software library.
4//
5// This library is free software; you can redistribute it and/or modify it under
6// the terms of the GNU Affero General Public License version 3 as published
7// by the Free Software Foundation, with an option to use any later version.
8// Consult the file LICENSE_AGPL_30.txt included in OCCT-Light distribution
9// for complete text of the license and disclaimer of any warranty.
10//
11// Alternatively, this file may be used under the terms of a commercial
12// license or contractual agreement.
13//
14// SPDX-License-Identifier: AGPL-3.0-or-later
15
30#ifndef OCCTL_DE_H
31#define OCCTL_DE_H
32
33#include <stddef.h>
34#include <stdint.h>
35
36#include "occtl_core.h"
37#include "occtl_topo.h"
38
39#ifdef __cplusplus
40extern "C"
41{
42#endif
43
44#define OCCTL_DE_FORMAT_INFO_VERSION_1 1u
45
58{
59 uint32_t struct_version;
60 const void* p_next;
61 const char* id;
62 const char* label;
64 int32_t can_read_file;
69
73#define OCCTL_DE_FORMAT_INFO_INIT {OCCTL_DE_FORMAT_INFO_VERSION_1, NULL, NULL, NULL, 0, 0, 0, 0, 0}
74
87
109OCCTL_API occtl_status_t OCCTL_CALL occtl_de_read(const char* path,
110 occtl_graph_t** out_graph,
111 occtl_node_id_t* out_root);
112
139OCCTL_API occtl_status_t OCCTL_CALL occtl_de_read_memory(const char* format_id,
140 const uint8_t* data,
141 size_t size,
142 occtl_graph_t** out_graph,
143 occtl_node_id_t* out_root);
144
163 occtl_node_id_t root,
164 const char* path);
165
194 occtl_node_id_t root,
195 const char* format_id,
196 uint8_t* out_data,
197 size_t capacity,
198 size_t* out_size);
199
219OCCTL_API occtl_status_t OCCTL_CALL occtl_de_format_ids(const char** out_format_ids,
220 size_t cap,
221 size_t* out_count);
222
235OCCTL_API occtl_status_t OCCTL_CALL occtl_de_format_count(size_t* out_count);
236
254 occtl_de_format_info_t* out_info);
255
272OCCTL_API occtl_status_t OCCTL_CALL occtl_de_format_info_by_id(const char* format_id,
273 occtl_de_format_info_t* out_info);
274
296OCCTL_API occtl_status_t OCCTL_CALL occtl_de_format_extensions(const char* format_id,
297 const char** out_extensions,
298 size_t cap,
299 size_t* out_count);
300
319 const char** out_format_id);
320
321#ifdef __cplusplus
322} /* extern "C" */
323#endif
324
325#endif /* OCCTL_DE_H */
OCCT-Light: core public API.
#define OCCTL_API
Definition occtl_core.h:111
enum occtl_status occtl_status_t
occtl_status_t occtl_de_format_ids(const char **out_format_ids, size_t cap, size_t *out_count)
occtl_status_t occtl_de_format_extensions(const char *format_id, const char **out_extensions, size_t cap, size_t *out_count)
occtl_status_t occtl_de_read(const char *path, occtl_graph_t **out_graph, occtl_node_id_t *out_root)
occtl_status_t occtl_de_format_info_at(size_t index, occtl_de_format_info_t *out_info)
occtl_status_t occtl_de_format_id_from_path(const char *path, const char **out_format_id)
occtl_status_t occtl_de_format_info_by_id(const char *format_id, occtl_de_format_info_t *out_info)
occtl_status_t occtl_de_write_memory(const occtl_graph_t *graph, occtl_node_id_t root, const char *format_id, uint8_t *out_data, size_t capacity, size_t *out_size)
struct occtl_de_format_info occtl_de_format_info_t
void occtl_de_format_info_init(occtl_de_format_info_t *info)
occtl_status_t occtl_de_read_memory(const char *format_id, const uint8_t *data, size_t size, occtl_graph_t **out_graph, occtl_node_id_t *out_root)
occtl_status_t occtl_de_write(const occtl_graph_t *graph, occtl_node_id_t root, const char *path)
occtl_status_t occtl_de_format_count(size_t *out_count)
OCCT-Light: topology module public API.
struct occtl_graph occtl_graph_t
Definition occtl_topo_types.h:152
Definition occtl_de.h:58
int32_t can_read_file
Definition occtl_de.h:64
const char * id
Definition occtl_de.h:61
size_t extension_count
Definition occtl_de.h:63
uint32_t struct_version
Definition occtl_de.h:59
int32_t can_read_memory
Definition occtl_de.h:66
const void * p_next
Definition occtl_de.h:60
int32_t can_write_file
Definition occtl_de.h:65
const char * label
Definition occtl_de.h:62
int32_t can_write_memory
Definition occtl_de.h:67
Definition occtl_topo_types.h:50