Home | History | Annotate | Download | only in protobuf

Lines Matching refs:symbol

220 struct Symbol {
235 inline Symbol() : type(NULL_SYMBOL) { descriptor = NULL; }
246 inline explicit Symbol(const TYPE* value) { \
275 const Symbol kNullSymbol;
277 typedef hash_map<const char*, Symbol,
280 typedef hash_map<PointerStringPair, Symbol,
341 // Find symbols. This returns a null Symbol (symbol.IsNull() is true)
343 inline Symbol FindSymbol(const string& key) const;
347 // declaring Symbol in descriptor.h, which would drag all kinds of other
349 Symbol FindByNameHelper(
366 bool AddSymbol(const string& full_name, Symbol symbol);
439 // Find symbols. These return a null Symbol (symbol.IsNull() is true)
441 inline Symbol FindNestedSymbol(const void* parent,
443 inline Symbol FindNestedSymbolOfType(const void* parent,
445 const Symbol::Type type) const;
465 Symbol symbol);
546 inline Symbol DescriptorPool::Tables::FindSymbol(const string& key) const {
547 const Symbol* result = FindOrNull(symbols_by_name_, key.c_str());
555 inline Symbol FileDescriptorTables::FindNestedSymbol(
557 const Symbol* result =
566 inline Symbol FileDescriptorTables::FindNestedSymbolOfType(
567 const void* parent, const string& name, const Symbol::Type type) const {
568 Symbol result = FindNestedSymbol(parent, name);
573 Symbol DescriptorPool::Tables::FindByNameHelper(
576 Symbol result = FindSymbol(name);
579 // Symbol not found; check the underlay.
585 // Symbol still not found, so check fallback database.
638 const string& full_name, Symbol symbol) {
639 if (InsertIfNotPresent(&symbols_by_name_, full_name.c_str(), symbol)) {
648 const void* parent, const string& name, Symbol symbol) {
650 return InsertIfNotPresent(&symbols_by_parent_, by_parent_key, symbol);
888 Symbol result = tables_->FindSymbol(symbol_name);
896 Symbol result = tables_->FindSymbol(symbol_name);
904 Symbol result = tables_->FindByNameHelper(this, name);
905 return (result.type == Symbol
910 Symbol result = tables_->FindByNameHelper(this, name);
911 if (result.type == Symbol::FIELD &&
921 Symbol result = tables_->FindByNameHelper(this, name);
922 if (result.type == Symbol::FIELD &&
932 Symbol result = tables_->FindByNameHelper(this, name);
933 return (result.type == Symbol::ENUM) ? result.enum_descriptor : NULL;
938 Symbol result = tables_->FindByNameHelper(this, name);
939 return (result.type == Symbol::ENUM_VALUE) ?
945 Symbol result = tables_->FindByNameHelper(this, name);
946 return (result.type == Symbol::SERVICE) ? result.service_descriptor : NULL;
951 Symbol result = tables_->FindByNameHelper(this, name);
952 return (result.type == Symbol::METHOD) ? result.method_descriptor : NULL;
1040 Symbol result =
1041 file()->tables_->FindNestedSymbolOfType(this, key, Symbol::FIELD);
1051 Symbol result =
1052 file()->tables_->FindNestedSymbolOfType(this, key, Symbol::FIELD);
1084 Symbol result =
1085 file()->tables_->FindNestedSymbolOfType(this, key, Symbol::MESSAGE);
1095 Symbol result =
1096 file()->tables_->FindNestedSymbolOfType(this, key, Symbol::ENUM);
1106 Symbol result =
1107 file()->tables_->FindNestedSymbolOfType(this, key, Symbol::ENUM_VALUE);
1117 Symbol result =
1118 file()->tables_->FindNestedSymbolOfType(this, key, Symbol::ENUM_VALUE);
1133 Symbol result =
1134 file()->tables_->FindNestedSymbolOfType(this, key, Symbol::METHOD);
1144 Symbol result = tables_->FindNestedSymbolOfType(this, key, Symbol::MESSAGE);
1154 Symbol result = tables_->FindNestedSymbolOfType(this, key, Symbol::ENUM);
1164 Symbol result =
1165 tables_->FindNestedSymbolOfType(this, key, Symbol::ENUM_VALUE);
1175 Symbol result = tables_->FindNestedSymbolOfType(this, key, Symbol::SERVICE);
1185 Symbol result = tables_->FindNestedSymbolOfType(this, key, Symbol::FIELD);
1252 // symbol we're looking for. Some DescriptorDatabases return false
1861 // If LookupSymbol() finds a symbol that is in a file which is not a declared
1865 // possible_undeclared_dependency_name_ is the name of the symbol that was
1867 // of the symbol actually looked for.
1891 // - Insure that the resulting Symbol is from one of the file's declared
1893 Symbol FindSymbol(const string& name);
1895 // Like FindSymbol() but does not require that the symbol is in one of the
1897 Symbol FindSymbolNotEnforcingDeps(const string& name);
1899 // Like FindSymbol(), but looks up the name relative to some other symbol
1909 // any symbol is returned, or only symbols that are types. Note, however,
1910 // that LookupSymbol may still return a non-type symbol in LOOKUP_TYPES mode,
1912 // check that it receives the type of symbol it was expecting.
1921 Symbol LookupSymbol(const string& name, const string& relative_to,
1927 Symbol LookupSymbolNoPlaceholder(const string& name,
1933 Symbol NewPlaceholder(const string& name, PlaceholderType placeholder_type);
1944 const Message& proto, Symbol symbol);
1946 // Like AddSymbol(), but succeeds if the symbol is already defined as long
1949 // packgae to the symbol table (e.g. AddPackage("foo.bar", ...) will add
1954 // Checks that the symbol name contains only alphanumeric characters and
2258 Symbol DescriptorBuilder::FindSymbolNotEnforcingDeps(const string& name) {
2259 Symbol result;
2269 // symbol has to be in one of its file's direct dependencies, and we have
2280 Symbol DescriptorBuilder::FindSymbol(const string& name) {
2281 Symbol result = FindSymbolNotEnforcingDeps(name);
2296 if (result.type == Symbol::PACKAGE) {
2297 // Arg, this is overcomplicated. The symbol is a package name. It could
2303 // symbol unless none of the dependencies define it.
2319 Symbol DescriptorBuilder::LookupSymbolNoPlaceholder(
2362 Symbol result = FindSymbol(scope_to_try);
2365 // name is a compound symbol, of which we only found the first part.
2372 // We found a symbol but it's not an aggregate. Continue the loop.
2376 // We found a symbol but it's not a type. Continue the loop.
2388 Symbol DescriptorBuilder::LookupSymbol(
2391 Symbol result = LookupSymbolNoPlaceholder(
2401 Symbol DescriptorBuilder::NewPlaceholder(const string& name,
2471 return Symbol(placeholder_enum);
2497 return Symbol(placeholder_message);
2518 const Message& proto, Symbol symbol) {
2519 // If the caller passed NULL for the parent, the symbol is at file scope.
2523 if (tables_->AddSymbol(full_name, symbol)) {
2524 if (!file_tables_->AddAliasUnderParent(parent, name, symbol)) {
2545 // Symbol seems to have been defined in a different file.
2556 if (tables_->AddSymbol(name, Symbol(file))) {
2569 Symbol existing_symbol = tables_->FindSymbol(name);
2571 if (existing_symbol.type != Symbol::PACKAGE) {
2572 // Symbol seems to have been defined in a different file.
2770 // don't end up reporting that every single symbol is already defined.
2893 proto, Symbol(result));
3149 proto, Symbol(result));
3214 proto, Symbol(result));
3245 proto, Symbol(result));
3252 file_tables_->AddAliasUnderParent(parent, result->name(), Symbol(result));
3256 // but it did conflict with some other symbol defined in the enum type's
3308 proto, Symbol(result));
3336 proto, Symbol(result));
3396 Symbol extendee = LookupSymbol(proto.extendee(), field->full_name(),
3403 } else if (extendee.type != Symbol::MESSAGE) {
3428 Symbol type =
3441 // Choose field type based on symbol.
3442 if (type.type == Symbol::MESSAGE) {
3444 } else if (type.type == Symbol::ENUM) {
3455 if (type.type != Symbol::MESSAGE) {
3469 if (type.type != Symbol::ENUM) {
3487 Symbol default_value =
3491 if (default_value.type == Symbol::ENUM_VALUE &&
3589 Symbol input_type = LookupSymbol(proto.input_type(), method->full_name());
3594 } else if (input_type.type != Symbol::MESSAGE) {
3602 Symbol output_type = LookupSymbol(proto.output_type(), method->full_name());
3607 } else if (output_type.type != Symbol::MESSAGE) {
3760 const Symbol key_symbol = LookupSymbol(
3883 Symbol symbol = builder_->FindSymbolNotEnforcingDeps(
3885 if (!symbol.IsNull() && symbol.type == Symbol::MESSAGE) {
3886 options_descriptor = symbol.descriptor;
3918 Symbol symbol = builder_->LookupSymbol(name_part,
3920 if (!symbol.IsNull() && symbol.type == Symbol::FIELD) {
3921 field = symbol.field_descriptor;
4266 Symbol symbol =
4268 if (!symbol.IsNull() && symbol.type == Symbol::ENUM_VALUE) {
4269 if (symbol.enum_value_descriptor->type() != enum_type) {
4275 enum_value = symbol.enum_value_descriptor;