AAO DRAMA/DRAMA2 C++ Interface
DRAMA C++11 and later interface

◆ Filename() [2/3]

drama::gitarg::Filename::Filename ( drama::thread::TAction taction,
const sds::Id Id,
const std::string &  Name = "Argument1",
const int  Position = 1,
const std::string &  Default = "",
const Flags  flags = Flags::KeepErr 
)
inline

Constructor with the initial value set from an SDS structure.

This overload of the constructor should be used from threaded actions, it will lock access to DRAMA while it is fetching the value to ensure ERS messages from the lower level code are recorded against the action correctly.

The value is fetched from the named item (arg #2) within the SDS structure specified. or the Position (constructor arg #3) item in the
structure if the item named does not exist.

The code confirms the value represents a file which exists and can be read by this program.

Parameters
tactionThreaded action pointer
IdThe SDS structure.
NameThe name of the item within the structure.
PositionIf the item does not exist by the name, then presume this position.
DefaultThe default value. If not specified, an empty string is used.
flagsWhich GIT Flags to apply. If you specify KeepErr, then an exception is thrown if the value in the SDS structure is invalid or does not represent the name of file which exists and can be read by this program. If you don't specify KeepErr and and the SDS structure does not contain a value item, then the value is set to the supplied default.

References drama::CreateRunDramaTask(), drama::Default, and Get().