| * This represents a variable scope used for looking up predefined types and |
| * services. Typically, a scope is associated with a t_program. Scopes are not |
| * used to determine code generation, but rather to resolve identifiers at |
| * @author Mark Slee <mcslee@facebook.com> |
| void add_type(std::string name, t_type* type) { |
| t_type* get_type(std::string name) { |
| void add_service(std::string name, t_service* service) { |
| services_[name] = service; |
| t_service* get_service(std::string name) { |
| std::map<std::string, t_type*>::iterator iter; |
| for (iter = types_.begin(); iter != types_.end(); ++iter) { |
| iter->second->get_name().c_str()); |
| std::map<std::string, t_type*> types_; |
| // Map of names to services |
| std::map<std::string, t_service*> services_; |