Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Z
zmap
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Iterations
Wiki
Requirements
Jira
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ensembl-gh-mirror
zmap
Commits
7b27d46b
Commit
7b27d46b
authored
15 years ago
by
rds
Browse files
Options
Downloads
Patches
Plain Diff
Some extra macros
parent
1f4515a3
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/include/ZMap/zmapEnum.h
+22
-2
22 additions, 2 deletions
src/include/ZMap/zmapEnum.h
with
22 additions
and
2 deletions
src/include/ZMap/zmapEnum.h
+
22
−
2
View file @
7b27d46b
...
...
@@ -28,9 +28,9 @@
* and more.
*
* HISTORY:
* Last edited:
Apr 27
09:
09
2009 (
edgrif
)
* Last edited:
Jun 30
09:
57
2009 (
rds
)
* Created: Tue Jun 10 17:27:31 2008 (rds)
* CVS info: $Id: zmapEnum.h,v 1.
3
2009-0
4-28 14:23:21 edgrif
Exp $
* CVS info: $Id: zmapEnum.h,v 1.
4
2009-0
6-30 21:26:03 rds
Exp $
*-------------------------------------------------------------------
*/
...
...
@@ -78,6 +78,9 @@
return name; \
}
#define AS_NAME_TEXT(name, dummy0, name_text, dummy1, dummy2) \
case name: { return name_text; }
#define AS_SHORT_TEXT(name, value, dummy0, short_text, dummy2) \
case name: { return short_text; }
...
...
@@ -119,6 +122,23 @@ SWALLOW_SEMI_COLON
SWALLOW_SEMI_COLON
/*
* Defines enum to name string converter function automatically.
* name as in style of g_param_spec_TYPE(name, short, blurb, ...)
*/
#define ZMAP_ENUM_AS_NAME_STRING_DEC(fname, type_name) \
const char *fname(type_name n); \
SWALLOW_SEMI_COLON
#define ZMAP_ENUM_AS_NAME_STRING_FUNC(fname, type_name, list) \
const char *fname(type_name n){ \
switch(n) { \
list(AS_NAME_TEXT) \
default: return ""; \
} \
} \
SWALLOW_SEMI_COLON
/*
* Defines enum to short description convertor automatically.
*/
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment