Small typos.
This commit is contained in:
parent
248838db7e
commit
b3fa237ea7
|
@ -258,7 +258,7 @@ Segments segments = netgetComponents()->getSubSet<Segment*>(IsOnLayer(metal));
|
|||
*/
|
||||
// \{
|
||||
|
||||
/*! \function bool Collection::IsEmpty() const;
|
||||
/*! \function bool Collection::isEmpty() const;
|
||||
* This function returns \true if the collection designates no
|
||||
* element and else \false.
|
||||
*/
|
||||
|
|
|
@ -58,6 +58,20 @@
|
|||
*/
|
||||
|
||||
|
||||
<<<<<<< .mine
|
||||
|
||||
/*! \addtogroup Generalities
|
||||
* \{
|
||||
*/
|
||||
|
||||
/*! \function DataBase* DataBase::getDB ();
|
||||
* This global generic function returns the current
|
||||
* DataBase, if it has been created and not destroyed,
|
||||
* else \NULL.
|
||||
*/
|
||||
|
||||
=======
|
||||
>>>>>>> .r207
|
||||
// \}
|
||||
|
||||
}
|
||||
|
|
|
@ -52,20 +52,20 @@
|
|||
*
|
||||
* The resolution is associated to the precision. Indeed it
|
||||
* represents the external value associated to the smallest
|
||||
* unit, that is the value returned by getReal(Unit::db(1)).
|
||||
* unit, that is the value returned by getGrid(Unit::db(1)).
|
||||
*
|
||||
* Related functions :
|
||||
* <b>DbU::getResolution()</b>
|
||||
*
|
||||
* \section secDbURealsPerLamba Reals per Lambda ratio
|
||||
* \section secDbUGridsPerLamba Grids per Lambda ratio
|
||||
*
|
||||
* Set the ratio between reals and lambdas. This must be an
|
||||
* Set the ratio between grids and lambdas. This must be an
|
||||
* even integer. Once sets, musn't be changed.
|
||||
*
|
||||
* Related functions :
|
||||
* <ul>
|
||||
* <li><b>DbU::setRealsPerLambda()</b>
|
||||
* <li><b>DbU::getRealsPerLambda()</b>
|
||||
* <li><b>DbU::setGridsPerLambda()</b>
|
||||
* <li><b>DbU::getGridsPerLambda()</b>
|
||||
* </ul>
|
||||
*
|
||||
*
|
||||
|
@ -84,14 +84,14 @@
|
|||
* Translate a DbU::Unit into grid or lambda length :
|
||||
* <ul>
|
||||
* <li><b>long DbU::getDb (DbU::Unit u)</b>
|
||||
* <li><b>double DbU::getReal (DbU::Unit u)</b>
|
||||
* <li><b>double DbU::getGrid (DbU::Unit u)</b>
|
||||
* <li><b>double DbU::getLambda(DbU::Unit u)</b>
|
||||
* </ul>
|
||||
*
|
||||
* Translate a lambda length into a DbU::Unit :
|
||||
* <ul>
|
||||
* <li><b>DbU::Unit DbU::db(long u)</b>
|
||||
* <li><b>DbU::Unit DbU::real(double u)</b>
|
||||
* <li><b>DbU::Unit DbU::grid(double u)</b>
|
||||
* <li><b>DbU::Unit DbU::lambda(double u)</b>
|
||||
* </ul>
|
||||
*/
|
||||
|
@ -127,8 +127,8 @@
|
|||
* Units are printed "as is", their true value as stored in the
|
||||
* DataBase.
|
||||
*/
|
||||
/*! \var Dbu::StringMode DbU::Real
|
||||
* Units are printed as real (founder grid steps).
|
||||
/*! \var Dbu::StringMode DbU::Grid
|
||||
* Units are printed as founder grid steps.
|
||||
*/
|
||||
/*! \var Dbu::StringMode DbU::Symbolic
|
||||
* Units are printed as symbolic (lambdas).
|
||||
|
@ -159,13 +159,13 @@
|
|||
* \remark Throw an exception for any other \c \<s\> argument value.
|
||||
*/
|
||||
|
||||
/*! \function void DbU::setRealsPerLambda(double realsPerLambda);
|
||||
* \Return Sets how many reals (founder grid steps) makes one <i>lambda</i>.
|
||||
/*! \function void DbU::setGridsPerLambda(double gridsPerLambda);
|
||||
* \Return Sets how many founder grid steps makes one <i>lambda</i>.
|
||||
* It must be an event integer otherwise an exception is thrown.
|
||||
*/
|
||||
|
||||
/*! \function double DbU::getRealsPerLambda();
|
||||
* \Return How many reals (founder grid steps) makes one <i>lambda</i>.
|
||||
/*! \function double DbU::getGridsPerLambda();
|
||||
* \Return How many founder grid steps makes one <i>lambda</i>.
|
||||
*/
|
||||
|
||||
/*! \function DbU::Unit DbU::db(long u);
|
||||
|
@ -174,8 +174,8 @@
|
|||
* cast.
|
||||
*/
|
||||
|
||||
/*! \function DbU::Unit DbU::real(double value);
|
||||
* \Return the unit corresponding to the <i>real</i> value \c \<value\>
|
||||
/*! \function DbU::Unit DbU::grid(double value);
|
||||
* \Return the unit corresponding to the <i>grid</i> value \c \<value\>
|
||||
* according to the current precision.
|
||||
*/
|
||||
|
||||
|
@ -190,8 +190,8 @@
|
|||
* nothing apart from a type cast.
|
||||
*/
|
||||
|
||||
/*! \function double DbU::getReal(Unit unit);
|
||||
* \Return the real value (expressed as a number of founder grid steps)
|
||||
/*! \function double DbU::getGrid(Unit unit);
|
||||
* \Return the value expressed as a number of founder grid steps
|
||||
* associated to the unit \c \<unit\> according to the current
|
||||
* precision.
|
||||
*/
|
||||
|
@ -210,7 +210,7 @@
|
|||
/*! \function string DbU::getValueString(Unit unit);
|
||||
* \return A character string representing the external value of
|
||||
* \c \<unit\>. The value is converted in the length according
|
||||
* to setStringMode(): database, real or symbolic.
|
||||
* to setStringMode(): database, grid or symbolic.
|
||||
*
|
||||
* \remark This string is shorter than the one we could print from the
|
||||
* external value because non needed decimals are not drawn (nor
|
||||
|
|
|
@ -1,319 +0,0 @@
|
|||
|
||||
// -*- C++ -*-
|
||||
|
||||
|
||||
namespace Hurricane {
|
||||
|
||||
|
||||
/*! \defgroup inspectorManagment Inspector : Live Database Explorator (internal)
|
||||
*
|
||||
*
|
||||
* \section sInspectorIntro Introduction
|
||||
*
|
||||
* The Hurricane Database provide a generic mechanism to allow
|
||||
* the inspection of the whole data structure at run-time.
|
||||
* The associated window/tool is called "The Inspector".
|
||||
*
|
||||
* In this section, we will describe how the inspection
|
||||
* mechanism to new objects.
|
||||
*
|
||||
*
|
||||
* \subsection ssSlotAdapter The SlotAdapter
|
||||
*
|
||||
* First, we introduce the SlotAdapter object. Any inspectable
|
||||
* object has to be associated (see the next section) with a
|
||||
* SlotAdapter. It's providing the following methods :
|
||||
\code
|
||||
class SlotAdapter {
|
||||
public:
|
||||
virtual string _getTypename () const;
|
||||
virtual string _getString () const;
|
||||
virtual Record* _getRecord () const;
|
||||
inline virtual Slot* _getSlot ( const string& name ) const;
|
||||
};
|
||||
\endcode
|
||||
*
|
||||
*
|
||||
* Thoses methods correspond to :
|
||||
* <ul>
|
||||
* <li>\b _getTypeName() : the inspected object's type.
|
||||
* <li>\b _getString() : a synthetic string description of the
|
||||
* object's state.
|
||||
* <li>\b _getRecord() : the complete description of all object's
|
||||
* attributes (a list of Slot).
|
||||
* <li>\b _getSlot() : a Slot build from this SlotAdapter. As this
|
||||
* function is supplied by default with the right implementation
|
||||
* we will not detail it here.
|
||||
* </ul>
|
||||
*
|
||||
*
|
||||
* \subsection ssObjectTypology Typology of inspectables objects
|
||||
*
|
||||
* We distinguish three kind of objects, corresponding to three
|
||||
* different ways of association to a SlotAdapter.
|
||||
* <ul>
|
||||
* <li><b>User defined, with virtual methods</b> : those objects
|
||||
* must inherit from the NestedSlotAdapter class.
|
||||
* <li><b>User defined, without virtual methods</b> : thoses
|
||||
* objects must provides (as ordinary methods)
|
||||
* \b _getTypeName() , \b _getString() , \b _getRecord() .
|
||||
* But \b not \b _getSlot().
|
||||
* <li><b>External objects</b> : that is, we cannot modify.
|
||||
* In this case we have to provide a specialised template
|
||||
* overload for \b ProxyTypeName<>() , \b ProxyString<>() ,
|
||||
* and \b ProxyRecord<>() (see \ref ssExternalObjects).
|
||||
* </ul>
|
||||
*
|
||||
*
|
||||
* \subsection ssUserDefinedVirtual User Defined Object with virtual methods
|
||||
*
|
||||
* This approach should be preferrred for complex objects
|
||||
* that are persistents in memory.
|
||||
*
|
||||
* Example of implementation :
|
||||
\code
|
||||
namespace MyTool {
|
||||
class MyClass : public NestedSlotAdapter {
|
||||
protected:
|
||||
int _value;
|
||||
public:
|
||||
int getValue () const { return _value; }
|
||||
virtual string _getTypeName() const { return "MyClass"; };
|
||||
virtual string _getString () const { return "<MyClass"+getString(_value)+">"; };
|
||||
virtual Record* _getRecord () const;
|
||||
};
|
||||
|
||||
Record* MyClass::getRecord () const {
|
||||
Record* record = new Record(_getString());
|
||||
record->Add ( getSlot("_value",&_value) );
|
||||
return record;
|
||||
}
|
||||
} // End of MyTool namespace.
|
||||
|
||||
SetNestedSlotAdapter(MyTool::MyClass)
|
||||
\endcode
|
||||
*
|
||||
* \e MyClass derives from NestedSlotAdapter. Any derived class of
|
||||
* \e MyClass will inherit of it, so you do not have to (and musn't)
|
||||
* repeat the inheritance from NestedSlotAdapter.
|
||||
*
|
||||
* \e SetNestedSlotAdapter() must be put outside any namespace.
|
||||
*
|
||||
* \e SetNestedSlotAdapter() must never be called on objects that do
|
||||
* not derives from NestedSlotAdapter. There's builtin safety :
|
||||
* a \c static_cast into NestedSlotAdapter that will make the
|
||||
* compiler fail.
|
||||
*
|
||||
* \e SetNestedSlotAdapter() may be omitted, at the cost of generating
|
||||
* a intermediary SlotAdapter (that will cost two pointers). Nevertheless
|
||||
* it will work.
|
||||
*
|
||||
*
|
||||
* \subsection ssUserDefinedWithoutVirtual User Defined Object without virtual methods
|
||||
*
|
||||
* This implementation should be preferred for light objects
|
||||
* that are instanciated in vast amounts (we gain the \e vtable
|
||||
* pointer over the previous approach).
|
||||
*
|
||||
* Example of implementation :
|
||||
\code
|
||||
namespace MyTool {
|
||||
class MyLightClass {
|
||||
protected:
|
||||
int _value;
|
||||
public:
|
||||
int getValue () const { return _value; }
|
||||
string _getTypeName() const { return "MyLightClass"; };
|
||||
string _getString () const { return "<MyLightClass"+getString(_value)+">"; };
|
||||
Record* _getRecord () const;
|
||||
};
|
||||
|
||||
Record* MyLightClass::getRecord () const {
|
||||
Record* record = new Record(_getString());
|
||||
record->Add ( getSlot("_value",&_value) );
|
||||
return record;
|
||||
}
|
||||
} // End of MyTool namespace.
|
||||
\endcode
|
||||
*
|
||||
* The methods \b _getTypeName() , \b _getString() and \b getRecord()
|
||||
* are now non-virtual and there's no call to \b SetNestedSlotAdapter() .
|
||||
*
|
||||
*
|
||||
* \subsection ssExternalObjects External Objects
|
||||
*
|
||||
* This is the implementation to uses for managing objects
|
||||
* from other libraries that we should want to browse in the
|
||||
* Inspector. In this case we have to provide three overload
|
||||
* of template functions, as shown below (for boolean type) :
|
||||
\code
|
||||
template<>
|
||||
inline string ProxyTypeName<bool> ( const bool* object ) { return "<PointerSlotAdapter<bool>>"; }
|
||||
|
||||
template<>
|
||||
inline string ProxyString<bool> ( const bool* object ) { return (*object)?"True":"False" ; }
|
||||
|
||||
template<>
|
||||
inline Record* ProxyRecord<bool> ( const bool* object ) { return NULL; }
|
||||
\endcode
|
||||
*
|
||||
*
|
||||
* \section sgetStringAndgetSlot getString() and getSlot() functions
|
||||
*
|
||||
* When a class or type is provided with Inspector support,
|
||||
* you may uses the two generic functions below :
|
||||
\code
|
||||
template<typename T> inline string getString ( T* t );
|
||||
template<typename T> inline string getString ( T t );
|
||||
template<typename T> inline Hurricane::Slot* getSlot ( const string& name, T* t );
|
||||
template<typename T> inline Hurricane::Slot* getSlot ( const string& name, T t );
|
||||
\endcode
|
||||
*
|
||||
* getString() may be used to print some debugging informations
|
||||
* on \stdout.
|
||||
*
|
||||
* getSlot() used to built the various entries in a \b _getRecord()
|
||||
* method.
|
||||
*
|
||||
* <b>Argument type policy</b>
|
||||
*
|
||||
* As you noticed there are two overload for each function,
|
||||
* one with pointer argument, the other with a value argument.
|
||||
* This is meaningful :
|
||||
* <ul>
|
||||
* <li>Passing by pointer means that the data being inspected
|
||||
* is persistent, and should not be deleted once the
|
||||
* inspector is closed. This is the case of all DBo
|
||||
* objects and, for example, Box objects when they are
|
||||
* attributes of another object.
|
||||
* <li>Passing by value, means that the data is volatile and
|
||||
* should be deleted at the inspector closing. As an
|
||||
* example, the bounding box of an instance which is
|
||||
* computed on the fly, we must copy the result into
|
||||
* the SlotAdapter but no longer need it afterwards.
|
||||
* An important consequence is that thoses objects
|
||||
* must have a valid copy constructor.
|
||||
* </ul>
|
||||
*
|
||||
* <b>Default type support</b>
|
||||
*
|
||||
* Hurricane provide support for the following types :
|
||||
* <ul>
|
||||
* <li><b>const char</b>
|
||||
* <li><b>const char*</b>
|
||||
* <li><b>const string*</b>
|
||||
* <li><b>const bool*</b>
|
||||
* <li><b>const void*</b>
|
||||
* <li><b>const int*</b>
|
||||
* <li><b>const long*</b>
|
||||
* <li><b>const unsigned int*</b>
|
||||
* <li><b>const unsigned long*</b>
|
||||
* <li><b>const unsigned long long*</b>
|
||||
* <li><b>const unsigned short int*</b>
|
||||
* <li><b>const float*</b>
|
||||
* <li><b>const double*</b>
|
||||
* </ul>
|
||||
* Note that, as long as the pointer type is supported, the value
|
||||
* is also (except for the \b char type which has a somewhat more
|
||||
* complex behavior).
|
||||
*
|
||||
* It also provide support for the following \STL containers :
|
||||
* <ul>
|
||||
* <li><b>const vector<Element>*</b>
|
||||
* <li><b>const list<Element>*</b>
|
||||
* <li><b>const map<Key,Element,Compare>*</b>
|
||||
* <li><b>const set<Element,Compare>*</b>
|
||||
* <li><b>const multiset<Element,Compare>*</b>
|
||||
* </ul>
|
||||
*
|
||||
*
|
||||
* \section sIOStreamSupport Support for iostream
|
||||
*
|
||||
* If an object (with inspector support) is often printed into
|
||||
* a stream, you may define an overload of \b operator<<() with
|
||||
* either the \b PointerIOStreamSupport() or \b ValueIOStreamSupport()
|
||||
* macros. The macros must in the top-level namespace.
|
||||
*
|
||||
*
|
||||
* \section sLastNote A note for myself
|
||||
*
|
||||
* About the deletion mechanism : there are two level of deletion,
|
||||
* the SlotAdapter deletion and the object deletion.
|
||||
*
|
||||
* Object deletion is managed by the SlotAdapter : if the SlotAdapter
|
||||
* is nested in the object, do not delete, otherwise delete.
|
||||
*
|
||||
* SlotAdapter deletion is managed at Slot level : if the object
|
||||
* is passed by pointer, do not delete the SlotAdapter. if the object
|
||||
* is passed by value, delete the SlotAdapter.
|
||||
*/
|
||||
|
||||
|
||||
//! \addtogroup inspectorManagment
|
||||
//! \{
|
||||
|
||||
/*! \class SlotAdapter
|
||||
* \brief Root class. Provide support for duplicatable objects (\b internal).
|
||||
*/
|
||||
|
||||
/*! \class NestedSlotAdapter
|
||||
* \brief Provide Inspector support for non-duplicatable (\b internal).
|
||||
*/
|
||||
|
||||
/*! \class PointerSlotAdapter
|
||||
* \brief Provide Inspector support for external persistant objects (\b internal).
|
||||
*/
|
||||
|
||||
/*! \class ValueSlotAdapter
|
||||
* \brief Provide Inspector support for external volatile objects (\b internal).
|
||||
*/
|
||||
|
||||
// \}
|
||||
|
||||
/*! \name Accessors
|
||||
*/
|
||||
// \{
|
||||
|
||||
/*! \function string SlotAdapter::_getTypeName () const;
|
||||
* \Return a string representing the object type. May be used by
|
||||
* SlotAdapter::_getString().
|
||||
*
|
||||
* \note No default implementation is supplied.
|
||||
*/
|
||||
|
||||
/*! \function string SlotAdapter::_getString () const;
|
||||
* \Return a string representing the object name and characteristics
|
||||
* in a synthetic way. Used, among other things, as title
|
||||
* for the Inspector Record browser.
|
||||
*
|
||||
* \note Default implementation is supplied, which returns the
|
||||
* string \c "SlotAdapter::_getString()" .
|
||||
*/
|
||||
|
||||
/*! \function Record* SlotAdapter::_getRecord () const;
|
||||
* \Return a Record representing the object current state.
|
||||
*
|
||||
* \note Default implementation is supplied, which returns \NULL.
|
||||
*/
|
||||
|
||||
/*! \function Slot* SlotAdapter::_getSlot ( const string& name ) const;
|
||||
* \param name the name to give to the Slot. Usually the class attribute
|
||||
* name.
|
||||
* \return a Slot associated to this object to insert into another Record.
|
||||
* As SlotAdapter is for user-defined objects without virtual
|
||||
* method the SlotAdapter is created aside to the inspected
|
||||
* object and must be removed afterwards, so we uses a ValueSlot.
|
||||
*/
|
||||
|
||||
|
||||
/*! \function Slot* NestedSlotAdapter::_getSlot ( const string& name ) const;
|
||||
* \param name the name to give to the Slot. Usually the class attribute
|
||||
* name.
|
||||
* \return a Slot associated to this object to insert into another Record.
|
||||
* NestedSlotAdapter is for user-defined objects with virtual
|
||||
* method, it must be a base class of the object, and as such
|
||||
* the object \e is the SlotAdapter. So the removal of the Slot
|
||||
* must left the SlotAdapter, for this we uses a PointerSlot.
|
||||
*/
|
||||
|
||||
}
|
|
@ -98,8 +98,6 @@ WARN_LOGFILE =
|
|||
# Configuration options related to the input files
|
||||
|
||||
INPUT = \
|
||||
../../src/hurricane/hurricane/SlotAdapter.h \
|
||||
SlotAdapter.dox \
|
||||
../../src/hurricane/hurricane/Commons.h \
|
||||
Commons.dox \
|
||||
../../src/hurricane/hurricane/Exception.h \
|
||||
|
|
Loading…
Reference in New Issue