gsystem
Loading...
Searching...
No Matches
GSystemTextFactory Class Reference

Load a system from ASCII text files. More...

#include <systemTextFactory.h>

Public Member Functions

 GSystemFactory (const std::shared_ptr< GOptions > &g)
 Construct the factory with shared configuration.
 
- Public Member Functions inherited from GSystemFactory
 ~GSystemFactory () override=default
 
 GSystemFactory (const std::shared_ptr< GOptions > &g)
 Construct the factory with shared configuration.
 
void loadSystem (GSystem *system)
 Load a system by invoking the concrete factory steps.
 
virtual void closeSystem ()
 Factory cleanup hook.
 
void addPossibleFileLocation (const std::string &fl)
 Add a candidate directory for file searches.
 
- Public Member Functions inherited from GBase< GSystemFactory >
 GBase (const std::shared_ptr< GOptions > &gopt, std::string logger_name="")
 
 GBase (const std::shared_ptr< GLogger > &logger)
 
 GBase (const GBase &)=default
 
 GBase (GBase &&) noexcept=default
 
virtual ~GBase ()
 
GBaseoperator= (const GBase &)=default
 
GBaseoperator= (GBase &&) noexcept=default
 

Additional Inherited Members

- Protected Attributes inherited from GSystemFactory
std::vector< std::string > possibleLocationOfFiles
 List of candidate directories used by file-based factories.
 
- Protected Attributes inherited from GBase< GSystemFactory >
std::shared_ptr< GLoggerlog
 

Detailed Description

File naming convention:

  • Base name is system->getFilePath()
  • For geometry: base + GTEXTGEOMTYPE + variation + ".txt"
  • For materials: base + GTEXTMATSTYPE + variation + ".txt"

Search logic:

  • The factory tries the default filename in the current working directory.
  • If not found, it tries each entry in possibleLocationOfFiles in order.

Behavior differences:

  • Geometry file is mandatory unless the system annotation is "mats_only".
  • Materials file is optional.

Parsing:

  • Each non-empty line is split using '|' as delimiter.
  • The resulting positional fields are forwarded to the system builder methods.

Definition at line 34 of file systemTextFactory.h.

Member Function Documentation

◆ GSystemFactory()

GSystemFactory::GSystemFactory ( const std::shared_ptr< GOptions > & g)
inlineexplicit
Parameters
gShared options/configuration instance.

Definition at line 44 of file systemFactory.h.


The documentation for this class was generated from the following files: