5 Star 0 Fork 28

OH_IPC/third_party_gptfdisk

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
attributes.h 1.16 KB
一键复制 编辑 原始数据 按行查看 历史
srs5694 提交于 2011-03-02 11:03 +08:00 . Misc. bug fixes & restructuring.
/* This program is copyright (c) 2009-2011 by Roderick W. Smith. It is distributed
under the terms of the GNU GPL version 2, as detailed in the COPYING file. */
#include <stdint.h>
#include <string>
#ifndef __GPT_ATTRIBUTES
#define __GPT_ATTRIBUTES
#define NUM_ATR 64 /* # of attributes -- 64, since it's a 64-bit field */
#define ATR_NAME_SIZE 25 /* maximum size of attribute names */
using namespace std;
class Attributes {
protected:
static string atNames[NUM_ATR];
static int numAttrs;
void Setup(void);
uint64_t attributes;
public:
Attributes(void);
Attributes(const uint64_t a);
~Attributes(void);
void operator=(uint64_t a) {attributes = a;}
uint64_t GetAttributes(void) const {return attributes;}
void DisplayAttributes(void);
void ShowAttributes(const uint32_t partNum);
void ChangeAttributes(void);
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
ostream & operator<<(ostream & os, const Attributes & data);
#endif
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/OH_IPC/third_party_gptfdisk.git
git@gitee.com:OH_IPC/third_party_gptfdisk.git
OH_IPC
third_party_gptfdisk
third_party_gptfdisk
master_IPC_0207

搜索帮助