-
Notifications
You must be signed in to change notification settings - Fork 40
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
Clearer protection #3629
base: master
Are you sure you want to change the base?
Clearer protection #3629
Conversation
|
||
record IntLicense "Internal class name, do not use" | ||
/*literal*/ constant String libraryKey; | ||
/*literal*/ constant String licenseFile = "" "Optional, default mapping if empty"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need to point out that this is optional:
/*literal*/ constant String licenseFile = "" "Optional, default mapping if empty"; | |
/*literal*/ constant String licenseFile = "" "Default mapping if empty"; |
/*literal*/ constant String libraryKey; | ||
/*literal*/ constant String licenseFile = "" "Optional, default mapping if empty"; | ||
end License; | ||
/*literal*/ constant IntLicense License; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I find the Int
prefix confusing. How about ProtectionLicense
or UserLicense
?
end Protection; | ||
|
||
record IntLicense "Internal class name, do not use" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wouldn't it look cleaner like this,
record IntLicense "Internal class name, do not use" | |
record IntLicense "Type of Protection.License" |
or without any description at all?
record IntLicense "Internal class name, do not use" | |
record IntLicense |
@@ -2350,26 +2351,26 @@ \subsection{Licensing}\label{licensing} | |||
|
|||
In order that the protected class can be used either a tool specific license manager, or a license file (called \lstinline!licenseFile!) must be present. | |||
The license file is standardized. | |||
It is a Modelica package without classes that has a \lstinline!Protection! annotation of the following form which specifies a sequence of target records, which makes it natural to define start/end dates for different sets of targets individually: | |||
It is a Modelica package without classes that has a \lstinline!Authorization! annotation of the following form which specifies a sequence of target records, which makes it natural to define start/end dates for different sets of targets individually: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Grammar:
It is a Modelica package without classes that has a \lstinline!Authorization! annotation of the following form which specifies a sequence of target records, which makes it natural to define start/end dates for different sets of targets individually: | |
It is a Modelica package without classes that has an \lstinline!Authorization! annotation of the following form which specifies a sequence of target records, which makes it natural to define start/end dates for different sets of targets individually: |
end License; | ||
end Protection; | ||
record Authorization | ||
/*literal*/ constant String licensor = "" "Optional string to show information about the licensor"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Again, no need to point out optionality anymore:
/*literal*/ constant String licensor = "" "Optional string to show information about the licensor"; | |
/*literal*/ constant String licensor = "" "Information about the licensor"; |
using the following definition: | ||
\begin{lstlisting}[language=modelica] | ||
record License | ||
/*literal*/ constant String licensee = "" "Optional string to show information about the licensee"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similar:
/*literal*/ constant String licensee = "" "Optional string to show information about the licensee"; | |
/*literal*/ constant String licensee = "" "Information about the licensee"; |
/*literal*/ constant String licensee = "" "Optional string to show information about the licensee"; | ||
/*literal*/ constant String id[:] "Unique machine identifications, e.g., MAC addresses"; | ||
/*literal*/ constant String features[:] "Activated library license features"; | ||
/*literal*/ constant String startDate = "" "Optional start date in UTCformat YYYY-MM-DD"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similar:
/*literal*/ constant String startDate = "" "Optional start date in UTCformat YYYY-MM-DD"; | |
/*literal*/ constant String startDate = "" "Start date in UTCformat YYYY-MM-DD"; |
/*literal*/ constant String id[:] "Unique machine identifications, e.g., MAC addresses"; | ||
/*literal*/ constant String features[:] "Activated library license features"; | ||
/*literal*/ constant String startDate = "" "Optional start date in UTCformat YYYY-MM-DD"; | ||
/*literal*/ constant String expirationDate = "" "Optional expiration date in UTCformat YYYY-MM-DD"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similar:
/*literal*/ constant String expirationDate = "" "Optional expiration date in UTCformat YYYY-MM-DD"; | |
/*literal*/ constant String expirationDate = "" "Expiration date in UTCformat YYYY-MM-DD"; |
/*literal*/ constant String expirationDate = "" "Optional expiration date in UTCformat YYYY-MM-DD"; | ||
/*literal*/ constant String operations[:] "Library usage conditions"; | ||
end License; | ||
\end{lstlisting} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Somewhere below here, the default behaviors should be explained:
\end{lstlisting} | |
\end{lstlisting} | |
If \lstinline!startDate! or \lstinline!expirationDate! are empty (the default), the license has no start day or expiration date, respectively. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The cleanup looks good to me, but since System Modeler does not implement this annotation, I am not in a good position to provide a review with approval.
Closes #3622
In particular: