flags

How do flags work in c?

Ok I want to add some sort of flag like variable to one of my classes and had some questions about going about doing it. After looking at some source that uses it I noticed some stuff like this. TEXTUREFLAGS_POINTSAMPLE = 0x00000001, TEXTUREFLAGS_TRILINEAR = 0x00000010, Does the way this work is by combining all the flags into one int...

Why Does C++ Support Hex Assignment, But Lack Binary Assignment? How best to store flags?

I have a set of bit flags that are used in a program I am porting from C to C++. To begin... The flags in my program were previously defined as: /* Define feature flags for this DCD file */ #define DCD_IS_CHARMM 0x01 #define DCD_HAS_4DIMS 0x02 #define DCD_HAS_EXTRA_BLOCK 0x04 ...Now I've gather that #defines for constant...

C# - Help with [Flags] Enum & Extension Method

Hi Guys, I have the following enum: [Flags] public enum PostAssociations { None = 0x0, User = 0x1, Comments = 0x2, CommentsUser = 0x3 } As a starting note, im not sure if those flags are correct. I'm doing this so that i have a fluent way of defining "Includes" for Entity Framework (as the EF Include method takes a s...

Flag Enum and mutually exclusive Enum with overlapping meaning

I have a model that must be in one of the following mutually exclusive states: New, In Progress, or Closed. The application allows a user to save a record and then retrieve them by providing a list of matching states. I inherited an SQL database where the state is stored as an integer that represents bitwise flags. I have to call a pro...

how can I remove a flag in C?

There is a variable that holds some flags and I want to remove one of them. But I don't know how to remove it. Here is how I set the flag. my.emask |= ENABLE_SHOOT; ...

xcode seems to ignore preprocesser flags

I've seen all the posts about setting preprocessor flags via the "Preprocessor Macros" setting. For some reason, Xcode seems to ignore my settings. I'm building an Xcode project that was created via CMake. Inside the Dependencies.cmake file, there are a few definitions added. For example: add_definitions(-DUSE_POCO) add_definitions...

can you flag command line inputs in python?

a lot of command-line .exe applications i use allow you flag optional inputs e.g. program.exe -o outputfile.txt -f F where "-o" indicates an optional output file name different to the default, and where "-F' indicates another option about the script. so far i've been using the sys.arg[] variables to input file names and such to my pyth...

HttpRiot other linker flags issue

Hi everyone, i'm developing a game which already uses httpRiot framework to communicate with a server. Now i'm also trying to add an ad-mob library but i'm getting issues with the other linked flags, if I put the -all_load flag my ad-mob service crashes, and if I take it off HttpRiot crashes, anyone knows if there is a way to make HttpR...

what are flags in mysql ?

hello, I just wanna ask, what are those things called as "flags" in mysql ? What are they, kindly explain and how they are used. ...

Why don't the Flag links show up in a view for anyone except the super admin user

I have a node type on my Drupal site that uses a Flag to let users "unpublish" or "publish" their content. This is not the same as Drupal's node publishing... that is still reserved for admins of the site. Instead, the Flag is used to determine if the node shows up in other Views. I've also created an "admin" type page for each user to a...