Commit 126082c3 authored by tanderson-google's avatar tanderson-google Committed by Adam Cozzette

Add std:: namespace prefix to set and map (#3332)

* Remove using std::{set,map}
parent b9c4daad
...@@ -677,7 +677,7 @@ void ConformanceTestSuite::SetFailureList(const string& filename, ...@@ -677,7 +677,7 @@ void ConformanceTestSuite::SetFailureList(const string& filename,
std::inserter(expected_to_fail_, expected_to_fail_.end())); std::inserter(expected_to_fail_, expected_to_fail_.end()));
} }
bool ConformanceTestSuite::CheckSetEmpty(const set<string>& set_to_check, bool ConformanceTestSuite::CheckSetEmpty(const std::set<string>& set_to_check,
const std::string& write_to_file, const std::string& write_to_file,
const std::string& msg) { const std::string& msg) {
if (set_to_check.empty()) { if (set_to_check.empty()) {
...@@ -685,7 +685,7 @@ bool ConformanceTestSuite::CheckSetEmpty(const set<string>& set_to_check, ...@@ -685,7 +685,7 @@ bool ConformanceTestSuite::CheckSetEmpty(const set<string>& set_to_check,
} else { } else {
StringAppendF(&output_, "\n"); StringAppendF(&output_, "\n");
StringAppendF(&output_, "%s\n\n", msg.c_str()); StringAppendF(&output_, "%s\n\n", msg.c_str());
for (set<string>::const_iterator iter = set_to_check.begin(); for (std::set<string>::const_iterator iter = set_to_check.begin();
iter != set_to_check.end(); ++iter) { iter != set_to_check.end(); ++iter) {
StringAppendF(&output_, " %s\n", iter->c_str()); StringAppendF(&output_, " %s\n", iter->c_str());
} }
...@@ -694,7 +694,7 @@ bool ConformanceTestSuite::CheckSetEmpty(const set<string>& set_to_check, ...@@ -694,7 +694,7 @@ bool ConformanceTestSuite::CheckSetEmpty(const set<string>& set_to_check,
if (!write_to_file.empty()) { if (!write_to_file.empty()) {
std::ofstream os(write_to_file); std::ofstream os(write_to_file);
if (os) { if (os) {
for (set<string>::const_iterator iter = set_to_check.begin(); for (std::set<string>::const_iterator iter = set_to_check.begin();
iter != set_to_check.end(); ++iter) { iter != set_to_check.end(); ++iter) {
os << *iter << "\n"; os << *iter << "\n";
} }
......
...@@ -205,7 +205,7 @@ class ConformanceTestSuite { ...@@ -205,7 +205,7 @@ class ConformanceTestSuite {
void TestValidDataForType( void TestValidDataForType(
google::protobuf::FieldDescriptor::Type, google::protobuf::FieldDescriptor::Type,
std::vector<std::pair<std::string, std::string>> values); std::vector<std::pair<std::string, std::string>> values);
bool CheckSetEmpty(const set<string>& set_to_check, bool CheckSetEmpty(const std::set<string>& set_to_check,
const std::string& write_to_file, const std::string& msg); const std::string& write_to_file, const std::string& msg);
ConformanceTestRunner* runner_; ConformanceTestRunner* runner_;
int successes_; int successes_;
......
...@@ -54,7 +54,7 @@ namespace compiler { ...@@ -54,7 +54,7 @@ namespace compiler {
namespace csharp { namespace csharp {
void FieldGeneratorBase::SetCommonFieldVariables( void FieldGeneratorBase::SetCommonFieldVariables(
map<string, string>* variables) { std::map<string, string>* variables) {
// Note: this will be valid even though the tag emitted for packed and unpacked versions of // Note: this will be valid even though the tag emitted for packed and unpacked versions of
// repeated fields varies by wire format. The wire format is encoded in the bottom 3 bits, which // repeated fields varies by wire format. The wire format is encoded in the bottom 3 bits, which
// never effects the tag size. // never effects the tag size.
...@@ -92,7 +92,7 @@ void FieldGeneratorBase::SetCommonFieldVariables( ...@@ -92,7 +92,7 @@ void FieldGeneratorBase::SetCommonFieldVariables(
} }
void FieldGeneratorBase::SetCommonOneofFieldVariables( void FieldGeneratorBase::SetCommonOneofFieldVariables(
map<string, string>* variables) { std::map<string, string>* variables) {
(*variables)["oneof_name"] = oneof_name(); (*variables)["oneof_name"] = oneof_name();
(*variables)["has_property_check"] = (*variables)["has_property_check"] =
oneof_name() + "Case_ == " + oneof_property_name() + oneof_name() + "Case_ == " + oneof_property_name() +
......
...@@ -66,14 +66,14 @@ class FieldGeneratorBase : public SourceGeneratorBase { ...@@ -66,14 +66,14 @@ class FieldGeneratorBase : public SourceGeneratorBase {
protected: protected:
const FieldDescriptor* descriptor_; const FieldDescriptor* descriptor_;
const int fieldOrdinal_; const int fieldOrdinal_;
map<string, string> variables_; std::map<string, string> variables_;
void AddDeprecatedFlag(io::Printer* printer); void AddDeprecatedFlag(io::Printer* printer);
void AddNullCheck(io::Printer* printer); void AddNullCheck(io::Printer* printer);
void AddNullCheck(io::Printer* printer, const std::string& name); void AddNullCheck(io::Printer* printer, const std::string& name);
void AddPublicMemberAttributes(io::Printer* printer); void AddPublicMemberAttributes(io::Printer* printer);
void SetCommonOneofFieldVariables(map<string, string>* variables); void SetCommonOneofFieldVariables(std::map<string, string>* variables);
std::string oneof_property_name(); std::string oneof_property_name();
std::string oneof_name(); std::string oneof_name();
...@@ -89,7 +89,7 @@ class FieldGeneratorBase : public SourceGeneratorBase { ...@@ -89,7 +89,7 @@ class FieldGeneratorBase : public SourceGeneratorBase {
std::string capitalized_type_name(); std::string capitalized_type_name();
private: private:
void SetCommonFieldVariables(map<string, string>* variables); void SetCommonFieldVariables(std::map<string, string>* variables);
std::string GetStringDefaultValueInternal(); std::string GetStringDefaultValueInternal();
std::string GetBytesDefaultValueInternal(); std::string GetBytesDefaultValueInternal();
......
...@@ -105,7 +105,7 @@ void MessageGenerator::AddDeprecatedFlag(io::Printer* printer) { ...@@ -105,7 +105,7 @@ void MessageGenerator::AddDeprecatedFlag(io::Printer* printer) {
} }
void MessageGenerator::Generate(io::Printer* printer) { void MessageGenerator::Generate(io::Printer* printer) {
map<string, string> vars; std::map<string, string> vars;
vars["class_name"] = class_name(); vars["class_name"] = class_name();
vars["access_level"] = class_access_level(); vars["access_level"] = class_access_level();
...@@ -280,7 +280,7 @@ bool MessageGenerator::HasNestedGeneratedTypes() ...@@ -280,7 +280,7 @@ bool MessageGenerator::HasNestedGeneratedTypes()
} }
void MessageGenerator::GenerateCloningCode(io::Printer* printer) { void MessageGenerator::GenerateCloningCode(io::Printer* printer) {
map<string, string> vars; std::map<string, string> vars;
WriteGeneratedCodeAttributes(printer); WriteGeneratedCodeAttributes(printer);
vars["class_name"] = class_name(); vars["class_name"] = class_name();
printer->Print( printer->Print(
...@@ -333,7 +333,7 @@ void MessageGenerator::GenerateFreezingCode(io::Printer* printer) { ...@@ -333,7 +333,7 @@ void MessageGenerator::GenerateFreezingCode(io::Printer* printer) {
} }
void MessageGenerator::GenerateFrameworkMethods(io::Printer* printer) { void MessageGenerator::GenerateFrameworkMethods(io::Printer* printer) {
map<string, string> vars; std::map<string, string> vars;
vars["class_name"] = class_name(); vars["class_name"] = class_name();
// Equality // Equality
...@@ -432,7 +432,7 @@ void MessageGenerator::GenerateMergingMethods(io::Printer* printer) { ...@@ -432,7 +432,7 @@ void MessageGenerator::GenerateMergingMethods(io::Printer* printer) {
// Note: These are separate from GenerateMessageSerializationMethods() // Note: These are separate from GenerateMessageSerializationMethods()
// because they need to be generated even for messages that are optimized // because they need to be generated even for messages that are optimized
// for code size. // for code size.
map<string, string> vars; std::map<string, string> vars;
vars["class_name"] = class_name(); vars["class_name"] = class_name();
WriteGeneratedCodeAttributes(printer); WriteGeneratedCodeAttributes(printer);
......
...@@ -52,7 +52,7 @@ namespace { ...@@ -52,7 +52,7 @@ namespace {
// TODO(kenton): Factor out a "SetCommonFieldVariables()" to get rid of // TODO(kenton): Factor out a "SetCommonFieldVariables()" to get rid of
// repeat code between this and the other field types. // repeat code between this and the other field types.
void SetEnumVariables(const Params& params, void SetEnumVariables(const Params& params,
const FieldDescriptor* descriptor, map<string, string>* variables) { const FieldDescriptor* descriptor, std::map<string, string>* variables) {
(*variables)["name"] = (*variables)["name"] =
RenameJavaKeywords(UnderscoresToCamelCase(descriptor)); RenameJavaKeywords(UnderscoresToCamelCase(descriptor));
(*variables)["capitalized_name"] = (*variables)["capitalized_name"] =
......
...@@ -62,7 +62,7 @@ class EnumFieldGenerator : public FieldGenerator { ...@@ -62,7 +62,7 @@ class EnumFieldGenerator : public FieldGenerator {
private: private:
const FieldDescriptor* descriptor_; const FieldDescriptor* descriptor_;
map<string, string> variables_; std::map<string, string> variables_;
vector<string> canonical_values_; vector<string> canonical_values_;
GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(EnumFieldGenerator); GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(EnumFieldGenerator);
...@@ -85,7 +85,7 @@ class AccessorEnumFieldGenerator : public FieldGenerator { ...@@ -85,7 +85,7 @@ class AccessorEnumFieldGenerator : public FieldGenerator {
private: private:
const FieldDescriptor* descriptor_; const FieldDescriptor* descriptor_;
map<string, string> variables_; std::map<string, string> variables_;
vector<string> canonical_values_; vector<string> canonical_values_;
GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(AccessorEnumFieldGenerator); GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(AccessorEnumFieldGenerator);
...@@ -112,7 +112,7 @@ class RepeatedEnumFieldGenerator : public FieldGenerator { ...@@ -112,7 +112,7 @@ class RepeatedEnumFieldGenerator : public FieldGenerator {
void GenerateRepeatedDataSizeCode(io::Printer* printer) const; void GenerateRepeatedDataSizeCode(io::Printer* printer) const;
const FieldDescriptor* descriptor_; const FieldDescriptor* descriptor_;
map<string, string> variables_; std::map<string, string> variables_;
vector<string> canonical_values_; vector<string> canonical_values_;
GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(RepeatedEnumFieldGenerator); GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(RepeatedEnumFieldGenerator);
......
...@@ -78,7 +78,7 @@ const char* GetTypeConstantName(const FieldDescriptor::Type type) { ...@@ -78,7 +78,7 @@ const char* GetTypeConstantName(const FieldDescriptor::Type type) {
} // namespace } // namespace
void SetVariables(const FieldDescriptor* descriptor, const Params params, void SetVariables(const FieldDescriptor* descriptor, const Params params,
map<string, string>* variables) { std::map<string, string>* variables) {
(*variables)["extends"] = ClassName(params, descriptor->containing_type()); (*variables)["extends"] = ClassName(params, descriptor->containing_type());
(*variables)["name"] = RenameJavaKeywords(UnderscoresToCamelCase(descriptor)); (*variables)["name"] = RenameJavaKeywords(UnderscoresToCamelCase(descriptor));
bool repeated = descriptor->is_repeated(); bool repeated = descriptor->is_repeated();
......
...@@ -61,7 +61,7 @@ class ExtensionGenerator { ...@@ -61,7 +61,7 @@ class ExtensionGenerator {
private: private:
const Params& params_; const Params& params_;
const FieldDescriptor* descriptor_; const FieldDescriptor* descriptor_;
map<string, string> variables_; std::map<string, string> variables_;
GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(ExtensionGenerator); GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(ExtensionGenerator);
}; };
......
...@@ -151,7 +151,7 @@ const FieldGenerator& FieldGeneratorMap::get( ...@@ -151,7 +151,7 @@ const FieldGenerator& FieldGeneratorMap::get(
} }
void SetCommonOneofVariables(const FieldDescriptor* descriptor, void SetCommonOneofVariables(const FieldDescriptor* descriptor,
map<string, string>* variables) { std::map<string, string>* variables) {
(*variables)["oneof_name"] = (*variables)["oneof_name"] =
UnderscoresToCamelCase(descriptor->containing_oneof()); UnderscoresToCamelCase(descriptor->containing_oneof());
(*variables)["oneof_capitalized_name"] = (*variables)["oneof_capitalized_name"] =
...@@ -169,7 +169,7 @@ void SetCommonOneofVariables(const FieldDescriptor* descriptor, ...@@ -169,7 +169,7 @@ void SetCommonOneofVariables(const FieldDescriptor* descriptor,
} }
void GenerateOneofFieldEquals(const FieldDescriptor* descriptor, void GenerateOneofFieldEquals(const FieldDescriptor* descriptor,
const map<string, string>& variables, const std::map<string, string>& variables,
io::Printer* printer) { io::Printer* printer) {
if (GetJavaType(descriptor) == JAVATYPE_BYTES) { if (GetJavaType(descriptor) == JAVATYPE_BYTES) {
printer->Print(variables, printer->Print(variables,
...@@ -190,7 +190,7 @@ void GenerateOneofFieldEquals(const FieldDescriptor* descriptor, ...@@ -190,7 +190,7 @@ void GenerateOneofFieldEquals(const FieldDescriptor* descriptor,
} }
void GenerateOneofFieldHashCode(const FieldDescriptor* descriptor, void GenerateOneofFieldHashCode(const FieldDescriptor* descriptor,
const map<string, string>& variables, const std::map<string, string>& variables,
io::Printer* printer) { io::Printer* printer) {
if (GetJavaType(descriptor) == JAVATYPE_BYTES) { if (GetJavaType(descriptor) == JAVATYPE_BYTES) {
printer->Print(variables, printer->Print(variables,
......
...@@ -114,12 +114,12 @@ class FieldGeneratorMap { ...@@ -114,12 +114,12 @@ class FieldGeneratorMap {
}; };
void SetCommonOneofVariables(const FieldDescriptor* descriptor, void SetCommonOneofVariables(const FieldDescriptor* descriptor,
map<string, string>* variables); std::map<string, string>* variables);
void GenerateOneofFieldEquals(const FieldDescriptor* descriptor, void GenerateOneofFieldEquals(const FieldDescriptor* descriptor,
const map<string, string>& variables, const std::map<string, string>& variables,
io::Printer* printer); io::Printer* printer);
void GenerateOneofFieldHashCode(const FieldDescriptor* descriptor, void GenerateOneofFieldHashCode(const FieldDescriptor* descriptor,
const map<string, string>& variables, const std::map<string, string>& variables,
io::Printer* printer); io::Printer* printer);
} // namespace javanano } // namespace javanano
......
...@@ -567,7 +567,7 @@ string GenerateDifferentBit(int bit_index) { ...@@ -567,7 +567,7 @@ string GenerateDifferentBit(int bit_index) {
} }
void SetBitOperationVariables(const string name, void SetBitOperationVariables(const string name,
int bitIndex, map<string, string>* variables) { int bitIndex, std::map<string, string>* variables) {
(*variables)["get_" + name] = GenerateGetBit(bitIndex); (*variables)["get_" + name] = GenerateGetBit(bitIndex);
(*variables)["set_" + name] = GenerateSetBit(bitIndex); (*variables)["set_" + name] = GenerateSetBit(bitIndex);
(*variables)["clear_" + name] = GenerateClearBit(bitIndex); (*variables)["clear_" + name] = GenerateClearBit(bitIndex);
......
...@@ -181,7 +181,7 @@ string GenerateDifferentBit(int bit_index); ...@@ -181,7 +181,7 @@ string GenerateDifferentBit(int bit_index);
// the given name of the bit, to the appropriate Java expressions for the given // the given name of the bit, to the appropriate Java expressions for the given
// bit index. // bit index.
void SetBitOperationVariables(const string name, void SetBitOperationVariables(const string name,
int bitIndex, map<string, string>* variables); int bitIndex, std::map<string, string>* variables);
inline bool IsMapEntry(const Descriptor* descriptor) { inline bool IsMapEntry(const Descriptor* descriptor) {
// TODO(liujisi): Add an option to turn on maps for proto2 syntax as well. // TODO(liujisi): Add an option to turn on maps for proto2 syntax as well.
......
...@@ -84,7 +84,7 @@ const FieldDescriptor* ValueField(const FieldDescriptor* descriptor) { ...@@ -84,7 +84,7 @@ const FieldDescriptor* ValueField(const FieldDescriptor* descriptor) {
} }
void SetMapVariables(const Params& params, void SetMapVariables(const Params& params,
const FieldDescriptor* descriptor, map<string, string>* variables) { const FieldDescriptor* descriptor, std::map<string, string>* variables) {
const FieldDescriptor* key = KeyField(descriptor); const FieldDescriptor* key = KeyField(descriptor);
const FieldDescriptor* value = ValueField(descriptor); const FieldDescriptor* value = ValueField(descriptor);
(*variables)["name"] = (*variables)["name"] =
......
...@@ -58,7 +58,7 @@ class MapFieldGenerator : public FieldGenerator { ...@@ -58,7 +58,7 @@ class MapFieldGenerator : public FieldGenerator {
private: private:
const FieldDescriptor* descriptor_; const FieldDescriptor* descriptor_;
map<string, string> variables_; std::map<string, string> variables_;
GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(MapFieldGenerator); GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(MapFieldGenerator);
}; };
......
...@@ -182,7 +182,7 @@ void MessageGenerator::Generate(io::Printer* printer) { ...@@ -182,7 +182,7 @@ void MessageGenerator::Generate(io::Printer* printer) {
} }
// oneof // oneof
map<string, string> vars; std::map<string, string> vars;
vars["message_name"] = descriptor_->name(); vars["message_name"] = descriptor_->name();
for (int i = 0; i < descriptor_->oneof_decl_count(); i++) { for (int i = 0; i < descriptor_->oneof_decl_count(); i++) {
const OneofDescriptor* oneof_desc = descriptor_->oneof_decl(i); const OneofDescriptor* oneof_desc = descriptor_->oneof_decl(i);
......
...@@ -54,7 +54,7 @@ namespace { ...@@ -54,7 +54,7 @@ namespace {
// TODO(kenton): Factor out a "SetCommonFieldVariables()" to get rid of // TODO(kenton): Factor out a "SetCommonFieldVariables()" to get rid of
// repeat code between this and the other field types. // repeat code between this and the other field types.
void SetMessageVariables(const Params& params, void SetMessageVariables(const Params& params,
const FieldDescriptor* descriptor, map<string, string>* variables) { const FieldDescriptor* descriptor, std::map<string, string>* variables) {
(*variables)["name"] = (*variables)["name"] =
RenameJavaKeywords(UnderscoresToCamelCase(descriptor)); RenameJavaKeywords(UnderscoresToCamelCase(descriptor));
(*variables)["capitalized_name"] = (*variables)["capitalized_name"] =
......
...@@ -62,7 +62,7 @@ class MessageFieldGenerator : public FieldGenerator { ...@@ -62,7 +62,7 @@ class MessageFieldGenerator : public FieldGenerator {
private: private:
const FieldDescriptor* descriptor_; const FieldDescriptor* descriptor_;
map<string, string> variables_; std::map<string, string> variables_;
GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(MessageFieldGenerator); GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(MessageFieldGenerator);
}; };
...@@ -85,7 +85,7 @@ class MessageOneofFieldGenerator : public FieldGenerator { ...@@ -85,7 +85,7 @@ class MessageOneofFieldGenerator : public FieldGenerator {
private: private:
const FieldDescriptor* descriptor_; const FieldDescriptor* descriptor_;
map<string, string> variables_; std::map<string, string> variables_;
GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(MessageOneofFieldGenerator); GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(MessageOneofFieldGenerator);
}; };
...@@ -108,7 +108,7 @@ class RepeatedMessageFieldGenerator : public FieldGenerator { ...@@ -108,7 +108,7 @@ class RepeatedMessageFieldGenerator : public FieldGenerator {
private: private:
const FieldDescriptor* descriptor_; const FieldDescriptor* descriptor_;
map<string, string> variables_; std::map<string, string> variables_;
GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(RepeatedMessageFieldGenerator); GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(RepeatedMessageFieldGenerator);
}; };
......
...@@ -47,8 +47,8 @@ enum eMultipleFiles { JAVANANO_MUL_UNSET, JAVANANO_MUL_FALSE, JAVANANO_MUL_TRUE ...@@ -47,8 +47,8 @@ enum eMultipleFiles { JAVANANO_MUL_UNSET, JAVANANO_MUL_FALSE, JAVANANO_MUL_TRUE
// Parameters for used by the generators // Parameters for used by the generators
class Params { class Params {
public: public:
typedef map<string, string> NameMap; typedef std::map<string, string> NameMap;
typedef set<string> NameSet; typedef std::set<string> NameSet;
private: private:
string empty_; string empty_;
string base_name_; string base_name_;
......
...@@ -166,7 +166,7 @@ bool AllAscii(const string& text) { ...@@ -166,7 +166,7 @@ bool AllAscii(const string& text) {
void SetPrimitiveVariables(const FieldDescriptor* descriptor, const Params params, void SetPrimitiveVariables(const FieldDescriptor* descriptor, const Params params,
map<string, string>* variables) { std::map<string, string>* variables) {
(*variables)["name"] = (*variables)["name"] =
RenameJavaKeywords(UnderscoresToCamelCase(descriptor)); RenameJavaKeywords(UnderscoresToCamelCase(descriptor));
(*variables)["capitalized_name"] = (*variables)["capitalized_name"] =
......
...@@ -65,7 +65,7 @@ class PrimitiveFieldGenerator : public FieldGenerator { ...@@ -65,7 +65,7 @@ class PrimitiveFieldGenerator : public FieldGenerator {
void GenerateSerializationConditional(io::Printer* printer) const; void GenerateSerializationConditional(io::Printer* printer) const;
const FieldDescriptor* descriptor_; const FieldDescriptor* descriptor_;
map<string, string> variables_; std::map<string, string> variables_;
GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(PrimitiveFieldGenerator); GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(PrimitiveFieldGenerator);
}; };
...@@ -89,7 +89,7 @@ class AccessorPrimitiveFieldGenerator : public FieldGenerator { ...@@ -89,7 +89,7 @@ class AccessorPrimitiveFieldGenerator : public FieldGenerator {
private: private:
const FieldDescriptor* descriptor_; const FieldDescriptor* descriptor_;
map<string, string> variables_; std::map<string, string> variables_;
GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(AccessorPrimitiveFieldGenerator); GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(AccessorPrimitiveFieldGenerator);
}; };
...@@ -111,7 +111,7 @@ class PrimitiveOneofFieldGenerator : public FieldGenerator { ...@@ -111,7 +111,7 @@ class PrimitiveOneofFieldGenerator : public FieldGenerator {
private: private:
const FieldDescriptor* descriptor_; const FieldDescriptor* descriptor_;
map<string, string> variables_; std::map<string, string> variables_;
GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(PrimitiveOneofFieldGenerator); GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(PrimitiveOneofFieldGenerator);
}; };
...@@ -137,7 +137,7 @@ class RepeatedPrimitiveFieldGenerator : public FieldGenerator { ...@@ -137,7 +137,7 @@ class RepeatedPrimitiveFieldGenerator : public FieldGenerator {
void GenerateRepeatedDataSizeCode(io::Printer* printer) const; void GenerateRepeatedDataSizeCode(io::Printer* printer) const;
const FieldDescriptor* descriptor_; const FieldDescriptor* descriptor_;
map<string, string> variables_; std::map<string, string> variables_;
GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(RepeatedPrimitiveFieldGenerator); GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(RepeatedPrimitiveFieldGenerator);
}; };
......
...@@ -46,7 +46,7 @@ namespace objectivec { ...@@ -46,7 +46,7 @@ namespace objectivec {
namespace { namespace {
void SetEnumVariables(const FieldDescriptor* descriptor, void SetEnumVariables(const FieldDescriptor* descriptor,
map<string, string>* variables) { std::map<string, string>* variables) {
string type = EnumName(descriptor->enum_type()); string type = EnumName(descriptor->enum_type());
(*variables)["storage_type"] = type; (*variables)["storage_type"] = type;
// For non repeated fields, if it was defined in a different file, the // For non repeated fields, if it was defined in a different file, the
...@@ -118,7 +118,7 @@ void EnumFieldGenerator::GenerateCFunctionImplementations( ...@@ -118,7 +118,7 @@ void EnumFieldGenerator::GenerateCFunctionImplementations(
} }
void EnumFieldGenerator::DetermineForwardDeclarations( void EnumFieldGenerator::DetermineForwardDeclarations(
set<string>* fwd_decls) const { std::set<string>* fwd_decls) const {
SingleFieldGenerator::DetermineForwardDeclarations(fwd_decls); SingleFieldGenerator::DetermineForwardDeclarations(fwd_decls);
// If it is an enum defined in a different file, then we'll need a forward // If it is an enum defined in a different file, then we'll need a forward
// declaration for it. When it is in our file, all the enums are output // declaration for it. When it is in our file, all the enums are output
......
...@@ -47,7 +47,7 @@ class EnumFieldGenerator : public SingleFieldGenerator { ...@@ -47,7 +47,7 @@ class EnumFieldGenerator : public SingleFieldGenerator {
public: public:
virtual void GenerateCFunctionDeclarations(io::Printer* printer) const; virtual void GenerateCFunctionDeclarations(io::Printer* printer) const;
virtual void GenerateCFunctionImplementations(io::Printer* printer) const; virtual void GenerateCFunctionImplementations(io::Printer* printer) const;
virtual void DetermineForwardDeclarations(set<string>* fwd_decls) const; virtual void DetermineForwardDeclarations(std::set<string>* fwd_decls) const;
protected: protected:
EnumFieldGenerator(const FieldDescriptor* descriptor, const Options& options); EnumFieldGenerator(const FieldDescriptor* descriptor, const Options& options);
......
...@@ -59,7 +59,7 @@ ExtensionGenerator::ExtensionGenerator(const string& root_class_name, ...@@ -59,7 +59,7 @@ ExtensionGenerator::ExtensionGenerator(const string& root_class_name,
ExtensionGenerator::~ExtensionGenerator() {} ExtensionGenerator::~ExtensionGenerator() {}
void ExtensionGenerator::GenerateMembersHeader(io::Printer* printer) { void ExtensionGenerator::GenerateMembersHeader(io::Printer* printer) {
map<string, string> vars; std::map<string, string> vars;
vars["method_name"] = method_name_; vars["method_name"] = method_name_;
SourceLocation location; SourceLocation location;
if (descriptor_->GetSourceLocation(&location)) { if (descriptor_->GetSourceLocation(&location)) {
...@@ -77,7 +77,7 @@ void ExtensionGenerator::GenerateMembersHeader(io::Printer* printer) { ...@@ -77,7 +77,7 @@ void ExtensionGenerator::GenerateMembersHeader(io::Printer* printer) {
void ExtensionGenerator::GenerateStaticVariablesInitialization( void ExtensionGenerator::GenerateStaticVariablesInitialization(
io::Printer* printer) { io::Printer* printer) {
map<string, string> vars; std::map<string, string> vars;
vars["root_class_and_method_name"] = root_class_and_method_name_; vars["root_class_and_method_name"] = root_class_and_method_name_;
vars["extended_type"] = ClassName(descriptor_->containing_type()); vars["extended_type"] = ClassName(descriptor_->containing_type());
vars["number"] = SimpleItoa(descriptor_->number()); vars["number"] = SimpleItoa(descriptor_->number());
......
...@@ -49,7 +49,7 @@ namespace objectivec { ...@@ -49,7 +49,7 @@ namespace objectivec {
namespace { namespace {
void SetCommonFieldVariables(const FieldDescriptor* descriptor, void SetCommonFieldVariables(const FieldDescriptor* descriptor,
map<string, string>* variables) { std::map<string, string>* variables) {
string camel_case_name = FieldName(descriptor); string camel_case_name = FieldName(descriptor);
string raw_field_name; string raw_field_name;
if (descriptor->type() == FieldDescriptor::TYPE_GROUP) { if (descriptor->type() == FieldDescriptor::TYPE_GROUP) {
...@@ -178,7 +178,7 @@ void FieldGenerator::GenerateCFunctionImplementations( ...@@ -178,7 +178,7 @@ void FieldGenerator::GenerateCFunctionImplementations(
} }
void FieldGenerator::DetermineForwardDeclarations( void FieldGenerator::DetermineForwardDeclarations(
set<string>* fwd_decls) const { std::set<string>* fwd_decls) const {
// Nothing // Nothing
} }
......
...@@ -67,7 +67,7 @@ class FieldGenerator { ...@@ -67,7 +67,7 @@ class FieldGenerator {
virtual void GenerateCFunctionImplementations(io::Printer* printer) const; virtual void GenerateCFunctionImplementations(io::Printer* printer) const;
// Exposed for subclasses, should always call it on the parent class also. // Exposed for subclasses, should always call it on the parent class also.
virtual void DetermineForwardDeclarations(set<string>* fwd_decls) const; virtual void DetermineForwardDeclarations(std::set<string>* fwd_decls) const;
// Used during generation, not intended to be extended by subclasses. // Used during generation, not intended to be extended by subclasses.
void GenerateFieldDescription( void GenerateFieldDescription(
...@@ -100,7 +100,7 @@ class FieldGenerator { ...@@ -100,7 +100,7 @@ class FieldGenerator {
virtual bool WantsHasProperty(void) const = 0; virtual bool WantsHasProperty(void) const = 0;
const FieldDescriptor* descriptor_; const FieldDescriptor* descriptor_;
map<string, string> variables_; std::map<string, string> variables_;
private: private:
GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(FieldGenerator); GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(FieldGenerator);
......
...@@ -89,7 +89,7 @@ bool FileContainsExtensions(const FileDescriptor* file) { ...@@ -89,7 +89,7 @@ bool FileContainsExtensions(const FileDescriptor* file) {
void PruneFileAndDepsMarkingAsVisited( void PruneFileAndDepsMarkingAsVisited(
const FileDescriptor* file, const FileDescriptor* file,
vector<const FileDescriptor*>* files, vector<const FileDescriptor*>* files,
set<const FileDescriptor*>* files_visited) { std::set<const FileDescriptor*>* files_visited) {
vector<const FileDescriptor*>::iterator iter = vector<const FileDescriptor*>::iterator iter =
std::find(files->begin(), files->end(), file); std::find(files->begin(), files->end(), file);
if (iter != files->end()) { if (iter != files->end()) {
...@@ -105,7 +105,7 @@ void PruneFileAndDepsMarkingAsVisited( ...@@ -105,7 +105,7 @@ void PruneFileAndDepsMarkingAsVisited(
void CollectMinimalFileDepsContainingExtensionsWorker( void CollectMinimalFileDepsContainingExtensionsWorker(
const FileDescriptor* file, const FileDescriptor* file,
vector<const FileDescriptor*>* files, vector<const FileDescriptor*>* files,
set<const FileDescriptor*>* files_visited) { std::set<const FileDescriptor*>* files_visited) {
if (files_visited->find(file) != files_visited->end()) { if (files_visited->find(file) != files_visited->end()) {
return; return;
} }
...@@ -138,7 +138,7 @@ void CollectMinimalFileDepsContainingExtensionsWorker( ...@@ -138,7 +138,7 @@ void CollectMinimalFileDepsContainingExtensionsWorker(
void CollectMinimalFileDepsContainingExtensions( void CollectMinimalFileDepsContainingExtensions(
const FileDescriptor* file, const FileDescriptor* file,
vector<const FileDescriptor*>* files) { vector<const FileDescriptor*>* files) {
set<const FileDescriptor*> files_visited; std::set<const FileDescriptor*> files_visited;
for (int i = 0; i < file->dependency_count(); i++) { for (int i = 0; i < file->dependency_count(); i++) {
const FileDescriptor* dep = file->dependency(i); const FileDescriptor* dep = file->dependency(i);
CollectMinimalFileDepsContainingExtensionsWorker(dep, files, CollectMinimalFileDepsContainingExtensionsWorker(dep, files,
...@@ -229,12 +229,12 @@ void FileGenerator::GenerateHeader(io::Printer *printer) { ...@@ -229,12 +229,12 @@ void FileGenerator::GenerateHeader(io::Printer *printer) {
"CF_EXTERN_C_BEGIN\n" "CF_EXTERN_C_BEGIN\n"
"\n"); "\n");
set<string> fwd_decls; std::set<string> fwd_decls;
for (vector<MessageGenerator *>::iterator iter = message_generators_.begin(); for (vector<MessageGenerator *>::iterator iter = message_generators_.begin();
iter != message_generators_.end(); ++iter) { iter != message_generators_.end(); ++iter) {
(*iter)->DetermineForwardDeclarations(&fwd_decls); (*iter)->DetermineForwardDeclarations(&fwd_decls);
} }
for (set<string>::const_iterator i(fwd_decls.begin()); for (std::set<string>::const_iterator i(fwd_decls.begin());
i != fwd_decls.end(); ++i) { i != fwd_decls.end(); ++i) {
printer->Print("$value$;\n", "value", *i); printer->Print("$value$;\n", "value", *i);
} }
...@@ -325,7 +325,7 @@ void FileGenerator::GenerateSource(io::Printer *printer) { ...@@ -325,7 +325,7 @@ void FileGenerator::GenerateSource(io::Printer *printer) {
// #import the headers for anything that a plain dependency of this proto // #import the headers for anything that a plain dependency of this proto
// file (that means they were just an include, not a "public" include). // file (that means they were just an include, not a "public" include).
set<string> public_import_names; std::set<string> public_import_names;
for (int i = 0; i < file_->public_dependency_count(); i++) { for (int i = 0; i < file_->public_dependency_count(); i++) {
public_import_names.insert(file_->public_dependency(i)->name()); public_import_names.insert(file_->public_dependency(i)->name());
} }
...@@ -468,7 +468,7 @@ void FileGenerator::GenerateSource(io::Printer *printer) { ...@@ -468,7 +468,7 @@ void FileGenerator::GenerateSource(io::Printer *printer) {
// File descriptor only needed if there are messages to use it. // File descriptor only needed if there are messages to use it.
if (message_generators_.size() > 0) { if (message_generators_.size() > 0) {
map<string, string> vars; std::map<string, string> vars;
vars["root_class_name"] = root_class_name_; vars["root_class_name"] = root_class_name_;
vars["package"] = file_->package(); vars["package"] = file_->package();
vars["objc_prefix"] = FileClassPrefix(file_); vars["objc_prefix"] = FileClassPrefix(file_);
......
...@@ -980,13 +980,13 @@ namespace { ...@@ -980,13 +980,13 @@ namespace {
class ExpectedPrefixesCollector : public LineConsumer { class ExpectedPrefixesCollector : public LineConsumer {
public: public:
ExpectedPrefixesCollector(map<string, string>* inout_package_to_prefix_map) ExpectedPrefixesCollector(std::map<string, string>* inout_package_to_prefix_map)
: prefix_map_(inout_package_to_prefix_map) {} : prefix_map_(inout_package_to_prefix_map) {}
virtual bool ConsumeLine(const StringPiece& line, string* out_error); virtual bool ConsumeLine(const StringPiece& line, string* out_error);
private: private:
map<string, string>* prefix_map_; std::map<string, string>* prefix_map_;
}; };
bool ExpectedPrefixesCollector::ConsumeLine( bool ExpectedPrefixesCollector::ConsumeLine(
...@@ -1009,7 +1009,7 @@ bool ExpectedPrefixesCollector::ConsumeLine( ...@@ -1009,7 +1009,7 @@ bool ExpectedPrefixesCollector::ConsumeLine(
} }
bool LoadExpectedPackagePrefixes(const Options &generation_options, bool LoadExpectedPackagePrefixes(const Options &generation_options,
map<string, string>* prefix_map, std::map<string, string>* prefix_map,
string* out_error) { string* out_error) {
if (generation_options.expected_prefixes_path.empty()) { if (generation_options.expected_prefixes_path.empty()) {
return true; return true;
...@@ -1023,7 +1023,7 @@ bool LoadExpectedPackagePrefixes(const Options &generation_options, ...@@ -1023,7 +1023,7 @@ bool LoadExpectedPackagePrefixes(const Options &generation_options,
bool ValidateObjCClassPrefix( bool ValidateObjCClassPrefix(
const FileDescriptor* file, const FileDescriptor* file,
const string& expected_prefixes_path, const string& expected_prefixes_path,
const map<string, string>& expected_package_prefixes, const std::map<string, string>& expected_package_prefixes,
string* out_error) { string* out_error) {
const string prefix = file->options().objc_class_prefix(); const string prefix = file->options().objc_class_prefix();
const string package = file->package(); const string package = file->package();
...@@ -1033,7 +1033,7 @@ bool ValidateObjCClassPrefix( ...@@ -1033,7 +1033,7 @@ bool ValidateObjCClassPrefix(
// Check: Error - See if there was an expected prefix for the package and // Check: Error - See if there was an expected prefix for the package and
// report if it doesn't match (wrong or missing). // report if it doesn't match (wrong or missing).
map<string, string>::const_iterator package_match = std::map<string, string>::const_iterator package_match =
expected_package_prefixes.find(package); expected_package_prefixes.find(package);
if (package_match != expected_package_prefixes.end()) { if (package_match != expected_package_prefixes.end()) {
// There was an entry, and... // There was an entry, and...
...@@ -1082,7 +1082,7 @@ bool ValidateObjCClassPrefix( ...@@ -1082,7 +1082,7 @@ bool ValidateObjCClassPrefix(
// Look for any other package that uses the same prefix. // Look for any other package that uses the same prefix.
string other_package_for_prefix; string other_package_for_prefix;
for (map<string, string>::const_iterator i = expected_package_prefixes.begin(); for (std::map<string, string>::const_iterator i = expected_package_prefixes.begin();
i != expected_package_prefixes.end(); ++i) { i != expected_package_prefixes.end(); ++i) {
if (i->second == prefix) { if (i->second == prefix) {
other_package_for_prefix = i->first; other_package_for_prefix = i->first;
...@@ -1150,7 +1150,7 @@ bool ValidateObjCClassPrefixes(const vector<const FileDescriptor*>& files, ...@@ -1150,7 +1150,7 @@ bool ValidateObjCClassPrefixes(const vector<const FileDescriptor*>& files,
const Options& generation_options, const Options& generation_options,
string* out_error) { string* out_error) {
// Load the expected package prefixes, if available, to validate against. // Load the expected package prefixes, if available, to validate against.
map<string, string> expected_package_prefixes; std::map<string, string> expected_package_prefixes;
if (!LoadExpectedPackagePrefixes(generation_options, if (!LoadExpectedPackagePrefixes(generation_options,
&expected_package_prefixes, &expected_package_prefixes,
out_error)) { out_error)) {
...@@ -1519,7 +1519,7 @@ void ImportWriter::AddFile(const FileDescriptor* file, ...@@ -1519,7 +1519,7 @@ void ImportWriter::AddFile(const FileDescriptor* file,
ParseFrameworkMappings(); ParseFrameworkMappings();
} }
map<string, string>::iterator proto_lookup = std::map<string, string>::iterator proto_lookup =
proto_file_to_framework_name_.find(file->name()); proto_file_to_framework_name_.find(file->name());
if (proto_lookup != proto_file_to_framework_name_.end()) { if (proto_lookup != proto_file_to_framework_name_.end()) {
other_framework_imports_.push_back( other_framework_imports_.push_back(
...@@ -1640,7 +1640,7 @@ bool ImportWriter::ProtoFrameworkCollector::ConsumeLine( ...@@ -1640,7 +1640,7 @@ bool ImportWriter::ProtoFrameworkCollector::ConsumeLine(
StringPiece proto_file(proto_file_list, start, offset - start); StringPiece proto_file(proto_file_list, start, offset - start);
StringPieceTrimWhitespace(&proto_file); StringPieceTrimWhitespace(&proto_file);
if (proto_file.size() != 0) { if (proto_file.size() != 0) {
map<string, string>::iterator existing_entry = std::map<string, string>::iterator existing_entry =
map_->find(proto_file.ToString()); map_->find(proto_file.ToString());
if (existing_entry != map_->end()) { if (existing_entry != map_->end()) {
std::cerr << "warning: duplicate proto file reference, replacing framework entry for '" std::cerr << "warning: duplicate proto file reference, replacing framework entry for '"
......
...@@ -262,20 +262,20 @@ class LIBPROTOC_EXPORT ImportWriter { ...@@ -262,20 +262,20 @@ class LIBPROTOC_EXPORT ImportWriter {
private: private:
class ProtoFrameworkCollector : public LineConsumer { class ProtoFrameworkCollector : public LineConsumer {
public: public:
ProtoFrameworkCollector(map<string, string>* inout_proto_file_to_framework_name) ProtoFrameworkCollector(std::map<string, string>* inout_proto_file_to_framework_name)
: map_(inout_proto_file_to_framework_name) {} : map_(inout_proto_file_to_framework_name) {}
virtual bool ConsumeLine(const StringPiece& line, string* out_error); virtual bool ConsumeLine(const StringPiece& line, string* out_error);
private: private:
map<string, string>* map_; std::map<string, string>* map_;
}; };
void ParseFrameworkMappings(); void ParseFrameworkMappings();
const string generate_for_named_framework_; const string generate_for_named_framework_;
const string named_framework_to_proto_path_mappings_path_; const string named_framework_to_proto_path_mappings_path_;
map<string, string> proto_file_to_framework_name_; std::map<string, string> proto_file_to_framework_name_;
bool need_to_parse_mapping_file_; bool need_to_parse_mapping_file_;
vector<string> protobuf_framework_imports_; vector<string> protobuf_framework_imports_;
......
...@@ -162,7 +162,7 @@ void MapFieldGenerator::FinishInitialization(void) { ...@@ -162,7 +162,7 @@ void MapFieldGenerator::FinishInitialization(void) {
} }
void MapFieldGenerator::DetermineForwardDeclarations( void MapFieldGenerator::DetermineForwardDeclarations(
set<string>* fwd_decls) const { std::set<string>* fwd_decls) const {
RepeatedFieldGenerator::DetermineForwardDeclarations(fwd_decls); RepeatedFieldGenerator::DetermineForwardDeclarations(fwd_decls);
const FieldDescriptor* value_descriptor = const FieldDescriptor* value_descriptor =
descriptor_->message_type()->FindFieldByName("value"); descriptor_->message_type()->FindFieldByName("value");
......
...@@ -51,7 +51,7 @@ class MapFieldGenerator : public RepeatedFieldGenerator { ...@@ -51,7 +51,7 @@ class MapFieldGenerator : public RepeatedFieldGenerator {
MapFieldGenerator(const FieldDescriptor* descriptor, const Options& options); MapFieldGenerator(const FieldDescriptor* descriptor, const Options& options);
virtual ~MapFieldGenerator(); virtual ~MapFieldGenerator();
virtual void DetermineForwardDeclarations(set<string>* fwd_decls) const; virtual void DetermineForwardDeclarations(std::set<string>* fwd_decls) const;
private: private:
scoped_ptr<FieldGenerator> value_field_generator_; scoped_ptr<FieldGenerator> value_field_generator_;
......
...@@ -233,7 +233,7 @@ void MessageGenerator::GenerateStaticVariablesInitialization( ...@@ -233,7 +233,7 @@ void MessageGenerator::GenerateStaticVariablesInitialization(
} }
} }
void MessageGenerator::DetermineForwardDeclarations(set<string>* fwd_decls) { void MessageGenerator::DetermineForwardDeclarations(std::set<string>* fwd_decls) {
if (!IsMapEntryMessage(descriptor_)) { if (!IsMapEntryMessage(descriptor_)) {
for (int i = 0; i < descriptor_->field_count(); i++) { for (int i = 0; i < descriptor_->field_count(); i++) {
const FieldDescriptor* fieldDescriptor = descriptor_->field(i); const FieldDescriptor* fieldDescriptor = descriptor_->field(i);
...@@ -514,7 +514,7 @@ void MessageGenerator::GenerateSource(io::Printer* printer) { ...@@ -514,7 +514,7 @@ void MessageGenerator::GenerateSource(io::Printer* printer) {
" };\n"); " };\n");
} }
map<string, string> vars; std::map<string, string> vars;
vars["classname"] = class_name_; vars["classname"] = class_name_;
vars["rootclassname"] = root_classname_; vars["rootclassname"] = root_classname_;
vars["fields"] = has_fields ? "fields" : "NULL"; vars["fields"] = has_fields ? "fields" : "NULL";
......
...@@ -64,7 +64,7 @@ class MessageGenerator { ...@@ -64,7 +64,7 @@ class MessageGenerator {
void GenerateMessageHeader(io::Printer* printer); void GenerateMessageHeader(io::Printer* printer);
void GenerateSource(io::Printer* printer); void GenerateSource(io::Printer* printer);
void GenerateExtensionRegistrationSource(io::Printer* printer); void GenerateExtensionRegistrationSource(io::Printer* printer);
void DetermineForwardDeclarations(set<string>* fwd_decls); void DetermineForwardDeclarations(std::set<string>* fwd_decls);
// Checks if the message or a nested message includes a oneof definition. // Checks if the message or a nested message includes a oneof definition.
bool IncludesOneOfDefinition() const; bool IncludesOneOfDefinition() const;
......
...@@ -45,7 +45,7 @@ namespace objectivec { ...@@ -45,7 +45,7 @@ namespace objectivec {
namespace { namespace {
void SetMessageVariables(const FieldDescriptor* descriptor, void SetMessageVariables(const FieldDescriptor* descriptor,
map<string, string>* variables) { std::map<string, string>* variables) {
const string& message_type = ClassName(descriptor->message_type()); const string& message_type = ClassName(descriptor->message_type());
(*variables)["type"] = message_type; (*variables)["type"] = message_type;
(*variables)["containing_class"] = ClassName(descriptor->containing_type()); (*variables)["containing_class"] = ClassName(descriptor->containing_type());
...@@ -67,7 +67,7 @@ MessageFieldGenerator::MessageFieldGenerator(const FieldDescriptor* descriptor, ...@@ -67,7 +67,7 @@ MessageFieldGenerator::MessageFieldGenerator(const FieldDescriptor* descriptor,
MessageFieldGenerator::~MessageFieldGenerator() {} MessageFieldGenerator::~MessageFieldGenerator() {}
void MessageFieldGenerator::DetermineForwardDeclarations( void MessageFieldGenerator::DetermineForwardDeclarations(
set<string>* fwd_decls) const { std::set<string>* fwd_decls) const {
ObjCObjFieldGenerator::DetermineForwardDeclarations(fwd_decls); ObjCObjFieldGenerator::DetermineForwardDeclarations(fwd_decls);
// Class name is already in "storage_type". // Class name is already in "storage_type".
fwd_decls->insert("@class " + variable("storage_type")); fwd_decls->insert("@class " + variable("storage_type"));
...@@ -95,7 +95,7 @@ RepeatedMessageFieldGenerator::RepeatedMessageFieldGenerator( ...@@ -95,7 +95,7 @@ RepeatedMessageFieldGenerator::RepeatedMessageFieldGenerator(
RepeatedMessageFieldGenerator::~RepeatedMessageFieldGenerator() {} RepeatedMessageFieldGenerator::~RepeatedMessageFieldGenerator() {}
void RepeatedMessageFieldGenerator::DetermineForwardDeclarations( void RepeatedMessageFieldGenerator::DetermineForwardDeclarations(
set<string>* fwd_decls) const { std::set<string>* fwd_decls) const {
RepeatedFieldGenerator::DetermineForwardDeclarations(fwd_decls); RepeatedFieldGenerator::DetermineForwardDeclarations(fwd_decls);
// Class name is already in "storage_type". // Class name is already in "storage_type".
fwd_decls->insert("@class " + variable("storage_type")); fwd_decls->insert("@class " + variable("storage_type"));
......
...@@ -51,7 +51,7 @@ class MessageFieldGenerator : public ObjCObjFieldGenerator { ...@@ -51,7 +51,7 @@ class MessageFieldGenerator : public ObjCObjFieldGenerator {
virtual bool WantsHasProperty(void) const; virtual bool WantsHasProperty(void) const;
public: public:
virtual void DetermineForwardDeclarations(set<string>* fwd_decls) const; virtual void DetermineForwardDeclarations(std::set<string>* fwd_decls) const;
private: private:
GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(MessageFieldGenerator); GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(MessageFieldGenerator);
...@@ -67,7 +67,7 @@ class RepeatedMessageFieldGenerator : public RepeatedFieldGenerator { ...@@ -67,7 +67,7 @@ class RepeatedMessageFieldGenerator : public RepeatedFieldGenerator {
virtual ~RepeatedMessageFieldGenerator(); virtual ~RepeatedMessageFieldGenerator();
public: public:
virtual void DetermineForwardDeclarations(set<string>* fwd_decls) const; virtual void DetermineForwardDeclarations(std::set<string>* fwd_decls) const;
private: private:
GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(RepeatedMessageFieldGenerator); GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(RepeatedMessageFieldGenerator);
......
...@@ -67,7 +67,7 @@ class OneofGenerator { ...@@ -67,7 +67,7 @@ class OneofGenerator {
private: private:
const OneofDescriptor* descriptor_; const OneofDescriptor* descriptor_;
map<string, string> variables_; std::map<string, string> variables_;
GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(OneofGenerator); GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(OneofGenerator);
}; };
......
...@@ -118,7 +118,7 @@ const char* PrimitiveArrayTypeName(const FieldDescriptor* descriptor) { ...@@ -118,7 +118,7 @@ const char* PrimitiveArrayTypeName(const FieldDescriptor* descriptor) {
} }
void SetPrimitiveVariables(const FieldDescriptor* descriptor, void SetPrimitiveVariables(const FieldDescriptor* descriptor,
map<string, string>* variables) { std::map<string, string>* variables) {
std::string primitive_name = PrimitiveTypeName(descriptor); std::string primitive_name = PrimitiveTypeName(descriptor);
(*variables)["type"] = primitive_name; (*variables)["type"] = primitive_name;
(*variables)["storage_type"] = primitive_name; (*variables)["storage_type"] = primitive_name;
......
...@@ -227,10 +227,8 @@ class FatalException : public std::exception { ...@@ -227,10 +227,8 @@ class FatalException : public std::exception {
// in some versions of MSVC. // in some versions of MSVC.
// TODO(acozzette): remove these using statements // TODO(acozzette): remove these using statements
using std::istream; using std::istream;
using std::map;
using std::ostream; using std::ostream;
using std::pair; using std::pair;
using std::set;
using std::string; using std::string;
using std::vector; using std::vector;
......
...@@ -85,7 +85,7 @@ class ScopedMemoryLog { ...@@ -85,7 +85,7 @@ class ScopedMemoryLog {
const vector<string>& GetMessages(LogLevel error); const vector<string>& GetMessages(LogLevel error);
private: private:
map<LogLevel, vector<string> > messages_; std::map<LogLevel, vector<string> > messages_;
LogHandler* old_handler_; LogHandler* old_handler_;
static void HandleLog(LogLevel level, const char* filename, int line, static void HandleLog(LogLevel level, const char* filename, int line,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment