Commit 6c01c554 authored by charras's avatar charras

code cleanup, better comments and comments translation

parent 589873f3
/****************************************************************************/ /*********************************************/
/* string.cpp */ /* string.cpp */
/* ROLE: fonctions complementaires de traitement de chaines de caracteres */ /* some useful functions to handle strings */
/****************************************************************************/ /*********************************************/
#include "fctsys.h" #include "fctsys.h"
#include <time.h> #include <time.h>
...@@ -13,9 +13,9 @@ ...@@ -13,9 +13,9 @@
int ReadDelimitedText( char* dest, char* source, int NbMaxChar ) int ReadDelimitedText( char* dest, char* source, int NbMaxChar )
/*********************************************************************/ /*********************************************************************/
/* read a double-qute delimited text in source and put in in dest, /* read a double-quote delimited text from source and put it in in dest,
* read NbMaxChar bytes max * read NbMaxChar bytes max
* return the byte count read in source * return the char count read from source
*/ */
{ {
int ii, jj, flag = 0; int ii, jj, flag = 0;
......
This diff is collapsed.
This diff is collapsed.
...@@ -371,9 +371,6 @@ int DrawSheetStruct::ComponentCount() ...@@ -371,9 +371,6 @@ int DrawSheetStruct::ComponentCount()
/*******************************************************************/ /*******************************************************************/
{ {
//count our own components, without the power components. //count our own components, without the power components.
/* Routine retournant le nombre de composants dans le schema,
* powers non comprises */
int n = 0; int n = 0;
if( m_AssociatedScreen ) if( m_AssociatedScreen )
...@@ -678,7 +675,7 @@ DrawSheetPath::DrawSheetPath() ...@@ -678,7 +675,7 @@ DrawSheetPath::DrawSheetPath()
} }
int DrawSheetPath::Cmp( DrawSheetPath& d ) int DrawSheetPath::Cmp( const DrawSheetPath& d ) const
{ {
if( m_numSheets > d.m_numSheets ) if( m_numSheets > d.m_numSheets )
return 1; return 1;
......
...@@ -66,7 +66,7 @@ public: ...@@ -66,7 +66,7 @@ public:
*/ */
WX_DEFINE_ARRAY( DrawSheetStruct *, SheetGrowArray ); WX_DEFINE_ARRAY( DrawSheetStruct *, SheetGrowArray );
class DrawSheetStruct : public SCH_ITEM /* Gestion de la hierarchie */ class DrawSheetStruct : public SCH_ITEM
{ {
public: public:
wxString m_SheetName; /*this is equivalent to C101 for components: wxString m_SheetName; /*this is equivalent to C101 for components:
...@@ -76,13 +76,13 @@ private: ...@@ -76,13 +76,13 @@ private:
* but need it here for loading after * but need it here for loading after
* reading the sheet description from file. */ * reading the sheet description from file. */
public: public:
int m_SheetNameSize; /* Size (height) of the text, used to draw the name */ int m_SheetNameSize; /* Size (height) of the text, used to draw the sheet name */
int m_FileNameSize; /* Size (height) of the text, used to draw the name */ int m_FileNameSize; /* Size (height) of the text, used to draw the file name */
wxPoint m_Pos; wxPoint m_Pos;
wxSize m_Size; /* Position and Size of sheet symbol */ wxSize m_Size; /* Position and Size of sheet symbol */
int m_Layer; int m_Layer;
Hierarchical_PIN_Sheet_Struct* m_Label; /* Points de connection, linked list.*/ Hierarchical_PIN_Sheet_Struct* m_Label; /* Points de connection, linked list.*/
int m_NbLabel; /* Nombre de points de connexion */ int m_NbLabel; /* Pins sheet (corresponding to hierarchical labels) count */
SCH_SCREEN* m_AssociatedScreen; /* Associated Screen which handle the physical data SCH_SCREEN* m_AssociatedScreen; /* Associated Screen which handle the physical data
* In complex hierarchies we can have many DrawSheetStruct using the same data * In complex hierarchies we can have many DrawSheetStruct using the same data
*/ */
...@@ -149,7 +149,7 @@ public: ...@@ -149,7 +149,7 @@ public:
DrawSheetPath(); DrawSheetPath();
~DrawSheetPath() { }; ~DrawSheetPath() { };
void Clear() { m_numSheets = 0; } void Clear() { m_numSheets = 0; }
int Cmp( DrawSheetPath& d ); int Cmp( const DrawSheetPath& d ) const;
DrawSheetStruct* Last(); DrawSheetStruct* Last();
SCH_SCREEN* LastScreen(); SCH_SCREEN* LastScreen();
EDA_BaseStruct* LastDrawList(); EDA_BaseStruct* LastDrawList();
......
...@@ -134,9 +134,9 @@ public: ...@@ -134,9 +134,9 @@ public:
bool aRunBrowser); bool aRunBrowser);
void GenereListeOfItems(const wxString & FullFileName, bool aIncludeSubComponents ); void GenereListeOfItems(const wxString & FullFileName, bool aIncludeSubComponents );
void CreateExportList(const wxString & FullFileName, bool aIncludeSubComponents); void CreateExportList(const wxString & FullFileName, bool aIncludeSubComponents);
int PrintComponentsListByRef( FILE * f, ListComponent * List, int NbItems, int PrintComponentsListByRef( FILE * f, OBJ_CMP_TO_LIST * List, int NbItems,
bool CompactForm, bool aIncludeSubComponents ); bool CompactForm, bool aIncludeSubComponents );
int PrintComponentsListByVal( FILE *f, ListComponent * List, int NbItems, int PrintComponentsListByVal( FILE *f, OBJ_CMP_TO_LIST * List, int NbItems,
bool aIncludeSubComponents); bool aIncludeSubComponents);
void PrintFieldData(FILE * f, SCH_COMPONENT * DrawLibItem, bool CompactForm = FALSE); void PrintFieldData(FILE * f, SCH_COMPONENT * DrawLibItem, bool CompactForm = FALSE);
void SavePreferences(); void SavePreferences();
......
...@@ -319,7 +319,7 @@ void WinEDA_ErcFrame::TestErc( wxCommandEvent& event ) ...@@ -319,7 +319,7 @@ void WinEDA_ErcFrame::TestErc( wxCommandEvent& event )
/* Reset du flag m_FlagOfConnection, utilise par la suite */ /* Reset du flag m_FlagOfConnection, utilise par la suite */
for( NetItemRef = g_TabObjNet; NetItemRef < Lim; NetItemRef++ ) for( NetItemRef = g_TabObjNet; NetItemRef < Lim; NetItemRef++ )
NetItemRef->m_FlagOfConnection = (IsConnectType) 0; NetItemRef->m_FlagOfConnection = UNCONNECTED;
NetNbItems = 0; NetNbItems = 0;
MinConn = NOC; MinConn = NOC;
...@@ -692,7 +692,7 @@ static void TestOthersItems( WinEDA_DrawPanel* panel, wxDC* DC, ...@@ -692,7 +692,7 @@ static void TestOthersItems( WinEDA_DrawPanel* panel, wxDC* DC,
if( NetItemTst->m_FlagOfConnection == 0 ) if( NetItemTst->m_FlagOfConnection == 0 )
{ {
Diagnose( panel, DC, NetItemRef, NetItemTst, 0, erc ); Diagnose( panel, DC, NetItemRef, NetItemTst, 0, erc );
NetItemTst->m_FlagOfConnection = (IsConnectType) 1; NetItemTst->m_FlagOfConnection = NOCONNECT;
} }
} }
} }
......
/**************************************************************/ /**************************************************************/
/* libarch.cc */ /* libarch.cc */
/* Module de generation du fichier d'archivage des composants */ /* Module de generation du fichier d'archivage des composants */
/**************************************************************/ /**************************************************************/
#include <algorithm> // to use sort vector
#include <vector>
#include "fctsys.h" #include "fctsys.h"
#include "gr_basic.h"
#include "common.h" #include "common.h"
#include "program.h" #include "program.h"
...@@ -14,132 +15,102 @@ ...@@ -14,132 +15,102 @@
#include "protos.h" #include "protos.h"
/* Imported functions */
int BuildComponentsListFromSchematic( ListComponent* List );
/* Local functions*/ /* Local functions*/
static int TriListEntry(EDA_LibComponentStruct **Objet1, EDA_LibComponentStruct **Objet2); static bool TriListEntry( const EDA_LibComponentStruct* Objet1,
const EDA_LibComponentStruct* Objet2 );
/*******************************************************************/ /*******************************************************************/
bool LibArchive(wxWindow * frame, const wxString & ArchFullFileName) bool LibArchive( wxWindow* frame, const wxString& ArchFullFileName )
/*******************************************************************/ /*******************************************************************/
/* /*
Creation du fichier librairie contenant tous les composants utilis�s dans * Creates a library that contains all components used in the whole hierarchy
le projet en cours * return true if success
retourne TRUE si fichier cr�� */
*/
{ {
wxString DocFileName, msg; wxString DocFileName, msg;
char Line[256]; char Line[256];
FILE *ArchiveFile, *DocFile; FILE* ArchiveFile, * DocFile;
ListComponent * List; EDA_LibComponentStruct* Entry;
EDA_LibComponentStruct ** ListEntry, *Entry;
int ii, NbItems; std::vector <EDA_LibComponentStruct*> ListEntry;
const wxChar * Text;
EDA_ScreenList s_list;
/* Creation de la liste des elements */ // examine all screens used and build the list of components found in lib
NbItems = BuildComponentsListFromSchematic(NULL ); // Comptage des composants for( SCH_SCREEN* screen = s_list.GetFirst(); screen != NULL; screen = s_list.GetNext() )
if ( NbItems == 0 ) return FALSE; {
for( SCH_ITEM* SchItem = screen->EEDrawList; SchItem; SchItem = SchItem->Next() )
List = (ListComponent *) MyZMalloc( NbItems * sizeof( ListComponent ) ); {
if (List == NULL ) return FALSE; if( SchItem->Type() != TYPE_SCH_COMPONENT )
continue;
/* Calcul de la liste des composants */
BuildComponentsListFromSchematic(List); SCH_COMPONENT* DrawLibItem = (SCH_COMPONENT*) SchItem;
Entry = FindLibPart( DrawLibItem->m_ChipName.GetData(), wxEmptyString, FIND_ROOT );
/* Calcul de la liste des Entrees de librairie if( Entry ) // if NULL : component not found
et Remplacement des alias par les composants "Root" */ ListEntry.push_back( Entry );
ListEntry = (EDA_LibComponentStruct ** )
MyZMalloc( NbItems * sizeof(EDA_LibComponentStruct *) );
if (ListEntry == NULL ) return FALSE;
for ( ii = 0; ii < NbItems; ii++ )
{
Text = List[ii].m_Comp->m_ChipName.GetData();
Entry = FindLibPart(Text, wxEmptyString, FIND_ROOT);
ListEntry[ii] = Entry; // = NULL component not found
}
MyFree(List);
qsort( ListEntry, NbItems, sizeof(EDA_LibComponentStruct *),
(int(*)(const void*, const void*))TriListEntry);
/* mise a jour extension fichier doc associe */
DocFileName = ArchFullFileName;
ChangeFileNameExt(DocFileName, wxT(".bck"));
if ((ArchiveFile = wxFopen(ArchFullFileName, wxT("wt"))) == NULL)
{
MyFree(ListEntry);
msg = _("Failed to create archive lib file ") + ArchFullFileName;
DisplayError(frame, msg);
return FALSE;
}
if ((DocFile = wxFopen(DocFileName, wxT("wt"))) == NULL)
{
msg = _("Failed to create doc lib file ") + DocFileName;
DisplayError(frame, msg);
}
fprintf(ArchiveFile,"%s %s\n#\n", LIBFILE_IDENT,DateAndTime(Line));
if( DocFile)
fprintf(DocFile,"%s %s\n", DOCFILE_IDENT, DateAndTime(Line));
/* Save components in file */
for ( ii = 0; ii < NbItems; ii++ )
{
if ( ListEntry[ii] == NULL ) // Not found in lib
{
continue;
} }
if ( (ii == 0) || ( ListEntry[ii-1] != ListEntry[ii] ) ) }
{
if ( ListEntry[ii]->Type == ROOT) // Must be always true, but just in case sort( ListEntry.begin(), ListEntry.end(), TriListEntry );
ListEntry[ii]->Save(ArchiveFile);
if( DocFile ) /* calculate the file name for the associated doc file */
ListEntry[ii]->SaveDoc(DocFile); DocFileName = ArchFullFileName;
} ChangeFileNameExt( DocFileName, DOC_EXT );
}
if( ( ArchiveFile = wxFopen( ArchFullFileName, wxT( "wt" ) ) ) == NULL )
fprintf(ArchiveFile,"#\n#EndLibrary\n"); {
fclose(ArchiveFile); msg = _( "Failed to create archive lib file " ) + ArchFullFileName;
DisplayError( frame, msg );
if( DocFile ) return FALSE;
{ }
fprintf(DocFile,"#\n#End Doc Library\n");
fclose(DocFile); if( ( DocFile = wxFopen( DocFileName, wxT( "wt" ) ) ) == NULL )
} {
msg = _( "Failed to create doc lib file " ) + DocFileName;
MyFree(ListEntry); DisplayError( frame, msg );
}
return TRUE;
} fprintf( ArchiveFile, "%s %s\n#\n", LIBFILE_IDENT, DateAndTime( Line ) );
if( DocFile )
/***********************************************************/ fprintf( DocFile, "%s %s\n", DOCFILE_IDENT, DateAndTime( Line ) );
static int TriListEntry(EDA_LibComponentStruct **Objet1,
EDA_LibComponentStruct **Objet2) /* Save components in file */
/***********************************************************/ for( unsigned ii = 0; ii < ListEntry.size(); ii++ )
/* Routine de comparaison pour le tri du Tableau par qsort() {
Les composants sont tries par LibName if( (ii == 0) || ( ListEntry[ii - 1] != ListEntry[ii] ) )
*/ {
{ if( ListEntry[ii]->Type == ROOT ) // Must be always true, but just in case
int ii; ListEntry[ii]->Save( ArchiveFile );
const wxString * Text1, *Text2; if( DocFile )
ListEntry[ii]->SaveDoc( DocFile );
}
}
if( (*Objet1 == NULL) && (*Objet2 == NULL ) ) return(0); fprintf( ArchiveFile, "#\n#EndLibrary\n" );
if( *Objet1 == NULL) return(-1); fclose( ArchiveFile );
if( *Objet2 == NULL) return(1);
Text1 = &(*Objet1)->m_Name.m_Text; if( DocFile )
Text2 = &(*Objet2)->m_Name.m_Text; {
fprintf( DocFile, "#\n#End Doc Library\n" );
fclose( DocFile );
}
ii = Text1->CmpNoCase(* Text2); return TRUE;
return(ii);
} }
/***********************************************************************************************/
bool TriListEntry( const EDA_LibComponentStruct* Objet1, const EDA_LibComponentStruct* Objet2 )
/***********************************************************************************************/
/* Compare function for sort()
* lib components are sorted by name
*/
{
int ii;
ii = Objet1->m_Name.m_Text.CmpNoCase( Objet2->m_Name.m_Text );
return ii < 0;
}
...@@ -539,7 +539,7 @@ static void WriteNetListPCBNEW( WinEDA_SchematicFrame* frame, FILE* f, bool with ...@@ -539,7 +539,7 @@ static void WriteNetListPCBNEW( WinEDA_SchematicFrame* frame, FILE* f, bool with
EDA_BaseStruct* DrawList; EDA_BaseStruct* DrawList;
SCH_COMPONENT* Component; SCH_COMPONENT* Component;
int ii; int ii;
ListComponent* CmpList = NULL; OBJ_CMP_TO_LIST* CmpList = NULL;
int CmpListCount = 0, CmpListSize = 1000; int CmpListCount = 0, CmpListSize = 1000;
DateAndTime( Buf ); DateAndTime( Buf );
...@@ -571,18 +571,18 @@ static void WriteNetListPCBNEW( WinEDA_SchematicFrame* frame, FILE* f, bool with ...@@ -571,18 +571,18 @@ static void WriteNetListPCBNEW( WinEDA_SchematicFrame* frame, FILE* f, bool with
{ {
if( CmpList == NULL ) if( CmpList == NULL )
{ {
CmpList = (ListComponent*) CmpList = (OBJ_CMP_TO_LIST*)
MyZMalloc( sizeof(ListComponent) * CmpListSize ); MyZMalloc( sizeof(OBJ_CMP_TO_LIST) * CmpListSize );
} }
if( CmpListCount >= CmpListSize ) if( CmpListCount >= CmpListSize )
{ {
CmpListSize += 1000; CmpListSize += 1000;
CmpList = (ListComponent*) realloc( CmpList = (OBJ_CMP_TO_LIST*) realloc(
CmpList, CmpList,
sizeof(ListComponent) * CmpListSize ); sizeof(OBJ_CMP_TO_LIST) * CmpListSize );
} }
CmpList[CmpListCount].m_Comp = Component; CmpList[CmpListCount].m_RootCmp = Component;
strcpy( CmpList[CmpListCount].m_Ref, Component->GetRef( sheet ).mb_str() ); strcpy( CmpList[CmpListCount].m_Reference, Component->GetRef( sheet ).mb_str() );
CmpListCount++; CmpListCount++;
} }
} }
...@@ -643,19 +643,19 @@ static void WriteNetListPCBNEW( WinEDA_SchematicFrame* frame, FILE* f, bool with ...@@ -643,19 +643,19 @@ static void WriteNetListPCBNEW( WinEDA_SchematicFrame* frame, FILE* f, bool with
EDA_LibComponentStruct* Entry; EDA_LibComponentStruct* Entry;
for( ii = 0; ii < CmpListCount; ii++ ) for( ii = 0; ii < CmpListCount; ii++ )
{ {
Component = CmpList[ii].m_Comp; Component = CmpList[ii].m_RootCmp;
Entry = FindLibPart( Component->m_ChipName.GetData(), wxEmptyString, FIND_ROOT ); Entry = FindLibPart( Component->m_ChipName.GetData(), wxEmptyString, FIND_ROOT );
//Line.Printf(_("%s"), CmpList[ii].m_Ref); //Line.Printf(_("%s"), CmpList[ii].m_Ref);
//Line.Replace( wxT( " " ), wxT( "_" ) ); //Line.Replace( wxT( " " ), wxT( "_" ) );
unsigned int i; unsigned int i;
for( i = 0; i<sizeof(CmpList[ii].m_Ref) && CmpList[ii].m_Ref[i]; i++ ) for( i = 0; i<sizeof(CmpList[ii].m_Reference) && CmpList[ii].m_Reference[i]; i++ )
{ {
if( CmpList[ii].m_Ref[i] == ' ' ) if( CmpList[ii].m_Reference[i] == ' ' )
CmpList[ii].m_Ref[i] = '_'; CmpList[ii].m_Reference[i] = '_';
} }
fprintf( f, "$component %s\n", CmpList[ii].m_Ref ); fprintf( f, "$component %s\n", CmpList[ii].m_Reference );
/* Write the footprint list */ /* Write the footprint list */
for( unsigned int jj = 0; jj < Entry->m_FootprintList.GetCount(); jj++ ) for( unsigned int jj = 0; jj < Entry->m_FootprintList.GetCount(); jj++ )
{ {
......
...@@ -1200,13 +1200,13 @@ static void SetUnconnectedFlag( ObjetNetListStruct* ListObj, int NbItems ) ...@@ -1200,13 +1200,13 @@ static void SetUnconnectedFlag( ObjetNetListStruct* ListObj, int NbItems )
ObjetNetListStruct* NetItemRef, * NetItemTst, * ItemPtr; ObjetNetListStruct* NetItemRef, * NetItemTst, * ItemPtr;
ObjetNetListStruct* NetStart, * NetEnd, * Lim; ObjetNetListStruct* NetStart, * NetEnd, * Lim;
int Nb; int Nb;
IsConnectType StateFlag; ConnectType StateFlag;
NetStart = NetEnd = ListObj; NetStart = NetEnd = ListObj;
NetItemRef = NetStart; NetItemRef = NetStart;
Nb = 0; Nb = 0;
StateFlag = UNCONNECT; StateFlag = UNCONNECTED;
Lim = ListObj + NbItems; Lim = ListObj + NbItems;
for( ; NetItemRef < Lim; NetItemRef++ ) for( ; NetItemRef < Lim; NetItemRef++ )
...@@ -1233,7 +1233,7 @@ static void SetUnconnectedFlag( ObjetNetListStruct* ListObj, int NbItems ) ...@@ -1233,7 +1233,7 @@ static void SetUnconnectedFlag( ObjetNetListStruct* ListObj, int NbItems )
return; return;
/* Start Analyse Nouveau Net */ /* Start Analyse Nouveau Net */
StateFlag = UNCONNECT; StateFlag = UNCONNECTED;
NetStart = NetItemTst; NetStart = NetItemTst;
continue; continue;
} }
......
...@@ -52,8 +52,8 @@ enum NetObjetType { /* Type des objets de Net */ ...@@ -52,8 +52,8 @@ enum NetObjetType { /* Type des objets de Net */
}; };
enum IsConnectType { /* Valeur du Flag de connection */ enum ConnectType { /* Valeur du Flag de connection */
UNCONNECT, /* Pin ou Label non connecte */ UNCONNECTED = 0, /* Pin ou Label non connecte */
NOCONNECT, /* Pin volontairement non connectee (Symb. NoConnect utilise) */ NOCONNECT, /* Pin volontairement non connectee (Symb. NoConnect utilise) */
PAD_CONNECT /* connexion normale */ PAD_CONNECT /* connexion normale */
}; };
...@@ -76,7 +76,7 @@ public: ...@@ -76,7 +76,7 @@ public:
int m_BusNetCode; /* pour connexions type bus */ int m_BusNetCode; /* pour connexions type bus */
int m_Member; /* pour les labels type BUSWIRE ( labels de bus eclate ) int m_Member; /* pour les labels type BUSWIRE ( labels de bus eclate )
* numero de membre */ * numero de membre */
IsConnectType m_FlagOfConnection; ConnectType m_FlagOfConnection;
DrawSheetPath m_SheetListInclude; /* sheet that the hierarchal label connects to.*/ DrawSheetPath m_SheetListInclude; /* sheet that the hierarchal label connects to.*/
long m_PinNum; /* numero de pin( 4 octets -> 4 codes ascii) */ long m_PinNum; /* numero de pin( 4 octets -> 4 codes ascii) */
const wxString* m_Label; /* Tous types Labels:pointeur sur la wxString definissant le label */ const wxString* m_Label; /* Tous types Labels:pointeur sur la wxString definissant le label */
...@@ -92,45 +92,59 @@ public: ...@@ -92,45 +92,59 @@ public:
}; };
/* Structures pour memo et liste des elements */ /* object used in annotation to handle a list of components in schematic
struct ListLabel * because in a complex hierarchy, a component is used more than once,
* and its reference is depending on the sheet path
* for the same component, we must create a flat list of components
* used in nelist generation, BOM generation and annotation
*/
class OBJ_CMP_TO_LIST
{ {
int m_LabelType; public:
void* m_Label; SCH_COMPONENT* m_RootCmp; // the component in schematic
char m_SheetPath[256]; EDA_LibComponentStruct* m_Entry; // the source component in library
}; int m_Unit; /* Selected part (For multi parts per package) depending on sheet path */
DrawSheetPath m_SheetPath; /* the sheet path for this component */
unsigned long m_TimeStamp; /* unique identification number depending on sheet path */
bool m_IsNew; /* true for not yet annotated components */
wxString* m_Value; /* Component value (same for all instances) */
char m_Reference[32]; /* Component reference prefix, without number (for IC1, this is IC) ) */
int m_NumRef; /* Reference number (for IC1, this is 1) ) depending on sheet path*/
int m_Flag; /* flag for computations */
public:
// Used to create lists of components BOM, netlist generation) OBJ_CMP_TO_LIST()
struct ListComponent {
{ m_RootCmp = NULL;
SCH_COMPONENT* m_Comp; // pointer on the component in schematic m_Entry = NULL;
char m_Ref[32]; // component reference m_Unit = 0;
int m_Unit; // Unit value, for multiple parts per package m_TimeStamp = 0;
//have to store it here since the object references will be duplicated. m_IsNew = false;
DrawSheetPath m_SheetList; //composed of UIDs m_Value = NULL;
m_Reference[0] = 0;
m_NumRef = 0;
m_Flag = 0;
}
int CompareValue( const OBJ_CMP_TO_LIST& item ) const
{
return m_Value->CmpNoCase( *item.m_Value );
}
int CompareRef( const OBJ_CMP_TO_LIST& item ) const
{
return strnicmp( m_Reference, item.m_Reference, 32 );
}
bool IsPartsLocked( )
{
return m_Entry->m_UnitSelectionLocked;
}
}; };
/* Structure decrivant 1 composant de la schematique (for annotation ) */
struct CmpListStruct
{
public:
SCH_COMPONENT* m_Cmp; /* Pointeur sur le composant */
int m_NbParts; /* Nombre de parts par boitier */
bool m_PartsLocked; // For multi part components: True if the part cannot be changed
int m_Unit; /* Numero de part */
DrawSheetPath m_SheetList;
unsigned long m_TimeStamp; /* unique identification number */
int m_IsNew; /* != 0 pour composants non annotes */
char m_TextValue[32]; /* Valeur */
char m_TextRef[32]; /* Reference ( hors numero ) */
int m_NumRef; /* Numero de reference */
int m_Flag; /* flag pour calculs internes */
wxPoint m_Pos; /* position components */
char m_Path[256]; // the 'path' of the object in the sheet hierarchy.
};
/* Global Variables */ /* Global Variables */
eda_global int g_NbrObjNet; eda_global int g_NbrObjNet;
......
...@@ -40,7 +40,7 @@ void InstallCmpeditFrame(WinEDA_SchematicFrame * parent, wxPoint & pos, ...@@ -40,7 +40,7 @@ void InstallCmpeditFrame(WinEDA_SchematicFrame * parent, wxPoint & pos,
/******************************/ /******************************/
int LibraryEntryCompare(EDA_LibComponentStruct *LE1, EDA_LibComponentStruct *LE2); int LibraryEntryCompare(EDA_LibComponentStruct *LE1, EDA_LibComponentStruct *LE2);
int NumOfLibraries(); int NumOfLibraries();
EDA_LibComponentStruct *FindLibPart(const wxChar *Name, const wxString & LibName, int Alias); EDA_LibComponentStruct *FindLibPart(const wxChar *Name, const wxString & LibName, int Alias = FIND_ROOT);
void DrawingLibInGhost(WinEDA_DrawPanel * panel, wxDC * DC, EDA_LibComponentStruct *LibEntry, void DrawingLibInGhost(WinEDA_DrawPanel * panel, wxDC * DC, EDA_LibComponentStruct *LibEntry,
SCH_COMPONENT * DrawLibItem, int PartX, int PartY, SCH_COMPONENT * DrawLibItem, int PartX, int PartY,
......
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