Commit fe284db0 authored by raburton's avatar raburton

set eol-style native on new files

parent bffa0689
This diff is collapsed.
/*************************************************/
/* class_drc_item.cpp - DRC_ITEM class functions */
/*************************************************/
#include "fctsys.h"
#include "common.h"
#include "pcbnew.h"
wxString DRC_ITEM::GetErrorText() const
{
switch( m_ErrorCode )
{
// case DRCE_: not assigned yet
case DRCE_UNCONNECTED_PADS:
return wxString( _("Unconnected pads") );
case DRCE_TRACK_NEAR_THROUGH_HOLE:
return wxString( _("Track near thru-hole") );
case DRCE_TRACK_NEAR_PAD:
return wxString( _("Track near pad") );
case DRCE_TRACK_NEAR_VIA:
return wxString( _("Track near via") );
case DRCE_VIA_NEAR_VIA:
return wxString( _("Via near via") );
case DRCE_VIA_NEAR_TRACK:
return wxString( _("Via near track") );
case DRCE_TRACK_ENDS1:
case DRCE_TRACK_ENDS2:
case DRCE_TRACK_ENDS3:
case DRCE_TRACK_ENDS4:
case DRCE_ENDS_PROBLEM1:
case DRCE_ENDS_PROBLEM2:
case DRCE_ENDS_PROBLEM3:
case DRCE_ENDS_PROBLEM4:
case DRCE_ENDS_PROBLEM5:
return wxString( _("Two track ends") );
case DRCE_TRACK_UNKNOWN1:
return wxString( _("This looks bad") ); ///< @todo check source code and change this comment
case DRCE_TRACKS_CROSSING:
return wxString( _("Tracks crossing") );
case DRCE_PAD_NEAR_PAD1:
return wxString( _("Pad near pad") );
case DRCE_VIA_HOLE_BIGGER:
return wxString( _("Via hole > diameter"));
default:
return wxString( wxT("PROGRAM BUG, PLEASE LEAVE THE ROOM.") );
}
}
wxString DRC_ITEM::ShowCoord( const wxPoint& aPos )
{
wxString temp;
wxString ret;
ret << wxT("@(") << valeur_param( aPos.x, temp );
ret << wxT(",") << valeur_param( aPos.y, temp );
ret << wxT(")");
return ret;
}
/*************************************************/
/* class_drc_item.cpp - DRC_ITEM class functions */
/*************************************************/
#include "fctsys.h"
#include "common.h"
#include "pcbnew.h"
wxString DRC_ITEM::GetErrorText() const
{
switch( m_ErrorCode )
{
// case DRCE_: not assigned yet
case DRCE_UNCONNECTED_PADS:
return wxString( _("Unconnected pads") );
case DRCE_TRACK_NEAR_THROUGH_HOLE:
return wxString( _("Track near thru-hole") );
case DRCE_TRACK_NEAR_PAD:
return wxString( _("Track near pad") );
case DRCE_TRACK_NEAR_VIA:
return wxString( _("Track near via") );
case DRCE_VIA_NEAR_VIA:
return wxString( _("Via near via") );
case DRCE_VIA_NEAR_TRACK:
return wxString( _("Via near track") );
case DRCE_TRACK_ENDS1:
case DRCE_TRACK_ENDS2:
case DRCE_TRACK_ENDS3:
case DRCE_TRACK_ENDS4:
case DRCE_ENDS_PROBLEM1:
case DRCE_ENDS_PROBLEM2:
case DRCE_ENDS_PROBLEM3:
case DRCE_ENDS_PROBLEM4:
case DRCE_ENDS_PROBLEM5:
return wxString( _("Two track ends") );
case DRCE_TRACK_UNKNOWN1:
return wxString( _("This looks bad") ); ///< @todo check source code and change this comment
case DRCE_TRACKS_CROSSING:
return wxString( _("Tracks crossing") );
case DRCE_PAD_NEAR_PAD1:
return wxString( _("Pad near pad") );
case DRCE_VIA_HOLE_BIGGER:
return wxString( _("Via hole > diameter"));
default:
return wxString( wxT("PROGRAM BUG, PLEASE LEAVE THE ROOM.") );
}
}
wxString DRC_ITEM::ShowCoord( const wxPoint& aPos )
{
wxString temp;
wxString ret;
ret << wxT("@(") << valeur_param( aPos.x, temp );
ret << wxT(",") << valeur_param( aPos.y, temp );
ret << wxT(")");
return ret;
}
/**********************************/
/* classes to handle copper zones */
/**********************************/
#include "fctsys.h"
#include "wxstruct.h"
#include "gr_basic.h"
#include "common.h"
#include "pcbnew.h"
/************************/
/* class ZONE_CONTAINER */
/************************/
ZONE_CONTAINER::ZONE_CONTAINER (BOARD * parent):
BOARD_ITEM (parent, TYPEZONE_CONTAINER)
{
m_NetCode = -1; // Net number for fast comparisons
}
ZONE_CONTAINER::~ZONE_CONTAINER()
{
}
bool ZONE_CONTAINER::Save( FILE* aFile ) const
{
return true;
}
/**********************/
/* Class EDGE_ZONE */
/**********************/
/* Constructor */
EDGE_ZONE::EDGE_ZONE( BOARD_ITEM* parent ) :
DRAWSEGMENT( parent, TYPEEDGEZONE )
{
m_Width = 2; // a minimum for visibility, while dragging
}
/* Destructor */
EDGE_ZONE:: ~EDGE_ZONE()
{
}
bool EDGE_ZONE::Save( FILE* aFile ) const
{
if( GetState( DELETED ) )
return true;
int ret = fprintf( aFile, "ZE %d %d %d %d %d %lX %X\n",
m_Start.x, m_Start.y,
m_End.x, m_End.y,
m_Angle,
m_TimeStamp,
ReturnStatus()
);
return (ret > 14 );
}
/**********************************/
/* classes to handle copper zones */
/**********************************/
#include "fctsys.h"
#include "wxstruct.h"
#include "gr_basic.h"
#include "common.h"
#include "pcbnew.h"
/************************/
/* class ZONE_CONTAINER */
/************************/
ZONE_CONTAINER::ZONE_CONTAINER (BOARD * parent):
BOARD_ITEM (parent, TYPEZONE_CONTAINER)
{
m_NetCode = -1; // Net number for fast comparisons
}
ZONE_CONTAINER::~ZONE_CONTAINER()
{
}
bool ZONE_CONTAINER::Save( FILE* aFile ) const
{
return true;
}
/**********************/
/* Class EDGE_ZONE */
/**********************/
/* Constructor */
EDGE_ZONE::EDGE_ZONE( BOARD_ITEM* parent ) :
DRAWSEGMENT( parent, TYPEEDGEZONE )
{
m_Width = 2; // a minimum for visibility, while dragging
}
/* Destructor */
EDGE_ZONE:: ~EDGE_ZONE()
{
}
bool EDGE_ZONE::Save( FILE* aFile ) const
{
if( GetState( DELETED ) )
return true;
int ret = fprintf( aFile, "ZE %d %d %d %d %d %lX %X\n",
m_Start.x, m_Start.y,
m_End.x, m_End.y,
m_Angle,
m_TimeStamp,
ReturnStatus()
);
return (ret > 14 );
}
/**********************************/
/* classes to handle copper zones */
/**********************************/
#ifndef CLASS_ZONE_H
#define CLASS_ZONE_H
/************************/
/* class ZONE_CONTAINER */
/************************/
/* handle a list of polygons delimiting a copper zone
* a zone is described by a main polygon, a time stamp, a layer and a net name.
* others polygons inside this main polygon are holes.
*/
class ZONE_CONTAINER : public BOARD_ITEM // Not sure BOARD_ITEM is better than EDA_BaseStruct
{
public:
wxString m_Netname; /* Net Name */
private:
int m_NetCode; // Net number for fast comparisons
public:
ZONE_CONTAINER(BOARD * parent);
~ZONE_CONTAINER();
bool Save( FILE* aFile ) const;
};
/*******************/
/* class EDGE_ZONE */
/*******************/
class EDGE_ZONE : public DRAWSEGMENT
{
public:
EDGE_ZONE( BOARD_ITEM* StructFather );
EDGE_ZONE( const EDGE_ZONE& edgezone );
~EDGE_ZONE();
EDGE_ZONE* Next() { return (EDGE_ZONE*) Pnext; }
EDGE_ZONE* Back() { return (EDGE_ZONE*) Pback; }
/**
* Function Save
* writes the data structures for this object out to a FILE in "*.brd" format.
* @param aFile The FILE to write to.
* @return bool - true if success writing else false.
*/
bool Save( FILE* aFile ) const;
};
#endif // #ifndef CLASS_ZONE_H
/**********************************/
/* classes to handle copper zones */
/**********************************/
#ifndef CLASS_ZONE_H
#define CLASS_ZONE_H
/************************/
/* class ZONE_CONTAINER */
/************************/
/* handle a list of polygons delimiting a copper zone
* a zone is described by a main polygon, a time stamp, a layer and a net name.
* others polygons inside this main polygon are holes.
*/
class ZONE_CONTAINER : public BOARD_ITEM // Not sure BOARD_ITEM is better than EDA_BaseStruct
{
public:
wxString m_Netname; /* Net Name */
private:
int m_NetCode; // Net number for fast comparisons
public:
ZONE_CONTAINER(BOARD * parent);
~ZONE_CONTAINER();
bool Save( FILE* aFile ) const;
};
/*******************/
/* class EDGE_ZONE */
/*******************/
class EDGE_ZONE : public DRAWSEGMENT
{
public:
EDGE_ZONE( BOARD_ITEM* StructFather );
EDGE_ZONE( const EDGE_ZONE& edgezone );
~EDGE_ZONE();
EDGE_ZONE* Next() { return (EDGE_ZONE*) Pnext; }
EDGE_ZONE* Back() { return (EDGE_ZONE*) Pback; }
/**
* Function Save
* writes the data structures for this object out to a FILE in "*.brd" format.
* @param aFile The FILE to write to.
* @return bool - true if success writing else false.
*/
bool Save( FILE* aFile ) const;
};
#endif // #ifndef CLASS_ZONE_H
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment