MCPcopy Create free account
hub / github.com/acl-dev/acl / check_member

Method check_member

lib_acl_cpp/src/serialize/gsoner.cpp:947–1245  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

945}
946
947bool gsoner::check_member(void)
948{
949 //struct user_t{int id;
950
951 if (status_ != e_struct_begin) {
952 return false;
953 }
954
955 std::string lines;
956 skip_space();
957
958 while (true) {
959 if(codes_[pos_] == '/') {
960 if(!check_comment()) {
961 throw syntax_error();
962 }
963 continue;
964 }
965
966 if (codes_[pos_] == '"') {
967 std::string str = get_static_string(codes_, pos_);
968 lines.push_back('"');
969 lines += str;
970 lines.push_back('"');
971 }
972
973 if(codes_[pos_] == ';') {
974 break;
975 }
976 lines.push_back(codes_[pos_]);
977 pos_++;
978 }
979 std::cout << current_obj_.name_ << " ";
980 std::cout << lines << std::endl;
981 //skip ;
982 pos_++;
983
984 //skip current field;
985 if (skip_) {
986 skip_ = false;
987 return true;
988 }
989 std::string name;
990 std::string types;
991 // remove assignment =,
992 if (lines.find('=') != std::string::npos) {
993 lines = lines.substr(0, lines.find('='));
994 }
995
996 int e = (int) lines.size() - 1;
997 while (lines[e] == ' ' ||
998 lines[e] == '\r' ||
999 lines[e] == '\n' ||
1000 lines[e] == '\t') {
1001
1002 e--;
1003 }
1004

Callers

nothing calls this directly

Calls 11

syntax_errorClass · 0.85
unsupported_typeClass · 0.85
substrMethod · 0.80
beginMethod · 0.80
push_backMethod · 0.45
findMethod · 0.45
sizeMethod · 0.45
endMethod · 0.45
clearMethod · 0.45
c_strMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected