code-generation

Xcode code generation [closed]

天涯浪子 提交于 2019-12-01 18:05:58
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed last year . I was wondering if there is a tool (automator script or a third party) to generate code for simple scenarios like add another property. I don't like going to two or three places and write the same thing over and over again. instead I want to say "I want a new property of type int with name X" and it generates the

Xcode code generation [closed]

主宰稳场 提交于 2019-12-01 18:00:21
I was wondering if there is a tool (automator script or a third party) to generate code for simple scenarios like add another property. I don't like going to two or three places and write the same thing over and over again. instead I want to say "I want a new property of type int with name X" and it generates the lines in .h and .m files for me in one go. I haven't actually used either, but xobjc is free (though requires you to do some code annotations) and Accessorizer looks interesting if somewhat complicated to setup. 来源: https://stackoverflow.com/questions/2605237/xcode-code-generation

UML generalization and realization

限于喜欢 提交于 2019-12-01 17:44:54
I am pretty new to UML, so I have some questions about Generalization and Realization. I am modeling the behavior of an electronic microcontroller and I need to generate C++ code from the UML description. As far as I know, a class realizes an interface, that means it may provide the implementation of an interface. A generalization relationship may exist between two classes. In that case the derived class inherits all the members of the base class and gains access to public and protected members. Here is my question (I am using Visual Paradigm as modeling tool). Let us assume we have a module

Is there a shortcut for adding fields to existing constructor in Eclipse?

你。 提交于 2019-12-01 13:53:39
问题 Is there any shortcut in Eclipse that allows me to add a field to the argument list of an existing constructor? Example: I hava this class: public class A { int a; int b; public A(int a, int b) { this.a = a; this.b = b; } } when i add a field int c (or many fields) i want to add it to the argumentlist of the constructor and assign the parameter to the field: public class A { int a; int b; int c; //this is new public A(int a, int b, int c) { this.a = a; this.b = b; this.c = c; } } i currently

CodeModel help needed for right-hand singleton.getinstance() assignment

久未见 提交于 2019-12-01 13:17:41
I've been able to generate 99% of what I need with the CodeModel API, but I am stumped here... Using the various "directXX" methods does not add import statements to the generated code, and I can work without the "directXXX" type of methods except for one place in a generated class. Suppose I desire a generated method like: /** * Copies data from this Value-Obj instance, to the returned PERSON instance. * * @return PERSON * */ public PERSON mapVOToPERSON() throws MappingException { Mapper mapper = (com.blah.util.MapperSingleton.getMapperInstance()); return mapper.map(this, PERSON.class); } You

How to write a C++ code generator that takes C++ code as input?

筅森魡賤 提交于 2019-12-01 13:14:37
We have a CORBA implementation that autogenerates Java and C++ stubs for us. Because the CORBA-generated code is difficult to work with, we need to write wrappers/helpers around the CORBA code. So we have a 2-step code generation process (yes, I know this is bad): CORBA IDL -> annoying CORBA-generated code -> useful wrappers/helper functions Using Java's reflection, I can inspect the CORBA-generated code and use that to generate additional code. However, because C++ doesn't have reflection, I am not sure how to do this on the C++ side. Should I use a C++ parser? C++ templates? TLDR: How to

Code generator (.net)

 ̄綄美尐妖づ 提交于 2019-12-01 12:19:41
Do you have any experience with T4 and T4 Editor ? Can you compare it to CodeSmith or MyGeneration ? What code generators do you use? What do you recommend? I want to use it for generatig of SPs. Is there anything else you find code generation useful? What exactly you are trying to do? I guess it also depends on from where you are trying to generate the code (the model). The advantage with Codesmith and MyGeneration is, they provide multiple options for you to generate your code - for eg, in MyGeneration, you can write your templates in various langs. MyGeneration can provide a meta model of

Cannot reference dependency assemblies in T4 template when using TransformOnBuild

为君一笑 提交于 2019-12-01 12:19:04
We're trying to use T4 with Visual Studio 2010 (SP1) to build scripts for another language that are based upon some of our existing C# classes. I'm hoping for the following: The template needs to load our existing assembly and use objects from a namespace in that assembly. The transformation needs to run on every build on every development machine and build server without any additional installations. (1) and (2) need to work together. (1) was fairly straightforward: <#@ assembly name="$(TargetDir)RequiredProject.dll" #> <#@ import namespace="RequiredProject.RequiredNamespace" #> Using the $

CodeModel help needed for right-hand singleton.getinstance() assignment

橙三吉。 提交于 2019-12-01 11:41:41
问题 I've been able to generate 99% of what I need with the CodeModel API, but I am stumped here... Using the various "directXX" methods does not add import statements to the generated code, and I can work without the "directXXX" type of methods except for one place in a generated class. Suppose I desire a generated method like: /** * Copies data from this Value-Obj instance, to the returned PERSON instance. * * @return PERSON * */ public PERSON mapVOToPERSON() throws MappingException { Mapper

Code generator (.net)

我只是一个虾纸丫 提交于 2019-12-01 11:24:19
问题 Do you have any experience with T4 and T4 Editor? Can you compare it to CodeSmith or MyGeneration? What code generators do you use? What do you recommend? I want to use it for generatig of SPs. Is there anything else you find code generation useful? 回答1: What exactly you are trying to do? I guess it also depends on from where you are trying to generate the code (the model). The advantage with Codesmith and MyGeneration is, they provide multiple options for you to generate your code - for eg,