Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
K
kicad-source-mirror
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
Elphel
kicad-source-mirror
Commits
6c01c554
Commit
6c01c554
authored
Dec 10, 2008
by
charras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
code cleanup, better comments and comments translation
parent
589873f3
Changes
12
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
633 additions
and
754 deletions
+633
-754
string.cpp
common/string.cpp
+6
-6
annotate.cpp
eeschema/annotate.cpp
+256
-353
build_BOM.cpp
eeschema/build_BOM.cpp
+203
-209
class_drawsheet.cpp
eeschema/class_drawsheet.cpp
+1
-4
class_drawsheet.h
eeschema/class_drawsheet.h
+5
-5
dialog_build_BOM.h
eeschema/dialog_build_BOM.h
+2
-2
erc.cpp
eeschema/erc.cpp
+2
-2
libarch.cpp
eeschema/libarch.cpp
+91
-120
netform.cpp
eeschema/netform.cpp
+12
-12
netlist.cpp
eeschema/netlist.cpp
+3
-3
netlist.h
eeschema/netlist.h
+51
-37
protos.h
eeschema/protos.h
+1
-1
No files found.
common/string.cpp
View file @
6c01c554
/*********************************************
*******************************
/
/*********************************************/
/* string.cpp */
/*
ROLE: fonctions complementaires de traitement de chaines de caractere
s */
/*********************************************
*******************************
/
/*
some useful functions to handle string
s */
/*********************************************/
#include "fctsys.h"
#include <time.h>
...
...
@@ -13,9 +13,9 @@
int
ReadDelimitedText
(
char
*
dest
,
char
*
source
,
int
NbMaxChar
)
/*********************************************************************/
/* read a double-qu
te delimited text in source and pu
t in in dest,
/* read a double-qu
ote delimited text from source and put i
t in in dest,
* read NbMaxChar bytes max
* return the
byte count read in
source
* return the
char count read from
source
*/
{
int
ii
,
jj
,
flag
=
0
;
...
...
eeschema/annotate.cpp
View file @
6c01c554
This diff is collapsed.
Click to expand it.
eeschema/build_BOM.cpp
View file @
6c01c554
This diff is collapsed.
Click to expand it.
eeschema/class_drawsheet.cpp
View file @
6c01c554
...
...
@@ -371,9 +371,6 @@ int DrawSheetStruct::ComponentCount()
/*******************************************************************/
{
//count our own components, without the power components.
/* Routine retournant le nombre de composants dans le schema,
* powers non comprises */
int
n
=
0
;
if
(
m_AssociatedScreen
)
...
...
@@ -678,7 +675,7 @@ DrawSheetPath::DrawSheetPath()
}
int
DrawSheetPath
::
Cmp
(
DrawSheetPath
&
d
)
int
DrawSheetPath
::
Cmp
(
const
DrawSheetPath
&
d
)
const
{
if
(
m_numSheets
>
d
.
m_numSheets
)
return
1
;
...
...
eeschema/class_drawsheet.h
View file @
6c01c554
...
...
@@ -66,7 +66,7 @@ public:
*/
WX_DEFINE_ARRAY
(
DrawSheetStruct
*
,
SheetGrowArray
);
class
DrawSheetStruct
:
public
SCH_ITEM
/* Gestion de la hierarchie */
class
DrawSheetStruct
:
public
SCH_ITEM
{
public
:
wxString
m_SheetName
;
/*this is equivalent to C101 for components:
...
...
@@ -76,13 +76,13 @@ private:
* but need it here for loading after
* reading the sheet description from file. */
public
:
int
m_SheetNameSize
;
/* Size (height) of the text, used to draw the name */
int
m_FileNameSize
;
/* 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
file
name */
wxPoint
m_Pos
;
wxSize
m_Size
;
/* Position and Size of sheet symbol */
int
m_Layer
;
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
* In complex hierarchies we can have many DrawSheetStruct using the same data
*/
...
...
@@ -149,7 +149,7 @@ public:
DrawSheetPath
();
~
DrawSheetPath
()
{
};
void
Clear
()
{
m_numSheets
=
0
;
}
int
Cmp
(
DrawSheetPath
&
d
)
;
int
Cmp
(
const
DrawSheetPath
&
d
)
const
;
DrawSheetStruct
*
Last
();
SCH_SCREEN
*
LastScreen
();
EDA_BaseStruct
*
LastDrawList
();
...
...
eeschema/dialog_build_BOM.h
View file @
6c01c554
...
...
@@ -134,9 +134,9 @@ public:
bool
aRunBrowser
);
void
GenereListeOfItems
(
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
);
int
PrintComponentsListByVal
(
FILE
*
f
,
ListComponent
*
List
,
int
NbItems
,
int
PrintComponentsListByVal
(
FILE
*
f
,
OBJ_CMP_TO_LIST
*
List
,
int
NbItems
,
bool
aIncludeSubComponents
);
void
PrintFieldData
(
FILE
*
f
,
SCH_COMPONENT
*
DrawLibItem
,
bool
CompactForm
=
FALSE
);
void
SavePreferences
();
...
...
eeschema/erc.cpp
View file @
6c01c554
...
...
@@ -319,7 +319,7 @@ void WinEDA_ErcFrame::TestErc( wxCommandEvent& event )
/* Reset du flag m_FlagOfConnection, utilise par la suite */
for
(
NetItemRef
=
g_TabObjNet
;
NetItemRef
<
Lim
;
NetItemRef
++
)
NetItemRef
->
m_FlagOfConnection
=
(
IsConnectType
)
0
;
NetItemRef
->
m_FlagOfConnection
=
UNCONNECTED
;
NetNbItems
=
0
;
MinConn
=
NOC
;
...
...
@@ -692,7 +692,7 @@ static void TestOthersItems( WinEDA_DrawPanel* panel, wxDC* DC,
if
(
NetItemTst
->
m_FlagOfConnection
==
0
)
{
Diagnose
(
panel
,
DC
,
NetItemRef
,
NetItemTst
,
0
,
erc
);
NetItemTst
->
m_FlagOfConnection
=
(
IsConnectType
)
1
;
NetItemTst
->
m_FlagOfConnection
=
NOCONNECT
;
}
}
}
...
...
eeschema/libarch.cpp
View file @
6c01c554
/**************************************************************/
/* libarch.cc */
/* Module de generation du fichier d'archivage des composants */
/**************************************************************/
/**************************************************************/
/* libarch.cc */
/* Module de generation du fichier d'archivage des composants */
/**************************************************************/
#include <algorithm> // to use sort vector
#include <vector>
#include "fctsys.h"
#include "gr_basic.h"
#include "common.h"
#include "program.h"
...
...
@@ -14,132 +15,102 @@
#include "protos.h"
/* Imported functions */
int
BuildComponentsListFromSchematic
(
ListComponent
*
List
);
/* 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
le projet en cours
retourne TRUE si fichier cr��
*/
* Creates a library that contains all components used in the whole hierarchy
* return true if success
*/
{
wxString
DocFileName
,
msg
;
char
Line
[
256
];
FILE
*
ArchiveFile
,
*
DocFile
;
ListComponent
*
List
;
EDA_LibComponentStruct
**
ListEntry
,
*
Entry
;
int
ii
,
NbItems
;
const
wxChar
*
Text
;
/* Creation de la liste des elements */
NbItems
=
BuildComponentsListFromSchematic
(
NULL
);
// Comptage des composants
if
(
NbItems
==
0
)
return
FALSE
;
wxString
DocFileName
,
msg
;
char
Line
[
256
];
FILE
*
ArchiveFile
,
*
DocFile
;
EDA_LibComponentStruct
*
Entry
;
List
=
(
ListComponent
*
)
MyZMalloc
(
NbItems
*
sizeof
(
ListComponent
)
);
if
(
List
==
NULL
)
return
FALSE
;
std
::
vector
<
EDA_LibComponentStruct
*>
ListEntry
;
/* Calcul de la liste des composants */
BuildComponentsListFromSchematic
(
List
);
EDA_ScreenList
s_list
;
/* Calcul de la liste des Entrees de librairie
et Remplacement des alias par les composants "Root" */
ListEntry
=
(
EDA_LibComponentStruct
**
)
MyZMalloc
(
NbItems
*
sizeof
(
EDA_LibComponentStruct
*
)
);
if
(
ListEntry
==
NULL
)
return
FALSE
;
for
(
ii
=
0
;
ii
<
NbItems
;
ii
++
)
// examine all screens used and build the list of components found in lib
for
(
SCH_SCREEN
*
screen
=
s_list
.
GetFirst
();
screen
!=
NULL
;
screen
=
s_list
.
GetNext
()
)
{
Text
=
List
[
ii
].
m_Comp
->
m_ChipName
.
GetData
();
Entry
=
FindLibPart
(
Text
,
wxEmptyString
,
FIND_ROOT
);
ListEntry
[
ii
]
=
Entry
;
// = NULL component not found
}
for
(
SCH_ITEM
*
SchItem
=
screen
->
EEDrawList
;
SchItem
;
SchItem
=
SchItem
->
Next
()
)
{
if
(
SchItem
->
Type
()
!=
TYPE_SCH_COMPONENT
)
continue
;
MyFree
(
List
);
SCH_COMPONENT
*
DrawLibItem
=
(
SCH_COMPONENT
*
)
SchItem
;
Entry
=
FindLibPart
(
DrawLibItem
->
m_ChipName
.
GetData
(),
wxEmptyString
,
FIND_ROOT
);
if
(
Entry
)
// if NULL : component not found
ListEntry
.
push_back
(
Entry
);
}
}
qsort
(
ListEntry
,
NbItems
,
sizeof
(
EDA_LibComponentStruct
*
),
(
int
(
*
)(
const
void
*
,
const
void
*
))
TriListEntry
);
sort
(
ListEntry
.
begin
(),
ListEntry
.
end
(),
TriListEntry
);
/* mise a jour extension fichier doc associ
e */
/* calculate the file name for the associated doc fil
e */
DocFileName
=
ArchFullFileName
;
ChangeFileNameExt
(
DocFileName
,
wxT
(
".bck"
)
);
ChangeFileNameExt
(
DocFileName
,
DOC_EXT
);
if
((
ArchiveFile
=
wxFopen
(
ArchFullFileName
,
wxT
(
"wt"
)))
==
NULL
)
if
(
(
ArchiveFile
=
wxFopen
(
ArchFullFileName
,
wxT
(
"wt"
)
)
)
==
NULL
)
{
MyFree
(
ListEntry
);
msg
=
_
(
"Failed to create archive lib file "
)
+
ArchFullFileName
;
DisplayError
(
frame
,
msg
);
msg
=
_
(
"Failed to create archive lib file "
)
+
ArchFullFileName
;
DisplayError
(
frame
,
msg
);
return
FALSE
;
}
if
((
DocFile
=
wxFopen
(
DocFileName
,
wxT
(
"wt"
)))
==
NULL
)
if
(
(
DocFile
=
wxFopen
(
DocFileName
,
wxT
(
"wt"
)
)
)
==
NULL
)
{
msg
=
_
(
"Failed to create doc lib file "
)
+
DocFileName
;
DisplayError
(
frame
,
msg
);
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
)
);
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
for
(
unsigned
ii
=
0
;
ii
<
ListEntry
.
size
();
ii
++
)
{
continue
;
}
if
(
(
ii
==
0
)
||
(
ListEntry
[
ii
-
1
]
!=
ListEntry
[
ii
]
)
)
if
(
(
ii
==
0
)
||
(
ListEntry
[
ii
-
1
]
!=
ListEntry
[
ii
]
)
)
{
if
(
ListEntry
[
ii
]
->
Type
==
ROOT
)
// Must be always true, but just in case
ListEntry
[
ii
]
->
Save
(
ArchiveFile
);
if
(
ListEntry
[
ii
]
->
Type
==
ROOT
)
// Must be always true, but just in case
ListEntry
[
ii
]
->
Save
(
ArchiveFile
);
if
(
DocFile
)
ListEntry
[
ii
]
->
SaveDoc
(
DocFile
);
ListEntry
[
ii
]
->
SaveDoc
(
DocFile
);
}
}
fprintf
(
ArchiveFile
,
"#
\n
#EndLibrary
\n
"
);
fclose
(
ArchiveFile
);
fprintf
(
ArchiveFile
,
"#
\n
#EndLibrary
\n
"
);
fclose
(
ArchiveFile
);
if
(
DocFile
)
{
fprintf
(
DocFile
,
"#
\n
#End Doc Library
\n
"
);
fclose
(
DocFile
);
fprintf
(
DocFile
,
"#
\n
#End Doc Library
\n
"
);
fclose
(
DocFile
);
}
MyFree
(
ListEntry
);
return
TRUE
;
}
/***********************************************************/
static
int
TriListEntry
(
EDA_LibComponentStruct
**
Objet1
,
EDA_LibComponentStruct
**
Objet2
)
/***********************************************************/
/* Routine de comparaison pour le tri du Tableau par qsort()
Les composants sont tries par LibName
*/
{
int
ii
;
const
wxString
*
Text1
,
*
Text2
;
if
(
(
*
Objet1
==
NULL
)
&&
(
*
Objet2
==
NULL
)
)
return
(
0
);
if
(
*
Objet1
==
NULL
)
return
(
-
1
);
if
(
*
Objet2
==
NULL
)
return
(
1
);
/***********************************************************************************************/
bool
TriListEntry
(
const
EDA_LibComponentStruct
*
Objet1
,
const
EDA_LibComponentStruct
*
Objet2
)
/***********************************************************************************************/
Text1
=
&
(
*
Objet1
)
->
m_Name
.
m_Text
;
Text2
=
&
(
*
Objet2
)
->
m_Name
.
m_Text
;
/* Compare function for sort()
* lib components are sorted by name
*/
{
int
ii
;
ii
=
Text1
->
CmpNoCase
(
*
Text2
);
return
(
ii
)
;
ii
=
Objet1
->
m_Name
.
m_Text
.
CmpNoCase
(
Objet2
->
m_Name
.
m_Text
);
return
ii
<
0
;
}
eeschema/netform.cpp
View file @
6c01c554
...
...
@@ -539,7 +539,7 @@ static void WriteNetListPCBNEW( WinEDA_SchematicFrame* frame, FILE* f, bool with
EDA_BaseStruct
*
DrawList
;
SCH_COMPONENT
*
Component
;
int
ii
;
ListComponent
*
CmpList
=
NULL
;
OBJ_CMP_TO_LIST
*
CmpList
=
NULL
;
int
CmpListCount
=
0
,
CmpListSize
=
1000
;
DateAndTime
(
Buf
);
...
...
@@ -571,18 +571,18 @@ static void WriteNetListPCBNEW( WinEDA_SchematicFrame* frame, FILE* f, bool with
{
if
(
CmpList
==
NULL
)
{
CmpList
=
(
ListComponent
*
)
MyZMalloc
(
sizeof
(
ListComponent
)
*
CmpListSize
);
CmpList
=
(
OBJ_CMP_TO_LIST
*
)
MyZMalloc
(
sizeof
(
OBJ_CMP_TO_LIST
)
*
CmpListSize
);
}
if
(
CmpListCount
>=
CmpListSize
)
{
CmpListSize
+=
1000
;
CmpList
=
(
ListComponent
*
)
realloc
(
CmpList
=
(
OBJ_CMP_TO_LIST
*
)
realloc
(
CmpList
,
sizeof
(
ListComponent
)
*
CmpListSize
);
sizeof
(
OBJ_CMP_TO_LIST
)
*
CmpListSize
);
}
CmpList
[
CmpListCount
].
m_
Co
mp
=
Component
;
strcpy
(
CmpList
[
CmpListCount
].
m_Ref
,
Component
->
GetRef
(
sheet
).
mb_str
()
);
CmpList
[
CmpListCount
].
m_
RootC
mp
=
Component
;
strcpy
(
CmpList
[
CmpListCount
].
m_Ref
erence
,
Component
->
GetRef
(
sheet
).
mb_str
()
);
CmpListCount
++
;
}
}
...
...
@@ -643,19 +643,19 @@ static void WriteNetListPCBNEW( WinEDA_SchematicFrame* frame, FILE* f, bool with
EDA_LibComponentStruct
*
Entry
;
for
(
ii
=
0
;
ii
<
CmpListCount
;
ii
++
)
{
Component
=
CmpList
[
ii
].
m_
Co
mp
;
Component
=
CmpList
[
ii
].
m_
RootC
mp
;
Entry
=
FindLibPart
(
Component
->
m_ChipName
.
GetData
(),
wxEmptyString
,
FIND_ROOT
);
//Line.Printf(_("%s"), CmpList[ii].m_Ref);
//Line.Replace( wxT( " " ), wxT( "_" ) );
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_Ref
erence
)
&&
CmpList
[
ii
].
m_Reference
[
i
];
i
++
)
{
if
(
CmpList
[
ii
].
m_Ref
[
i
]
==
' '
)
CmpList
[
ii
].
m_Ref
[
i
]
=
'_'
;
if
(
CmpList
[
ii
].
m_Ref
erence
[
i
]
==
' '
)
CmpList
[
ii
].
m_Ref
erence
[
i
]
=
'_'
;
}
fprintf
(
f
,
"$component %s
\n
"
,
CmpList
[
ii
].
m_Ref
);
fprintf
(
f
,
"$component %s
\n
"
,
CmpList
[
ii
].
m_Ref
erence
);
/* Write the footprint list */
for
(
unsigned
int
jj
=
0
;
jj
<
Entry
->
m_FootprintList
.
GetCount
();
jj
++
)
{
...
...
eeschema/netlist.cpp
View file @
6c01c554
...
...
@@ -1200,13 +1200,13 @@ static void SetUnconnectedFlag( ObjetNetListStruct* ListObj, int NbItems )
ObjetNetListStruct
*
NetItemRef
,
*
NetItemTst
,
*
ItemPtr
;
ObjetNetListStruct
*
NetStart
,
*
NetEnd
,
*
Lim
;
int
Nb
;
Is
ConnectType
StateFlag
;
ConnectType
StateFlag
;
NetStart
=
NetEnd
=
ListObj
;
NetItemRef
=
NetStart
;
Nb
=
0
;
StateFlag
=
UNCONNECT
;
StateFlag
=
UNCONNECT
ED
;
Lim
=
ListObj
+
NbItems
;
for
(
;
NetItemRef
<
Lim
;
NetItemRef
++
)
...
...
@@ -1233,7 +1233,7 @@ static void SetUnconnectedFlag( ObjetNetListStruct* ListObj, int NbItems )
return
;
/* Start Analyse Nouveau Net */
StateFlag
=
UNCONNECT
;
StateFlag
=
UNCONNECT
ED
;
NetStart
=
NetItemTst
;
continue
;
}
...
...
eeschema/netlist.h
View file @
6c01c554
...
...
@@ -52,8 +52,8 @@ enum NetObjetType { /* Type des objets de Net */
};
enum
IsConnectType
{
/* Valeur du Flag de connection */
UNCONNECT
,
/* Pin ou Label non connecte */
enum
ConnectType
{
/* Valeur du Flag de connection */
UNCONNECT
ED
=
0
,
/* Pin ou Label non connecte */
NOCONNECT
,
/* Pin volontairement non connectee (Symb. NoConnect utilise) */
PAD_CONNECT
/* connexion normale */
};
...
...
@@ -76,7 +76,7 @@ public:
int
m_BusNetCode
;
/* pour connexions type bus */
int
m_Member
;
/* pour les labels type BUSWIRE ( labels de bus eclate )
* numero de membre */
IsConnectType
m_FlagOfConnection
;
ConnectType
m_FlagOfConnection
;
DrawSheetPath
m_SheetListInclude
;
/* sheet that the hierarchal label connects to.*/
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 */
...
...
@@ -92,45 +92,59 @@ public:
};
/* Structures pour memo et liste des elements */
struct
ListLabel
/* object used in annotation to handle a list of components in schematic
* 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
;
void
*
m_Label
;
char
m_SheetPath
[
256
];
};
public
:
SCH_COMPONENT
*
m_RootCmp
;
// the component in schematic
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)
struct
ListComponent
{
SCH_COMPONENT
*
m_Comp
;
// pointer on the component in schematic
char
m_Ref
[
32
];
// component reference
int
m_Unit
;
// Unit value, for multiple parts per package
//have to store it here since the object references will be duplicated.
DrawSheetPath
m_SheetList
;
//composed of UIDs
OBJ_CMP_TO_LIST
()
{
m_RootCmp
=
NULL
;
m_Entry
=
NULL
;
m_Unit
=
0
;
m_TimeStamp
=
0
;
m_IsNew
=
false
;
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 */
eda_global
int
g_NbrObjNet
;
...
...
eeschema/protos.h
View file @
6c01c554
...
...
@@ -40,7 +40,7 @@ void InstallCmpeditFrame(WinEDA_SchematicFrame * parent, wxPoint & pos,
/******************************/
int
LibraryEntryCompare
(
EDA_LibComponentStruct
*
LE1
,
EDA_LibComponentStruct
*
LE2
);
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
,
SCH_COMPONENT
*
DrawLibItem
,
int
PartX
,
int
PartY
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment