Doxygen - how to hide variable from documentation - doxygen

I have a safety code which requires a variable and a copy of it.
I want to to hide the shadow redudant variable from the generated Doxygen docs, for instance, here a pseudo code:
uint16 Variable_1; //!< This variable I want to show up in the docs
uint16 Variable_2; // This one I don't want to show in the docs.
I could use conditional documenting (\cond) however, I need to marks or other approach per variable. As there are too much variables and they are spread in the code, oone mark per variable would be great!
If I uncheck the option "all entities" then all my local functions are hidden.
How do I hide only variables I want, like marking only "Variable_2"?

Related

AnyLogic - make many edit boxes visible depending on variable

Here is a simplified example of my problem:
I want to make the edit box 1 or 2 visible, depending on whether a checkbox of box 1 or box 2 is checked. The variables "variableCheckbox1" and "variableCheckbox2" are connected to the respective ceckboxes.
I have written a function as shown in the picture. The function is called from the EditBox 1 ("Enabled"). This is a possible solution for ONE box each.
Does anyone have an idea if there is a more elegant way to do this for a very high number of checkboxes / edit boxes?
A possible solution would be to write a function with a switch case for each variable in my model, called from each box. A very inelegant solution would be to make a single function for each box, but I don't consider that a good way.
If you want this for a large number, turn the entire setup into its own agent type: Checkbox and editbox. Instantiate as needed, you can add a parameter to specify what this is about exactly...
This would be the most generic and powerful approach...
if this works for you, you can use replications for checkboxes and editboxes and associate them together through the index... and then just add the code in the visible field of the edit box... Of course you will have to determine their positions programatically

What is the best way to inspect a specific variable in jupyter?

Short of printing a variable in a new cell, I don't know a good fast method to view a specific variable in jupyter.
I am aware of the Variable Inspector nbextension; but that shows ALL variables rather than a specific one.
Is there some way to do this which I'm missing?

Why the UPROPERTY specifiers Visible*/Edit* are used together with BlueprintRead*

Unreal Engine 4 provides three specifiers to control the visibility and editability of an C++ class member exposed to Blueprint via UPROPERTY().
The documentation in the UE4 source code (see also UE4 wiki, UE4 documentation) says the following regarding editability:
For VisibleAnywhere, VisibleInstanceOnly, VisibleDefaultsOnly:
... cannot be edited at all.
For EditAnywhere, EditInstanceOnly, EditDefaultsOnly:
... can be edited ...
For BlueprintReadOnly:
... can be read by blueprints, but not modified.
and BlueprintReadWrite:
... can be read or written from a blueprint.
Questions:
Since the Visible* specifiers already restrict the usage to read only in Blueprints, why it is used in conjunction with BlueprintReadOnly? Isn't the second specifier superfluous? Example:
UPROPERTY(VisibleDefaultsOnly, BlueprintReadOnly)
UMyActorComponent* MyActorComponent;
Even more confusing is the usage of Edit* specifiers, which allow read and write in Blueprint, together with BlueprintReadOnly which restricts to read only in Blueprint. Aren't both specifiers opposing each other? Example:
UPROPERTY(EditAnywhere, BlueprintReadOnly)
UMyActorComponent* MyActorComponent;
Are the Visible*/Edit* specifiers valid in a different context than the BlueprintRead* specifiers? (the question is not about InstanceOnly (property windows for instances), DefaultsOnly (property windows for archetypes) and Anywhere (instances & archetypes))
tl;dr
Visible*/Edit* specifiers allow you (typically a game designer) to access/modify a variable directly in Blueprint Editor for quick configurations of class properties.
BlueprintRead* allow you to get/set the value of a variable in the Event Graph when you're doing Visual Scripting.
Explanation:
Some namings and explanations in the official documentation are indeed a little ambiguous, especially for beginners. In a nutshell, both Visible*/Edit* and BlueprintRead* expose a variable in a class to the Unreal Engine, but do different things. In fact, both question 2 and 3 can be answered via question 1. Let's see your question 1:
Since the Visible* specifiers already restrict the usage to read only in Blueprints, why it is used in conjunction with BlueprintReadOnly? Isn't the second specifier superfluous? Example:
UPROPERTY(VisibleDefaultsOnly, BlueprintReadOnly)
UMyActorComponent* MyActorComponent;
Here you're exposing an ActorComponent to the Engine. Here I'll explain a non-Component member variable first, because specifiers for Component "appears" to work differently from non-Component variables.
Suppose I have a TpsCharacter class for a Third Person Shooter character, which has the following 3 float variables:
// The zooming speed
UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "Camera Zoom")
float ZoomSpeed;
// The FOV after zoom in
UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "Camera Zoom")
float ZoomInFov;
// The default FOV
UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "Camera Zoom")
float DefaultFov;
They're all specified as EditDefaultsOnly, which means that, after we create a Blueprint class called TpsCharacter_BP based on this C++ class and open this Blueprint, the values of these 3 variables are editable in the Details Panel for this Blueprint class, as shown in the picture:
Of course, by using Visible* specifiers, they are read-only (greyed out in the Details Panel) so you can't change their values.
Now let's get back to your MyActorComponent. Like I said, specifiers for Component works somewhat differently.
Component appear in the Components Panel together with its owner class in the Blueprint Editor instead of in Details Panel like a non-Component variable.
When you have neither Visible* nor Edit* specifiers for a Component, this Component itself will always appear in the Editor, but you can't access properties/variables inside this Component., and Details Panel for this Component will be empty.
Visible* specifier allows you to access the Component's properties via its Details Panel, just like accessing the 3 variables in my TpsCharacter_BP class. However, when you declare it as Edit*, the Details Panel will show wired settings, allowing you to modify the Pointer value of this Component rather than its contents. This is definitely one thing you should always avoid.
Rule of thumb for Component: NEVER declare them as Edit* because it allows you change the pointer value to point to other things; always do Visible*. For a non-Component object you're free to set Edit*.
Now it's much easier to understand BlueprintRead* specifier. Is it superfluous with the presence of Visible*? Is BlueprintReadOnly opposing Edit* specifiers? Absolutely no. Are they valid in different context? Yes. The BlueprintRead* specifier allows you to read/write a variable in the Event Graph in the Blueprint Editor, that is, when you're doing Blueprint Visual Scripting. For my TpsCharacter class above, since all 3 variables are declared BlueprintReadOnly, I can get their values inside the Event Graph as shown here:
You can do the same for your MyActorComponent. By using BlueprintReadWrite, you can also set the value for these variables in Event Graph.
I write such long answer to explain because they can really confuse beginners though they're actually simple concepts.

Simulink & Masks: Dynamic access to parameters "evaluate" and "tunable"

First of all, matlab version is 2011b, so I cannot use Simulink.MaskParameters class.
I have one simulink mask and some parameters inside. I need to determine in my function for each parameter if it is "evaluable" or "tunable".
Those two things are two checkboxes in the mask parameters dialog which you can select for any parameter.
For "tunable", there's the MaskTunableValues property. For "enable", there's the "MaskEnables" property.
Do you know if there's a way to programmatically access the same property but for "evaluate" ?
Thanks
#Phil Goddard's answer shows you how to find the parameter. To complete the answer, the actual parameter is MaskVariables. Evaluate flag is embedded into the MaskVariables string. It is not straightforward to modify this. For example for two parameters MaskVariables string contains something like this:
"a=#1;b=&2;"
In this string the # sign indicates evaluation. Based on that, parameter a is evaluated and parameter b is not. If you want to change the evaluate flag, you need to set this string for MaskVariables parameter exactly how it was except for # or & signs.
For more information see R2011b documentation for mask parameters at https://www.mathworks.com/help/releases/R2011b/toolbox/simulink/slref/f23-18517.html. Towards the bottom of the page there is more detail about MaskVariables parameter.
You're using too old a release for most people to be able to give you an exact solution, however, I'm sure (from memory) that this parameter is available.
If you click on the mask to select the block, then go to the MATLAB command line and type
get_param(gcb,'ObjectParameters')
you'll get a list of all the block properties. (You may already know that since you're aware of MaskTunableValues and MaskEnables.) Near the bottom of that list are all of the properties related to the mask.
Now manually look at each/all of those properties, e.g.
get_param(gcb,'MaskTunableValues')
and you'll find that one of them is a structure that contains the information that you're looking for. (You may need to dig down into the structure to find the specific info.)
Answer for versions > 2011b (tested on 2014b):
Ok found it, actually the matlab documentation is REALLY unclear regarding the Simulink.MaskParameter class and here is how it works:
First, get the Mask class from your block:
mask = Simulink.Mask.get(gcb)
The Mask class is a structure containing all mask parameters:
parameters = mask.Parameters(:)
parameters is a (array of) Simulink.MaskParameter object which will contains all the necessary properties, including Evaluate.

Intellij IDEA insert variable names in methods

I'm using Intellij IDEA 13 for android development.
Some methods has long list of parameters. For example, db.query(...) and I can't remember the order of them.
Is there any plugin or can i change some settings to make IDEA insert variables from function template?
Thanks
You have a couple of options. Ctrl+P will show a lit of the parameters, with the current one bolded. As long as you have either the source or javadoc for the library (or JDK/SDK) attached to the corresponding definition, you will see the parameters' names.
If you invoke code completion while entering parameters, IDEA will show at the top only ones that are of the correct type. Furthermore, if one of you local variables is the same name (or similar to) the required parameter's name, it will be at the top of the list. So if there is a method that takes an int named 'width', and I have several int variables, but one is named 'theWidth', it would be at the top. (Again, this assumes you have javadoc or source attached so IDEA can determine parameter names.) If IDEA can find local variables that satisfy all parameters (or all the first x parameters) of the method, there will be an option in the code completion list to complete all of them, The icon will be a double circle. The below screen shot shows how the HttpServletReqest is at the top of the list. So I do not have to remember if the parameter order is "request, response" or "response, "request". Notice the fourth option is to complete both the request and the response.