37#define TO_UTF8( wxstring ) ( (const char*) (wxstring).utf8_str() )
44static inline wxString
From_UTF8(
const char* cstring )
46 wxString line = wxString::FromUTF8( cstring );
49 line = wxConvCurrent->cMB2WC( cstring );
55#define ERROR_IDF std::cerr << "* " << __FILE__ << ":" << __LINE__ << ":" << __FUNCTION__ << "(): "
58#define IDF_MIN_DIA_MM ( 0.001 )
59#define IDF_MIN_DIA_THOU ( 0.00039 )
60#define IDF_MIN_DIA_TNM ( 100 )
63#define IDF_THOU_TO_MM 0.0254
65#define IDF_TNM_TO_MM 0.00001
83bool FetchIDFLine( std::istream& aModel, std::string& aLine,
bool& isComment,
84 std::streampos& aFilePos );
97bool GetIDFString(
const std::string& aLine, std::string& aIDFString,
bool& hasQuotes,
107bool CompareToken(
const char* aTokenString,
const std::string& aInputString );
static wxString From_UTF8(const char *cstring)
Convert a UTF8 encoded C string to a wxString for all wxWidgets build modes.
std::string GetPlacementString(IDF3::IDF_PLACEMENT aPlacement)
Return a string representing the given IDF Placement type.
bool ParseIDFLayer(const std::string &aToken, IDF3::IDF_LAYER &aLayer)
Parse an input string for a valid IDF layer specification.
IDF_PLACEMENT
The placement status of a component.
bool GetIDFString(const std::string &aLine, std::string &aIDFString, bool &hasQuotes, int &aIndex)
Parse a line retrieved via FetchIDFLine() and returns the first IDF string found from the starting po...
std::string GetOwnerString(IDF3::KEY_OWNER aOwner)
bool FetchIDFLine(std::istream &aModel, std::string &aLine, bool &isComment, std::streampos &aFilePos)
Retrieve a single line from an IDF file and performs minimal processing.
bool CompareToken(const char *aTokenString, const std::string &aInputString)
Perform a case-insensitive comparison of a token string and an input string.
IDF_LAYER
The various IDF layer classes and groupings.
KEY_OWNER
The type of CAD which has ownership an object.
bool WriteLayersText(std::ostream &aBoardFile, IDF3::IDF_LAYER aLayer)
Write out text corresponding to the given IDF Layer type.
bool ParseOwner(const std::string &aToken, IDF3::KEY_OWNER &aOwner)
Parse the input string for a valid IDF Owner type.
std::string GetLayerString(IDF3::IDF_LAYER aLayer)
Return a string representing the given IDF Layer type.