You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
517 B
24 lines
517 B
#pragma once |
|
#include "ParseArgs.h" |
|
#include "merrors.h" |
|
#include "traits.h" |
|
|
|
using michlib::message; |
|
|
|
class ActionInfo |
|
{ |
|
public: |
|
static constexpr const char* name = "info"; |
|
|
|
template<class T> static constexpr bool IsSupported = InfoSupported<T>; |
|
|
|
template<class D> static MString DoAction(const CLArgs& args, D& data); |
|
}; |
|
|
|
template<class D> MString ActionInfo::DoAction([[maybe_unused]] const CLArgs& args, D& data) |
|
{ |
|
auto info = data.Info(); |
|
if(!info.Exist()) return "No info"; |
|
message(info); |
|
return ""; |
|
};
|
|
|