Back

FilesRecentlyOpenedManager

The `FilesRecentlyOpenedManager` class in the SOFA framework, located under the `sofa::gui::common` namespace and part of the `Sofa.GUI.Common` module, manages a list of recently opened files for the GUI. It is responsible for maintaining this list and ensuring that it does not exceed a predefined maximum number of entries (`max_num_files`). The class provides methods to open a file, retrieve filenames by index, get or set the path where the list of files is stored, and retrieve or set the entire list of recently opened files. Additionally, it ensures that when new files are added, older entries are removed if necessary to adhere to the maximum limit. This component interacts with other GUI-related components in SOFA through its methods, allowing them to update and query the list of recently opened files. The `openFile` method is pure virtual, indicating potential customization or extension by derived classes.

abstract
The `FilesRecentlyOpenedManager` manages a list of recently opened files in the SOFA GUI, ensuring the list does not exceed a predefined maximum number of entries.
sheet
# FilesRecentlyOpenedManager ## Overview The `FilesRecentlyOpenedManager` class is part of the SOFA framework's GUI module and is responsible for managing a list of recently opened files. It ensures that this list adheres to a predefined maximum number of entries (`max_num_files`). This component supports user interface operations by maintaining state information related to file management. ## Parameters and Data The `FilesRecentlyOpenedManager` provides several methods for interacting with the list of recently opened files: - **openFile**: Opens a specified file, potentially removing older entries if necessary to adhere to the maximum limit (`max_num_files`). - **getFilename**: Retrieves the filename at a given index. - **getMaxNumFiles**: Returns the predefined maximum number of entries allowed in the list. - **getPath**: Retrieves the path where the list of files is stored. - **setPath**: Sets the path where the list of files will be stored. - **getFiles**: Retrieves the entire list of recently opened files. - **setFiles**: Sets the entire list of recently opened files. ## Practical Notes The `openFile` method is pure virtual, indicating that derived classes may customize or extend its functionality. The class ensures that when new files are added via `openFile`, older entries are removed if necessary to adhere to the maximum limit (`max_num_files`).
description
The `FilesRecentlyOpenedManager` class in the SOFA framework, located under the `sofa::gui::common` namespace and part of the `Sofa.GUI.Common` module, manages a list of recently opened files for the GUI. It is responsible for maintaining this list and ensuring that it does not exceed a predefined maximum number of entries (`max_num_files`). The class provides methods to open a file, retrieve filenames by index, get or set the path where the list of files is stored, and retrieve or set the entire list of recently opened files. Additionally, it ensures that when new files are added, older entries are removed if necessary to adhere to the maximum limit. This component interacts with other GUI-related components in SOFA through its methods, allowing them to update and query the list of recently opened files. The `openFile` method is pure virtual, indicating potential customization or extension by derived classes.
maths
The `FilesRecentlyOpenedManager` class in the SOFA framework is primarily designed for managing a list of recently opened files within the GUI. This class does not involve any mathematical or physical descriptions relevant to simulation frameworks, as its functionality pertains to file management and user interface operations rather than computational mechanics or numerical methods. Key functionalities include: - Maintaining a list of filenames (`files`) up to a predefined maximum number (`max_num_files`). - Providing methods for adding new files (`openFile`), retrieving specific filenames by index (`getFilename`), getting the path where the file list is stored (`getPath`), and setting the entire list of recently opened files (`setFiles`). - Ensuring that when a new file is added via `openFile`, older entries are removed if necessary to adhere to the maximum limit (`max_num_files`). - Writing the updated list of filenames to a specified path whenever changes occur. Given its role in managing recently opened files, this class does not contribute directly to any mathematical or physical computations typical in simulation frameworks. Instead, it supports user interface operations and maintains state information for the GUI.
{
  "name": "FilesRecentlyOpenedManager",
  "main": {
    "name": "FilesRecentlyOpenedManager",
    "namespace": "sofa::gui::common",
    "module": "Sofa.GUI.Common",
    "include": "sofa/gui/common/FilesRecentlyOpenedManager.h",
    "doc": "",
    "inherits": [],
    "templates": [],
    "data_fields": [],
    "links": [],
    "methods": [
      {
        "name": "openFile",
        "return_type": "void",
        "params": [
          {
            "name": "file",
            "type": "const int &"
          }
        ],
        "is_virtual": true,
        "is_pure_virtual": false,
        "is_static": false,
        "access": "public"
      },
      {
        "name": "getFilename",
        "return_type": "int",
        "params": [
          {
            "name": "idx",
            "type": "unsigned int"
          }
        ],
        "is_virtual": false,
        "is_pure_virtual": false,
        "is_static": false,
        "access": "public"
      },
      {
        "name": "getMaxNumFiles",
        "return_type": "unsigned int",
        "params": [],
        "is_virtual": false,
        "is_pure_virtual": false,
        "is_static": false,
        "access": "public"
      },
      {
        "name": "getPath",
        "return_type": "const int &",
        "params": [],
        "is_virtual": false,
        "is_pure_virtual": false,
        "is_static": false,
        "access": "public"
      },
      {
        "name": "setPath",
        "return_type": "void",
        "params": [
          {
            "name": "p",
            "type": "const int &"
          }
        ],
        "is_virtual": false,
        "is_pure_virtual": false,
        "is_static": false,
        "access": "public"
      },
      {
        "name": "getFiles",
        "return_type": "const int &",
        "params": [],
        "is_virtual": false,
        "is_pure_virtual": false,
        "is_static": false,
        "access": "public"
      },
      {
        "name": "setFiles",
        "return_type": "void",
        "params": [
          {
            "name": "f",
            "type": "const int &"
          }
        ],
        "is_virtual": false,
        "is_pure_virtual": false,
        "is_static": false,
        "access": "public"
      },
      {
        "name": "writeFiles",
        "return_type": "void",
        "params": [],
        "is_virtual": false,
        "is_pure_virtual": false,
        "is_static": false,
        "access": "protected"
      }
    ]
  },
  "desc": {
    "description": "The `FilesRecentlyOpenedManager` class in the SOFA framework, located under the `sofa::gui::common` namespace and part of the `Sofa.GUI.Common` module, manages a list of recently opened files for the GUI. It is responsible for maintaining this list and ensuring that it does not exceed a predefined maximum number of entries (`max_num_files`). The class provides methods to open a file, retrieve filenames by index, get or set the path where the list of files is stored, and retrieve or set the entire list of recently opened files. Additionally, it ensures that when new files are added, older entries are removed if necessary to adhere to the maximum limit. This component interacts with other GUI-related components in SOFA through its methods, allowing them to update and query the list of recently opened files. The `openFile` method is pure virtual, indicating potential customization or extension by derived classes."
  },
  "maths": {
    "maths": "The `FilesRecentlyOpenedManager` class in the SOFA framework is primarily designed for managing a list of recently opened files within the GUI. This class does not involve any mathematical or physical descriptions relevant to simulation frameworks, as its functionality pertains to file management and user interface operations rather than computational mechanics or numerical methods.\n\nKey functionalities include:\n- Maintaining a list of filenames (`files`) up to a predefined maximum number (`max_num_files`).\n- Providing methods for adding new files (`openFile`), retrieving specific filenames by index (`getFilename`), getting the path where the file list is stored (`getPath`), and setting the entire list of recently opened files (`setFiles`).\n- Ensuring that when a new file is added via `openFile`, older entries are removed if necessary to adhere to the maximum limit (`max_num_files`).\n- Writing the updated list of filenames to a specified path whenever changes occur.\n\nGiven its role in managing recently opened files, this class does not contribute directly to any mathematical or physical computations typical in simulation frameworks. Instead, it supports user interface operations and maintains state information for the GUI."
  },
  "summary": {
    "abstract": "The `FilesRecentlyOpenedManager` manages a list of recently opened files in the SOFA GUI, ensuring the list does not exceed a predefined maximum number of entries.",
    "sheet": "# FilesRecentlyOpenedManager\n\n## Overview\nThe `FilesRecentlyOpenedManager` class is part of the SOFA framework's GUI module and is responsible for managing a list of recently opened files. It ensures that this list adheres to a predefined maximum number of entries (`max_num_files`). This component supports user interface operations by maintaining state information related to file management.\n\n## Parameters and Data\nThe `FilesRecentlyOpenedManager` provides several methods for interacting with the list of recently opened files:\n- **openFile**: Opens a specified file, potentially removing older entries if necessary to adhere to the maximum limit (`max_num_files`).\n- **getFilename**: Retrieves the filename at a given index.\n- **getMaxNumFiles**: Returns the predefined maximum number of entries allowed in the list.\n- **getPath**: Retrieves the path where the list of files is stored.\n- **setPath**: Sets the path where the list of files will be stored.\n- **getFiles**: Retrieves the entire list of recently opened files.\n- **setFiles**: Sets the entire list of recently opened files.\n\n## Practical Notes\nThe `openFile` method is pure virtual, indicating that derived classes may customize or extend its functionality. The class ensures that when new files are added via `openFile`, older entries are removed if necessary to adhere to the maximum limit (`max_num_files`)."
  }
}