Public Member Functions | Static Protected Member Functions | List of all members
CmdDelete Class Reference

Remove parts of a hierarchical data structure. More...

Inheritance diagram for CmdDelete:
Inheritance graph
[legend]
Collaboration diagram for CmdDelete:
Collaboration graph
[legend]

Public Member Functions

void exec () const
 Run the command with current parameter values.
 
- Public Member Functions inherited from SimpleCommand< std::string >
 SimpleCommand (const std::string &name, const std::string &description, const std::string &key="value", const std::string &initValue=std::string(), const std::string &unit="")
 
 SimpleCommand (const std::string &name, const std::string &description, const std::string &key, std::initializer_list< S > l, const std::string &unit="")
 Constuctor designer for SimpleCommand<Unituple<> > .
 
 SimpleCommand (const SimpleCommand &cmd)
 
- Public Member Functions inherited from BasicCommand
 BasicCommand (const std::string &name, const std::string &description)
 
 BasicCommand (const BasicCommand &cmd)
 
- Public Member Functions inherited from BeanCommand< BeanLike >
 BeanCommand (const std::string &name, const std::string &description)
 
 BeanCommand (const BeanCommand &cmd)
 
 BeanCommand (BeanLike &b)
 
virtual const bean_tgetBean () const
 
virtual bean_tgetBean ()
 
const std::string & getName () const final
 
const std::string & getDescription () const final
 
virtual const drain::ReferenceMapgetParameters () const final
 
- Public Member Functions inherited from Command
 Command (const Command &cmd)
 
virtual void setParameters (const std::string &args) final
 
template<class T >
void setParameters (const SmartMap< T > &args)
 
template<class T >
void setParameter (const std::string &key, const T &value)
 Set a value to a single parameter. More...
 
CommandaddSection (drain::Flagger::ivalue_t i)
 
virtual void update ()
 Optional method for preparing command to execution. More...
 
bool hasParameters () const
 
virtual const std::string & getType () const
 Description of result, comparable to a return type of a function. ?
 
virtual void run (const std::string &params="")
 Convenience. Sets parameters and executes the command. More...
 
const std::string & getLastParameters () const
 After executing this command run a routine, if defined. More...
 
- Public Member Functions inherited from Contextual
 Contextual ()
 Sets internal contextPtr to NULL.
 
 Contextual (const Contextual &src)
 Copies base context (even null) of the source. Notice that the actual instance may be of derived class.
 
 Contextual (Context &ctx)
 Copies internal contextPtr.
 
template<class C >
void setContext ()
 Sets internal contextPtr to the static source.
 
void setExternalContext (Context &ctx)
 Sets internal contextPtr to outside target.
 
bool contextIsSet () const
 True, if contextPtr has been set.
 
template<class T = Context>
T & getContext () const
 If context has been set, returns it through a cast to base class Context. More...
 

Static Protected Member Functions

static int handleEmptyGroups (RackContext &ctx, Hi5Tree &dst, bool remove=false, const ODIMPath &path=ODIMPath())
 

Additional Inherited Members

- Public Types inherited from BeanCommand< BeanLike >
typedef BeanLike bean_t
 
- Static Public Member Functions inherited from Contextual
template<class T >
static Cloner< Context, T > & getCloner ()
 
- Public Attributes inherited from SimpleCommand< std::string >
std::string value
 
- Public Attributes inherited from BeanCommand< BeanLike >
BeanLike bean
 
- Public Attributes inherited from Command
int section = 1
 
- Static Public Attributes inherited from Command
static const SprinterLayout cmdArgLayout = {",", "?", "=", ""}
 
- Protected Member Functions inherited from CmdBaseSelective
 CmdBaseSelective (const std::string &name, const std::string &description)
 
 CmdBaseSelective (const CmdBaseSelective &cmd)
 
- Protected Member Functions inherited from BeanCommand< BeanLike >
virtual drain::ReferenceMapgetParameters () final
 
- Protected Attributes inherited from CmdBaseSelective
DataSelector mySelector
 
- Protected Attributes inherited from Command
std::string lastParameters
 
- Protected Attributes inherited from Contextual
ContextcontextPtr
 

Detailed Description

Remove parts of a hierarchical data structure.

Parameters
selection- desired parts to be deleted (syntax explained in Selecting data)

Synopsis

Examples

# Delete dataset[i] groups 2...10
rack volume.h5 --delete dataset2:10 -o volume-modified.h5
# Delete data[i] groups 3...20
rack volume.h5 --delete data3:20 -o volume-modified.h5
# Delete data[i] groups 3...20, in dataset[i] groups 2...10
rack volume.h5 --delete dataset2:10/data3:20 -o volume-modified.h5
# Delete independently dataset[i] and data[i] groups with two commands
rack volume.h5 --delete dataset2:6 --delete data2:5 -o volume-modified.h5
# Delete data[i] groups containing VRAD
rack volume.h5 --delete quantity=VRAD -o volume-modified.h5
# Delete data[i] groups containing VRAD in 1.0 degree sweeps and above
rack volume.h5 --delete elangle=1.0:90,quantity=VRAD -o volume-modified.h5
# Delete dual-PRF measurement data - leaving dataset groups
rack volume.h5 --delete prf=DOUBLE -o volume-modified.h5
# Delete dual-PRF measurement data - also dataset groups
rack volume.h5 --delete dataset:,prf=DOUBLE -o volume-modified.h5
# Delete actual data arrays
rack volume.h5 --delete data -o volume-modified.h5
# Delete quality[i] groups
rack volume.h5 --delete quality: -o volume-modified.h5
Definition: DataSelector.cpp:44

Notice that –elangle applies to volume data only, and essentially selects dataset groups. Similarly, quantity selects data (and quality) groups. If selection parameters of both levels are issued in the same command, implicit AND function applies in selection.

See also
CmdKeep
modifypage

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