當前位置: 首頁>>代碼示例>>Python>>正文


Python PredefinedTypes.get_string_type方法代碼示例

本文整理匯總了Python中pynestml.symbols.predefined_types.PredefinedTypes.get_string_type方法的典型用法代碼示例。如果您正苦於以下問題:Python PredefinedTypes.get_string_type方法的具體用法?Python PredefinedTypes.get_string_type怎麽用?Python PredefinedTypes.get_string_type使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在pynestml.symbols.predefined_types.PredefinedTypes的用法示例。


在下文中一共展示了PredefinedTypes.get_string_type方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: visit_simple_expression

# 需要導入模塊: from pynestml.symbols.predefined_types import PredefinedTypes [as 別名]
# 或者: from pynestml.symbols.predefined_types.PredefinedTypes import get_string_type [as 別名]
 def visit_simple_expression(self, node):
     """
     Visits a singe simple rhs which consists of a string literal and updates the type.
     :param node: a simple rhs containing a string literal
     :type node: ast_simple_expression
     """
     node.type = PredefinedTypes.get_string_type()
     node.type.referenced_object = node
開發者ID:Silmathoron,項目名稱:nestml,代碼行數:10,代碼來源:ast_string_literal_visitor.py

示例2: __register_logger_warning_function

# 需要導入模塊: from pynestml.symbols.predefined_types import PredefinedTypes [as 別名]
# 或者: from pynestml.symbols.predefined_types.PredefinedTypes import get_string_type [as 別名]
 def __register_logger_warning_function(cls):
     """
     Registers the logger warning method.
     """
     params = list()
     params.append(PredefinedTypes.get_string_type())  # the argument
     symbol = FunctionSymbol(name=cls.LOGGER_WARNING, param_types=params,
                             return_type=PredefinedTypes.get_void_type(),
                             element_reference=None, is_predefined=True)
     cls.name2function[cls.LOGGER_WARNING] = symbol
開發者ID:Silmathoron,項目名稱:nestml,代碼行數:12,代碼來源:predefined_functions.py

示例3: __register_print_function

# 需要導入模塊: from pynestml.symbols.predefined_types import PredefinedTypes [as 別名]
# 或者: from pynestml.symbols.predefined_types.PredefinedTypes import get_string_type [as 別名]
 def __register_print_function(cls):
     """
     Registers the print function.
     """
     params = list()
     params.append(PredefinedTypes.get_string_type())
     symbol = FunctionSymbol(name=cls.PRINT, param_types=params,
                             return_type=PredefinedTypes.get_void_type(),
                             element_reference=None, is_predefined=True)
     cls.name2function[cls.PRINT] = symbol
開發者ID:Silmathoron,項目名稱:nestml,代碼行數:12,代碼來源:predefined_functions.py

示例4: __register_logger_info_function

# 需要導入模塊: from pynestml.symbols.predefined_types import PredefinedTypes [as 別名]
# 或者: from pynestml.symbols.predefined_types.PredefinedTypes import get_string_type [as 別名]
 def __register_logger_info_function(cls):
     """
     Registers the logger info method into the scope.
     """
     params = list()
     params.append(PredefinedTypes.get_string_type())  # the argument
     symbol = FunctionSymbol(name=cls.LOGGER_INFO, param_types=params,
                             return_type=PredefinedTypes.get_void_type(),
                             element_reference=None, is_predefined=True)
     cls.name2function[cls.LOGGER_INFO] = symbol
開發者ID:Silmathoron,項目名稱:nestml,代碼行數:12,代碼來源:predefined_functions.py

示例5: visit_data_type

# 需要導入模塊: from pynestml.symbols.predefined_types import PredefinedTypes [as 別名]
# 或者: from pynestml.symbols.predefined_types.PredefinedTypes import get_string_type [as 別名]
 def visit_data_type(self, node):
     """
     Visits a single data type meta_model node and updates, checks correctness and updates its type symbol.
     This visitor can also be used to derive the original name of the unit.
     :param node: a single datatype node.
     :type node: ast_data_type
     """
     if node.is_integer:
         self.symbol = PredefinedTypes.get_integer_type()
         node.set_type_symbol(self.symbol)
     elif node.is_real:
         self.symbol = PredefinedTypes.get_real_type()
         node.set_type_symbol(self.symbol)
     elif node.is_string:
         self.symbol = PredefinedTypes.get_string_type()
         node.set_type_symbol(self.symbol)
     elif node.is_boolean:
         self.symbol = PredefinedTypes.get_boolean_type()
         node.set_type_symbol(self.symbol)
     elif node.is_void:
         self.symbol = PredefinedTypes.get_void_type()
         node.set_type_symbol(self.symbol)
開發者ID:Silmathoron,項目名稱:nestml,代碼行數:24,代碼來源:ast_data_type_visitor.py


注:本文中的pynestml.symbols.predefined_types.PredefinedTypes.get_string_type方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。