|
||||
File indexing completed on 2025-01-18 09:28:09
0001 // -*- C++ -*- 0002 // AID-GENERATED 0003 // ========================================================================= 0004 // This class was generated by AID - Abstract Interface Definition 0005 // DO NOT MODIFY, but use the org.freehep.aid.Aid utility to regenerate it. 0006 // ========================================================================= 0007 #ifndef AIDA_IMANAGEDOBJECT_H 0008 #define AIDA_IMANAGEDOBJECT_H 1 0009 0010 // This file is part of the AIDA library 0011 // Copyright (C) 2002 by the AIDA team. All rights reserved. 0012 // This library is free software and under the terms of the 0013 // GNU Library General Public License described in the LGPL.txt 0014 0015 #include <string> 0016 0017 namespace AIDA { 0018 0019 /** 0020 * An object which can be stored in a tree. 0021 * @see ITree 0022 * 0023 * @author The AIDA team (http://aida.freehep.org/) 0024 * 0025 */ 0026 0027 class IManagedObject { 0028 0029 public: 0030 /// Destructor. 0031 virtual ~IManagedObject() { /* nop */; } 0032 0033 /** 0034 * Get the name of an IManagedObject. 0035 * Names can only be changed using the ITree.mv(). 0036 * @return The name of the IManagedObject. 0037 * 0038 */ 0039 virtual std::string name() const = 0; 0040 0041 /** 0042 * A simple introspection method. 0043 * It offers to implementations the possibility 0044 * to avoid the usage of the dynamic_cast. It appears 0045 * that this C++ feature is not yet reliable (May 2003) 0046 * in complex environments that intensivly use the dynamic loading. 0047 * The signature of this method follows the qt_cast method found 0048 * in Qt (see the Q_OBJECT macro). 0049 * Example of usage is : 0050 * AIDA::IManagedObject* object = tree->find("myData"); 0051 * if(object) { 0052 * AIDA::IHistogram* histo = object->cast("AIDA::IHistogram"); 0053 * if(histo) { 0054 * // the object is an histo. 0055 * } 0056 * } 0057 * @param className The name of the class to cast on. 0058 * @return The right pointer. Return 0 if className is not in the 0059 * inheritance tree. 0060 */ 0061 virtual void * cast(const std::string & className) const = 0; 0062 }; // class 0063 } // namespace AIDA 0064 #endif /* ifndef AIDA_IMANAGEDOBJECT_H */
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |