oopnet.writer package¶
Subpackages¶
- oopnet.writer.writing_modules package
- Submodules
- oopnet.writer.writing_modules.write_network_components module
- oopnet.writer.writing_modules.write_network_map_tags module
- oopnet.writer.writing_modules.write_options_and_reporting module
- oopnet.writer.writing_modules.write_system_operation module
- oopnet.writer.writing_modules.write_water_quality module
- Module contents
Submodules¶
oopnet.writer.decorators module¶
- class oopnet.writer.decorators.WriterDecorator(sectionname=None, functionname=None, priority=None, writerfunction=None)¶
Bases:
object
Class for saving the writer function properties in a proper way with the decorators
- sectionname¶
- functionname¶
- priority¶
- writerfunction¶
- oopnet.writer.decorators.make_registering_decorator_factory(foreign_decorator_factory)¶
- Parameters:
foreign_decorator_factory –
Returns:
- oopnet.writer.decorators.section_writer(*args, **kw)¶
Synchronization decorator
- Parameters:
title – section title
priority – write priority
Returns:
oopnet.writer.module_reader module¶
- oopnet.writer.module_reader.list_section_writer_callables(modules)¶
Lists all callables decorated with the section_writer decorator from a list of modules.
- Parameters:
modules – list of modules to be checked for callables decorated with section_writer.
- Returns:
List of callables decorated with section_writer.
- oopnet.writer.module_reader.pred(c)¶
Checks if a class or function is decorated with section_writer.
- Parameters:
c (
Type
[Callable
]) – callable to be checked- Return type:
bool
- Returns:
Returns True if the class or function is decorated with section_writer and False otherwise.
oopnet.writer.write module¶
- oopnet.writer.write.write(network, filename)¶
Converts an OOPNET network to an EPANET input file and saves it with a desired filename.
- Parameters:
network (
Network
) – OOPNET network object which one wants to be written to a filefilename (
str
) – desired filename/path were the user wants to store the file
- Return type:
int
- Returns:
0 if successful