Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compiling on Zig. OUTPUT Macro replaced with extra class functions (add_extra and set_metadata) #53

Open
JamesParrott opened this issue Jun 9, 2024 · 1 comment

Comments

@JamesParrott
Copy link
Collaborator

JamesParrott commented Jun 9, 2024

sDNA/sdna_vs2008/sdna_output_utils.h
Added:

class OutputMap

{
private:
	// prefix and postfix to be used to construct ExtraNameWrapper in add_extra
	string pre = "";
	string post = "";

(in public)

	void set_pre_and_post(string prefix, string postfix) {
		// Must be called before add_extra
		 pre = prefix;
		 post = postfix;
	}

	const void add_extra(const OutputDataWrapper &output) {
		add_output(ExtraNameWrapper(output, pre, post));
	}

sDNA/sdna_vs2008/calc_output_code.cpp

Removed:

#define OUTPUT(x) output_map.add_output(ExtraNameWrapper((x),output_name_prefix,output_name_postfix))

Replaced:

OUTPUT with output_map.add_extra

Also added a call to output_map.set_pre_and_post(output_name_prefix,output_name_postfix) of course.

@JamesParrott
Copy link
Collaborator Author

Included in #74 on Cross_Platform branch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant