Skip to content

Commit

Permalink
Forward files done
Browse files Browse the repository at this point in the history
  • Loading branch information
skeating committed Jul 25, 2023
1 parent ea64f39 commit 5d4c8f0
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 14 deletions.
7 changes: 6 additions & 1 deletion deviser/code_files/ExtensionHeaderFile.py
Expand Up @@ -419,6 +419,10 @@ def write_all_elements(self):
prefixed_name = '{0}{1}'.format(global_variables.prefix, name)
new_element = dict({'name': prefixed_name})
elements.append(new_element)
others = ['List', 'ListNode', 'ExpectedAttributes']
for name in others:
new_element = dict({'name': name})
elements.append(new_element)
self.write_classes(elements)
new_length = len(elements)
for i in range(new_length, no_elements, -1):
Expand Down Expand Up @@ -483,7 +487,8 @@ def write_fwd_file(self):
self.write_cppns_end()
# if we are in another library and using either ASTNode or XMLNode
# we need to declare these here
if global_variables.uses_ASTNode or global_variables.uses_XMLNode:
# don't need xmlnode for now
if global_variables.uses_ASTNode:
self.write_libsbml_fwd()
self.write_end_class_or_struct()
self.write_defn_end()
Expand Down
24 changes: 11 additions & 13 deletions deviser/pytest_files/test_other_library/test-code/tsb/tsbfwd.h
Expand Up @@ -61,24 +61,22 @@
LIBTSB_CPP_NAMESPACE_BEGIN


typedef CLASS_OR_STRUCT TSBDocument TSBDocument_t;
typedef CLASS_OR_STRUCT TSBComment TSBComment_t;
typedef CLASS_OR_STRUCT TSBBase TSBBase_t;
typedef CLASS_OR_STRUCT TSBListOf TSBListOf_t;
typedef CLASS_OR_STRUCT TSBReader TSBReader_t;
typedef CLASS_OR_STRUCT TSBWriter TSBWriter_t;
typedef CLASS_OR_STRUCT TSBNamespaces TSBNamespaces_t;
typedef CLASS_OR_STRUCT TSBError TSBError_t;
typedef CLASS_OR_STRUCT List List_t;
typedef CLASS_OR_STRUCT ListNode ListNode_t;
typedef CLASS_OR_STRUCT ExpectedAttributes ExpectedAttributes_t;

typedef CLASS_OR_STRUCT TSBDocument TSBDocument_t;
typedef CLASS_OR_STRUCT TSBComment TSBComment_t;
typedef CLASS_OR_STRUCT TSBBase TSBBase_t;
typedef CLASS_OR_STRUCT TSBListOf TSBListOf_t;
typedef CLASS_OR_STRUCT TSBReader TSBReader_t;
typedef CLASS_OR_STRUCT TSBWriter TSBWriter_t;
typedef CLASS_OR_STRUCT TSBNamespaces TSBNamespaces_t;
typedef CLASS_OR_STRUCT TSBError TSBError_t;
typedef CLASS_OR_STRUCT List List_t;
typedef CLASS_OR_STRUCT ListNode ListNode_t;
typedef CLASS_OR_STRUCT ExpectedAttributes ExpectedAttributes_t;


LIBTSB_CPP_NAMESPACE_END



#undef CLASS_OR_STRUCT


Expand Down

0 comments on commit 5d4c8f0

Please sign in to comment.