"enum2string.h" #include <boost/preprocessor.hpp> #define X_DEFINE_ENUM_WITH_STRING_CONVERSIONS_TOSTRING_CASE(r, data, elem) \ caseelem :returnBOOST_PP_STRINGIZE(elem); #define DEFINE_ENUM_WITH_STRING_CONVERSIONS(name, enumerators) \ enumname { \ BOOST_PP_SEQ_ENUM(enumerators) \ }; \ ...
boolEnumFile(conststd::string&src_path,std::vector<std::string>*files_list){namespace fs=boost::filesystem;fs::pathroot_path(src_path);//判断路径是否存在,不存在,就没有必要往后走了if(!fs::exists(root_path)){std::cerr<<src_path<<"not exists"<<std::endl;returnfalse;}//定义一个空...
(start == std::string::npos || end == std::string::npos || start > end) { return false; } doc->title = read_data.substr(start, end - start); return true; } void ParserContent(const std::string& read_data, DocInfo* doc) { // 状态机 enum status { LABLE, // 标签状态 ...
异或加密是一种对称加密算法,通常用于加密二进制数据。异或操作的本质是对两个二进制数字进行比较,如果它们相同则返回0,如果不同则返回1。异或加密使用一把密钥将明文与密文进行异或运算,从而产生密文。同时,使用相同的密钥进行解密将返回原始的明文数据。在异或加密中,加密和解密使用的是相同的密钥。因此,它是一种对称...
#ifndef FND_STRUCT_HEADER_H#defineFND_STRUCT_HEADER_H#include<string>structHeader {intbodySize;inttype; };enumMessageType { MT_BIND_NAME=1,//{"name" : "abc"}MT_CHAT_INFO =2,//{"information" "what i say"}MT_ROOM_INFO =3,//{"name" : "abc", "information" : "what i say"}}...
constants.hpp: 定义了一个enum token_compress_mode_type erase.hpp: 提供了一组从string中移除字符和子串的方法,什么样的都有。 find.hpp: 提供了一组从string中寻找子串的方法,允许指定各种寻找子串的条作。 finder.hpp: 定义了一组生成string finder的方法 ...
enum 注:目前不包含 Set 类型。 这些派生类与基类的关系如下图: 针对Python 对象的封装,Boost.Python 提出了两个封装概念: ObjectWrapper 和 TypeWrapper,前者用于描述管理 Python 的对象,后者针对特定的 Python 对象进行优化和改进。 ObjectWrapper ObjectWrapper 定义了两个概念,用于描述管理 Python 地向的类,并且...
实现EnumFile函数来递归式的获取src_path路径下的HTML文档路径。在该函数的实现中,由于C++本身的文件系统不够完善,因此使用boost库中的文件系统filesystem来对文件进行操作。bool EnumFile(const std::string &src_path, std::vector<std::string> *files_list) { namespace fs = boost::filesystem; fs::path...
#include <boost/interprocess/sync/interprocess_mutex.hpp> #include <boost/interprocess/sync/interprocess_condition.hpp> struct trace_queue { enum { LineSize = 100 }; trace_queue() : message_in(false) {} //Mutex to protect access to the queue boost::interprocess::interprocess_mutex mutex; //...
BOOST_LOG_ATTRIBUTE_KEYWORD(a_channel,"Channel", std::string)//??? void init_file_collecting(boost::shared_ptr< file_sink > sink) { sink->locked_backend()->set_file_collector(sinks::file::make_collector( keywords::target ="logs",/*< the target directory >*/ keywords::max_...