~pierre-parent-k/kicad/length-tunning

« back to all changes in this revision

Viewing changes to include/base_struct.h

  • Committer: Pierre Parent
  • Date: 2014-07-06 10:32:13 UTC
  • mfrom: (4798.1.179 kicad)
  • Revision ID: pierre.parent@insa-rouen.fr-20140706103213-wjsdy0hc9q6wbz5v
Merge with lp:kicad 4977

Show diffs side-by-side

added added

removed removed

Lines of Context:
32
32
#ifndef BASE_STRUCT_H_
33
33
#define BASE_STRUCT_H_
34
34
 
 
35
#include <core/typeinfo.h>
 
36
 
35
37
#include <colors.h>
36
38
#include <bitmaps.h>
37
39
#include <richio.h>
38
40
#include <view/view_item.h>
39
41
 
40
 
#include <boost/ptr_container/ptr_vector.hpp>
41
 
 
42
42
#if defined(DEBUG)
43
43
#include <iostream>         // needed for Show()
44
44
extern std::ostream& operator <<( std::ostream& out, const wxSize& size );
369
369
    EDA_ITEM( const EDA_ITEM& base );
370
370
    virtual ~EDA_ITEM() { };
371
371
 
372
 
    /// @copydoc VIEW_ITEM::Type()
373
 
    KICAD_T Type()  const { return m_StructType; }
 
372
    /**
 
373
     * Function Type()
 
374
     *
 
375
     * returns the type of object.  This attribute should never be changed
 
376
     * after a constructor sets it, so there is no public "setter" method.
 
377
     * @return KICAD_T - the type of object.
 
378
     */
 
379
    inline KICAD_T Type() const
 
380
    {
 
381
        return m_StructType;
 
382
    }
374
383
 
375
384
    void SetTimeStamp( time_t aNewTimeStamp ) { m_TimeStamp = aNewTimeStamp; }
376
385
    time_t GetTimeStamp() const { return m_TimeStamp; }
377
386
 
378
 
    EDA_ITEM* Next() const { return (EDA_ITEM*) Pnext; }
379
 
    EDA_ITEM* Back() const { return (EDA_ITEM*) Pback; }
 
387
    EDA_ITEM* Next() const { return Pnext; }
 
388
    EDA_ITEM* Back() const { return Pback; }
380
389
    EDA_ITEM* GetParent() const { return m_Parent; }
381
390
    DHEAD* GetList() const { return m_List; }
382
391
 
456
465
     * Function HitTest
457
466
     * tests if \a aPosition is contained within or on the bounding area of an item.
458
467
     *
459
 
     * @note This function cannot be const because some of the derive objects perform
460
 
     *       intermediate calculations which change object members.  Make sure derived
461
 
     *       objects do not declare this as const.
462
 
     *
463
468
     * @param aPosition A reference to a wxPoint object containing the coordinates to test.
464
469
     * @return True if \a aPosition is within or on the item bounding area.
465
470
     */
466
 
    virtual bool HitTest( const wxPoint& aPosition )
 
471
    virtual bool HitTest( const wxPoint& aPosition ) const
467
472
    {
468
473
        return false;   // derived classes should override this function
469
474
    }