Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
C
capnproto
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
capnproto
Commits
0fb40a47
Commit
0fb40a47
authored
May 01, 2013
by
Kenton Varda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Specify how derived IDs are generated.
parent
ebd60adb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
language.md
doc/language.md
+6
-4
No files found.
doc/language.md
View file @
0fb40a47
...
...
@@ -391,10 +391,12 @@ annotation qux @0xf8a1bedf44c89f00 (field) :Text;
{% endhighlight %}
If you omit the ID for a type or annotation, one will be assigned automatically. This default
ID is derived from the declaration's name combined with the ID of the parent scope (i.e. the file
ID for top-level declarations or the outer type's ID for nested declarations). In general, you
would only specify an explicit ID for a declaration if that declaration has been renamed or moved
and you want the ID to stay the same for backwards-compatibility.
ID is derived by taking the first 8 bytes of the MD5 hash of the parent scope's ID concatenated
with the declaration's name (where the parent scope means the file for top-level delarations, or
the outer type for nested declarations). You can see the automatically-generated IDs by running
`capnpc -v`
on a file. In general, you would only specify an explicit ID for a declaration if that
declaration has been renamed or moved and you want the ID to stay the same for
backwards-compatibility.
IDs exist to provide a relatively short yet unambiguous way to refer to a type or annotation from
another context. They may be used for representing schemas, for tagging dynamically-typed fields,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment