Add recursive function prototype

This commit is contained in:
Gregory John Casamento 2023-07-10 12:32:55 -04:00
parent ddb53b0c2d
commit 925eabd500
3 changed files with 22 additions and 10 deletions

View file

@ -3317,11 +3317,6 @@ static void _real_close(GormDocument *self,
}
}
// Build the XML document from the objects in the mode3l...
- (void) _collectObjects: (NSXMLNode *)node withDocument: (NSXMLDocument *)document
{
}
/**
* Exports XLIFF file for CAT. This method starts the process and calls
* another method that recurses through the objects in the model and pulls
@ -3331,13 +3326,22 @@ static void _real_close(GormDocument *self,
withSourceLanguage: (NSString *)slang
andTargetLanguage: (NSString *)tlang
{
NSXMLDocument *xliffDocument = nil;
BOOL result = NO;
if (slang != nil)
{
NSXMLDocument *xliffDocument = nil;
NSXMLElement *rootElement = AUTORELEASE([[NSXMLElement alloc] initWithName: @"xliff"]);
NSXMLElement *header = AUTORELEASE([[NSXMLElement alloc] initWithName: @"header"]);
NSXMLNode *node = nil;
[self _collectObjects: node withDocument: xliffDocument];
id obj = nil;
// Set up document...
xliffDocument = AUTORELEASE([[NSXMLDocument alloc] initWithRootElement: rootElement]);
[xliffDocument addChild: header];
buildXLIFFDocument(obj, &node);
[xliffDocument addChild: node];
}
return result;

View file

@ -25,8 +25,11 @@
#ifndef INCLUDED_GormFunctions_h
#define INCLUDED_GormFunctions_h
#include <Foundation/Foundation.h>
#include <AppKit/AppKit.h>
#import <Foundation/Foundation.h>
#import <AppKit/AppKit.h>
// collect all objects in document for XIFF export
void buildXLIFFDocument(id object, NSXMLNode **node);
// find all subitems for the given items...
void findAllWithArray(id item, NSMutableArray *array);

View file

@ -29,6 +29,11 @@
#include "GormViewEditor.h"
#include "GormClassPanelController.h"
// collect all objects in document for XIFF export
void buildXLIFFDocument(id object, NSXMLNode **node)
{
}
// find all subitems for the given items...
void findAllWithArray(id item, NSMutableArray *array)
{