FlatImage
A configurable Linux containerization system
Loading...
Searching...
No Matches
ns_parser Namespace Reference

FlatImage command parsing and execution engine. More...

Namespaces

namespace  ns_interface
 Command interface definitions and argument structures.
 

Classes

class  VecArgs
 Vector-based argument container with pop operations. More...
 

Enumerations

enum class  FimCommand {
  NONE , EXEC , ROOT , PERMS ,
  ENV , DESKTOP , LAYER , BIND ,
  NOTIFY , CASEFOLD , BOOT , REMOTE ,
  RECIPE , INSTANCE , OVERLAY , UNSHARE ,
  VERSION , HELP
}
 Enumeration of FlatImage command types. More...
 

Functions

Value< int > execute_command (ns_config::FlatImage &fim, int argc, char **argv)
 Executes a parsed FlatImage command.
 
Value< FimCommandfim_command_from_string (std::string_view str)
 Convert string to FimCommand enum.
 
Value< CmdType > parse (int argc, char **argv)
 Parses FlatImage commands.
 

Detailed Description

FlatImage command parsing and execution engine.

Parses and executes FlatImage commands (fim-exec, fim-perms, fim-env, fim-desktop, etc.). Handles argument parsing, command dispatch, and orchestrates the execution flow for all user-facing FlatImage operations including boot, permissions, bindings, layers, recipes, and desktop integration.

Enumeration Type Documentation

◆ FimCommand

enum class ns_parser::FimCommand
strong

Enumeration of FlatImage command types.

Definition at line 38 of file parser.hpp.

Function Documentation

◆ execute_command()

Value< int > ns_parser::execute_command ( ns_config::FlatImage & fim,
int argc,
char ** argv )
inlinenodiscard

Executes a parsed FlatImage command.

Parameters
configFlatImage configuration object
argcArgument counter
argvArgument vector
Returns
Value<int> The exit code on success or the respective error

Definition at line 65 of file executor.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ fim_command_from_string()

Value< FimCommand > ns_parser::fim_command_from_string ( std::string_view str)
inlinenodiscard

Convert string to FimCommand enum.

Parameters
strCommand string (e.g., "fim-exec")
Returns
Value<FimCommand> The command enum or error

Definition at line 66 of file parser.hpp.

Here is the caller graph for this function:

◆ parse()

Value< CmdType > ns_parser::parse ( int argc,
char ** argv )
inlinenodiscard

Parses FlatImage commands.

Parameters
argcArgument counter
argvArgument vector
Returns
Value<CmdType> The parsed command or the respective error

Definition at line 185 of file parser.hpp.

Here is the call graph for this function:
Here is the caller graph for this function: