1 /* This program is copyright (c) 2009-2011 by Roderick W. Smith. It is distributed
2 under the terms of the GNU GPL version 2, as detailed in the COPYING file. */
7 #ifndef __GPT_ATTRIBUTES
8 #define __GPT_ATTRIBUTES
10 #define NUM_ATR 64 /* # of attributes -- 64, since it's a 64-bit field */
11 #define ATR_NAME_SIZE 25 /* maximum size of attribute names */
17 static string atNames[NUM_ATR];
24 Attributes(const uint64_t a);
26 void operator=(uint64_t a) {attributes = a;}
28 uint64_t GetAttributes(void) const {return attributes;}
29 void DisplayAttributes(void);
30 void ShowAttributes(const uint32_t partNum);
32 void ChangeAttributes(void);
33 bool OperateOnAttributes(const uint32_t partNum, const string& attributeOperator, const string& attributeBits);
35 static const string& GetAttributeName(const uint32_t bitNum) {return atNames [bitNum];}
36 static void ListAttributes(void);
37 }; // class Attributes
39 ostream & operator<<(ostream & os, const Attributes & data);