Loading...
Searching...
No Matches
OpTransform Class Referenceabstract

`#include <openbabel/optransform.h>`

Inheritance diagram for OpTransform:
[legend]

## Public Types

typedef const std::map< std::string, std::string > | OpMap
typedef std::map< const char *, OBPlugin *, CharPtrLess > | PluginMapType
typedef PluginMapType::const_iterator | PluginIterator

## Public Member Functions

| OpTransform (const char *ID, const char *filename, const char *descr)
| ~OpTransform ()
virtual const char * | Description ()
virtual bool | WorksWith (OBBase *pOb) const
virtual bool | Do (OBBase *pOb, const char *OptionText=nullptr, OpMap *pOptions=nullptr, OBConversion *pConv=nullptr)
virtual OpTransform * | MakeInstance (const std::vector< std::string > &textlines)
virtual const char * | TypeID ()
virtual bool | ProcessVec (std::vector< OBBase * > &)
virtual bool | Display (std::string &txt, const char *param, const char *ID=nullptr)
virtual void | Init ()
const char * | GetID () const
virtual PluginMapType & | GetMap () const =0

## Static Public Member Functions

static std::string | OpOptions (OBBase *pOb)
static bool | DoOps (OBBase *pOb, OpMap *pOptions, OBConversion *pConv)
static OBPlugin * | GetPlugin (const char *Type, const char *ID)
static bool | ListAsVector (const char *PluginID, const char *param, std::vector< std::string > &vlist)
static void | List (const char *PluginID, const char *param=nullptr, std::ostream *os=&std::cout)
static std::string | ListAsString (const char *PluginID, const char *param=nullptr)
static std::string | FirstLine (const char *txt)
static PluginIterator | Begin (const char *PluginID)
static PluginIterator | End (const char *PluginID)
static void | LoadAllPlugins ()

## Static Protected Member Functions

static PluginMapType & | PluginMap ()
static PluginMapType & | GetTypeMap (const char *PluginID)
static OBPlugin * | BaseFindType (PluginMapType &Map, const char *ID)

## Protected Attributes

const char * | _id

## Static Protected Attributes

static int | AllPluginsLoaded = 0

## Detailed Description

Applies molecular reactions/transforms (OBChemTsfm class) read from a datafile.

Since
  version 2.2

## Member Typedef Documentation

## OpMap

typedef const std::map<std::string, std::string> OpMap

inherited

## Constructor & Destructor Documentation

## OpTransform()

OpTransform | ( | const char * | ID,
|  | const char * | filename,
|  | const char * | descr )

inline

constructor. Each instance provides an ID, a datafile and a description.

Referenced by MakeInstance().

## ~OpTransform()

~OpTransform | ( |  | ) |

inline

## Member Function Documentation

## Description()

virtual const char * Description | ( |  | ) |

virtual

Required description of a sub-type.

Reimplemented from OBPlugin.

## WorksWith()

virtual bool WorksWith | ( | OBBase * | pOb | ) | const

inline virtual

Checks that this op is being applied to the right kind of object(OBMol).

Implements OBOp.

## Do()

virtual bool Do | ( | OBBase * | pOb,
|  | const char * | OptionText = nullptr,
|  | OpMap * | pOptions = nullptr,
|  | OBConversion * | pConv = nullptr )

virtual

Carries out the transform.

Implements OBOp.

## MakeInstance()

virtual OpTransform * MakeInstance | ( | const std::vector< std::string > & |  | ) |

inline virtual

Make a new instance of the class. See OpTransform, OBGroupContrib, SmartsDescriptor classes for derived versions. Usually, the first parameter is the classname, the next three are parameters(ID, filename, description) for a constructor, and the rest data.

Reimplemented from OBPlugin.

## TypeID()

virtual const char * TypeID | ( |  | ) |

inline virtual inherited

Provides the name of this kind of plugin. Use -L "ops" to list from commandline.

Reimplemented from OBPlugin.

## ProcessVec()

virtual bool ProcessVec | ( | std::vector< OBBase * > & |  | ) |

inline virtual inherited

Do something with an array of objects. Used a a callback routine in OpSort, etc.

## OpOptions()

std::string OpOptions | ( | OBBase * | pOb | ) |

inline static inherited

Returns
  string describing options, for display with -H and to make checkboxes in GUI

Referenced by OBMol::ClassDescription().

## DoOps()

bool DoOps | ( | OBBase * | pOb,
|  | OpMap * | pOptions,
|  | OBConversion * | pConv )

inline static inherited

Call Do() of all the OBOps whose ID is a key in the map. Called from DoTransformations(). The map has general options like -x or –multicharoption The key is the option name and the value, if any, is text which follows the option name. In some cases, there may be several parameters, space separated)

Returns
  false indicating object should not be output, if any Do() returns false

Referenced by OBMol::DoTransformations().

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

- optransform.h