diff options
author | srs5694 <srs5694@users.sourceforge.net> | 2010-08-22 22:44:42 -0400 |
---|---|---|
committer | srs5694 <srs5694@users.sourceforge.net> | 2010-08-22 22:44:42 -0400 |
commit | 9ddc14bb9b154518e2b8384d3f4571cf657c7920 (patch) | |
tree | f921f4c8287c9e4270bbd47e5a60cb536e51b3f9 /attributes.h | |
parent | f9312b0ca9af86f280adad36eb660f6e74720c2c (diff) | |
download | sgdisk-9ddc14bb9b154518e2b8384d3f4571cf657c7920.tar.gz |
Revisions for 0.6.10 release
Diffstat (limited to 'attributes.h')
-rw-r--r-- | attributes.h | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/attributes.h b/attributes.h index ab8cb14..34cf258 100644 --- a/attributes.h +++ b/attributes.h @@ -2,10 +2,7 @@ under the terms of the GNU GPL version 2, as detailed in the COPYING file. */ #include <stdint.h> -//#include <unistd.h> -#include <stdlib.h> -#include <string.h> -#include "support.h" +#include <string> #ifndef __GPT_ATTRIBUTES #define __GPT_ATTRIBUTES @@ -16,16 +13,27 @@ using namespace std; class Attributes { + +private: + class staticInit {public: staticInit (void);}; + static string atNames[NUM_ATR]; + static Attributes::staticInit staticInitializer; + protected: uint64_t attributes; - string atNames[NUM_ATR]; + public: - Attributes(void); + Attributes(const uint64_t a = 0) {SetAttributes (a);} ~Attributes(void); - void SetAttributes(uint64_t a) {attributes = a;} + void SetAttributes(const uint64_t a) {attributes = a;} uint64_t GetAttributes(void) {return attributes;} void DisplayAttributes(void); void ChangeAttributes(void); + void ShowAttributes(const uint32_t partNum); + bool OperateOnAttributes(const uint32_t partNum, const string& attributeOperator, const string& attributeBits); + + static const string& GetAttributeName(const uint32_t bitNum) {return atNames [bitNum];} + static void ListAttributes(void); }; // class Attributes #endif |