Loading include/kicad_exceptions.h +7 −2 Original line number Diff line number Diff line Loading @@ -25,7 +25,9 @@ #ifndef KICAD_EXCEPTIONS_H_ #define KICAD_EXCEPTIONS_H_ /* Just exceptions /** * @ingroup exception_types * @{ */ Loading Loading @@ -84,4 +86,7 @@ struct PARSE_ERROR : public IO_ERROR } }; /** @} exception_types */ #endif // KICAD_EXCEPTIONS_H_ new/CMakeLists.txt +17 −8 Original line number Diff line number Diff line Loading @@ -60,28 +60,37 @@ endif() include_directories( ${CMAKE_CURRENT_SOURCE_DIR} ) #=====<on standby until unit testing infrastructure>============================ if( false ) add_executable( test_dir_lib_source sch_dir_lib_source.cpp ) target_link_libraries( test_dir_lib_source ${wxWidgets_LIBRARIES} ) add_executable( test_sch_part sch_part.cpp ) target_link_libraries( test_sch_part ${wxWidgets_LIBRARIES} ) add_executable( test_lpid sch_lpid.cpp ) target_link_libraries( test_lpid ${wxWidgets_LIBRARIES} ) endif( false ) #=====</on standby until unit testing infrastructure>=========================== add_executable( test_sch_lib_table sch_lib_table.cpp sch_lib_table_keywords.cpp sch_lib.cpp sch_lpid.cpp sch_dir_lib_source.cpp ${PROJECT_SOURCE_DIR}/common/richio.cpp ${PROJECT_SOURCE_DIR}/common/dsnlexer.cpp ) target_link_libraries( test_sch_lib_table ${wxWidgets_LIBRARIES} ) add_executable( test_sch_part sch_part.cpp ) target_link_libraries( test_sch_part ${wxWidgets_LIBRARIES} ) add_executable( test_lpid sch_lpid.cpp ) target_link_libraries( test_lpid ${wxWidgets_LIBRARIES} ) make_lexer( ${CMAKE_CURRENT_SOURCE_DIR}/sch_lib_table.keywords Loading new/design.h +47 −21 Original line number Diff line number Diff line Loading @@ -329,6 +329,10 @@ is used on the hood ornament. When aResults pointer is passed as an argument, I won't refer to this as 'returning' a value, but rather 'fetching' a result to distinguish between the two strategies. <p> Functions named as lookupSomething() or LookupSomething() are to be understood as "find and load if needed". This is different than a simple find operation only, in that an implied load operation is also done, but only if needed. @section architecture Architecture Loading @@ -337,47 +341,59 @@ LIB_SOURCE. A library source is the backing to a library. The class name for a library in the new design is LIB. <p> Show architecture here. <a href="../drawing.png" > Click here to see an architectural drawing.</a> <IMG SRC="../drawing.png" ALT="You should see design architecture here"> */ /** * \defgroup string_types STRING Types * @defgroup string_types STRING Types * Provide some string types for use within the API. * @{ */ typedef std::string STRING; typedef std::dequeue<STRING> STRINGS; //typedef std::vector<wxString> WSTRINGS; /** * @defgroup exception_types Exception Types * Provide some exception types for use within the API. */ const STRING StrEmpty = ""; /** @} string_types STRING Types */ /** * \defgroup exception_types Exception Types * Provide some exception types for use within the API. * @{ * Class HTTP_LIB_SOURCE * implements a LIB_SOURCE to access a remote document root repository using http protocol. */ class HTTP_LIB_SOURCE : public LIB_SOURCE { friend class LIB_TABLE; ///< constructor the LIB uses these functions. protected: /** @} exception_types Exception Types */ /** * Constructor ( const STRING& aSvnURL ) * sets up a LIB_SOURCE using aSvnURI which points to a subversion * repository. * @see LIBS::GetLibrary(). * * @param aHttpURL is a full URL of a document root repo directory. Example might * be "http://kicad.org/libs" * * @param aOptions is the options string from the library table. It can be any * string that the LIB_SOURCE can parse and understand, perhaps using comma separation * between options. Options and their syntax is LIB_SOURCE implementation specific. */ HTTP_LIB_SOURCE( const STRING& aHttpURL, const STRING& aOptions ) throws( IO_ERROR ); }; /** * Class SVN_LIB_SOURCE * implements a LIB_SOURCE in a subversion repository. * implements a LIB_SOURCE to access a [remote or local] subversion repository * using subversion client protocol. */ class SVN_LIB_SOURCE : public LIB_SOURCE { friend class LIBS; ///< constructor the LIB uses these functions. friend class LIB_TABLE; ///< constructor the LIB uses these functions. protected: Loading @@ -389,8 +405,12 @@ protected: * * @param aSvnURL is a full URL of a subversion repo directory. Example might * be "svn://kicad.org/repos/library/trunk" * * @param aOptions is the options string from the library table. It can be any * string that the LIB_SOURCE can parse and understand, perhaps using comma separation * between options. Options and their syntax is LIB_SOURCE implementation specific. */ SVN_LIB_SOURCE( const STRING& aSvnURL ) throws( IO_ERROR ); SVN_LIB_SOURCE( const STRING& aSvnURL, const STRING& aOptions ) throws( IO_ERROR ); }; Loading @@ -401,7 +421,7 @@ protected: */ class SCHEMATIC_LIB_SOURCE : public LIB_SOURCE { friend class LIBS; ///< constructor the LIB uses these functions. friend class LIB_TABLE; ///< constructor the LIB uses these functions. protected: Loading @@ -414,8 +434,12 @@ protected: * * @param aSchematicFile is a full path and filename. Example: * "/home/user/kicadproject/design.sch" * * @param aOptions is the options string from the library table. It can be any * string that the LIB_SOURCE can parse and understand, perhaps using comma separation * between options. Options and their syntax is LIB_SOURCE implementation specific. */ SCHEMATIC_LIB_SOURCE( const STRING& aSchematicFile ) throws( IO_ERROR ); SCHEMATIC_LIB_SOURCE( const STRING& aSchematicFile, const STRING& aOptions ) throws( IO_ERROR ); }; Loading Loading @@ -445,4 +469,6 @@ public: /// @todo remove endsWithRev() in favor of EndsWithRev(), find home for it. /// @todo add simple unit test infrastructure. // EOF new/sch_dir_lib_source.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -590,7 +590,7 @@ void DIR_LIB_SOURCE::cacheOneDir( const STRING& aCategory ) throw( IO_ERROR ) } #if 1 && defined(DEBUG) #if 0 && defined(DEBUG) void DIR_LIB_SOURCE::Test( int argc, char** argv ) { Loading new/sch_dir_lib_source.h +2 −2 Original line number Diff line number Diff line Loading @@ -69,7 +69,7 @@ namespace SCH { */ class DIR_LIB_SOURCE : public LIB_SOURCE { friend class LIBS; ///< LIBS::GetLib() can construct one. friend class LIB_TABLE; ///< constructor is protected, LIB_TABLE can construct bool useVersioning; ///< use files with extension ".revNNN..", else not Loading Loading @@ -146,7 +146,7 @@ protected: * * @param aOptions is the options string from the library table, currently * the only supported option, that this LIB_SOURCE knows about is * "userVersioning". If present means support versioning in the directory * "useVersioning". If present means support versioning in the directory * tree, otherwise only a single version of each part is recognized, namely the * one without the ".revN[N..]" trailer. */ Loading Loading
include/kicad_exceptions.h +7 −2 Original line number Diff line number Diff line Loading @@ -25,7 +25,9 @@ #ifndef KICAD_EXCEPTIONS_H_ #define KICAD_EXCEPTIONS_H_ /* Just exceptions /** * @ingroup exception_types * @{ */ Loading Loading @@ -84,4 +86,7 @@ struct PARSE_ERROR : public IO_ERROR } }; /** @} exception_types */ #endif // KICAD_EXCEPTIONS_H_
new/CMakeLists.txt +17 −8 Original line number Diff line number Diff line Loading @@ -60,28 +60,37 @@ endif() include_directories( ${CMAKE_CURRENT_SOURCE_DIR} ) #=====<on standby until unit testing infrastructure>============================ if( false ) add_executable( test_dir_lib_source sch_dir_lib_source.cpp ) target_link_libraries( test_dir_lib_source ${wxWidgets_LIBRARIES} ) add_executable( test_sch_part sch_part.cpp ) target_link_libraries( test_sch_part ${wxWidgets_LIBRARIES} ) add_executable( test_lpid sch_lpid.cpp ) target_link_libraries( test_lpid ${wxWidgets_LIBRARIES} ) endif( false ) #=====</on standby until unit testing infrastructure>=========================== add_executable( test_sch_lib_table sch_lib_table.cpp sch_lib_table_keywords.cpp sch_lib.cpp sch_lpid.cpp sch_dir_lib_source.cpp ${PROJECT_SOURCE_DIR}/common/richio.cpp ${PROJECT_SOURCE_DIR}/common/dsnlexer.cpp ) target_link_libraries( test_sch_lib_table ${wxWidgets_LIBRARIES} ) add_executable( test_sch_part sch_part.cpp ) target_link_libraries( test_sch_part ${wxWidgets_LIBRARIES} ) add_executable( test_lpid sch_lpid.cpp ) target_link_libraries( test_lpid ${wxWidgets_LIBRARIES} ) make_lexer( ${CMAKE_CURRENT_SOURCE_DIR}/sch_lib_table.keywords Loading
new/design.h +47 −21 Original line number Diff line number Diff line Loading @@ -329,6 +329,10 @@ is used on the hood ornament. When aResults pointer is passed as an argument, I won't refer to this as 'returning' a value, but rather 'fetching' a result to distinguish between the two strategies. <p> Functions named as lookupSomething() or LookupSomething() are to be understood as "find and load if needed". This is different than a simple find operation only, in that an implied load operation is also done, but only if needed. @section architecture Architecture Loading @@ -337,47 +341,59 @@ LIB_SOURCE. A library source is the backing to a library. The class name for a library in the new design is LIB. <p> Show architecture here. <a href="../drawing.png" > Click here to see an architectural drawing.</a> <IMG SRC="../drawing.png" ALT="You should see design architecture here"> */ /** * \defgroup string_types STRING Types * @defgroup string_types STRING Types * Provide some string types for use within the API. * @{ */ typedef std::string STRING; typedef std::dequeue<STRING> STRINGS; //typedef std::vector<wxString> WSTRINGS; /** * @defgroup exception_types Exception Types * Provide some exception types for use within the API. */ const STRING StrEmpty = ""; /** @} string_types STRING Types */ /** * \defgroup exception_types Exception Types * Provide some exception types for use within the API. * @{ * Class HTTP_LIB_SOURCE * implements a LIB_SOURCE to access a remote document root repository using http protocol. */ class HTTP_LIB_SOURCE : public LIB_SOURCE { friend class LIB_TABLE; ///< constructor the LIB uses these functions. protected: /** @} exception_types Exception Types */ /** * Constructor ( const STRING& aSvnURL ) * sets up a LIB_SOURCE using aSvnURI which points to a subversion * repository. * @see LIBS::GetLibrary(). * * @param aHttpURL is a full URL of a document root repo directory. Example might * be "http://kicad.org/libs" * * @param aOptions is the options string from the library table. It can be any * string that the LIB_SOURCE can parse and understand, perhaps using comma separation * between options. Options and their syntax is LIB_SOURCE implementation specific. */ HTTP_LIB_SOURCE( const STRING& aHttpURL, const STRING& aOptions ) throws( IO_ERROR ); }; /** * Class SVN_LIB_SOURCE * implements a LIB_SOURCE in a subversion repository. * implements a LIB_SOURCE to access a [remote or local] subversion repository * using subversion client protocol. */ class SVN_LIB_SOURCE : public LIB_SOURCE { friend class LIBS; ///< constructor the LIB uses these functions. friend class LIB_TABLE; ///< constructor the LIB uses these functions. protected: Loading @@ -389,8 +405,12 @@ protected: * * @param aSvnURL is a full URL of a subversion repo directory. Example might * be "svn://kicad.org/repos/library/trunk" * * @param aOptions is the options string from the library table. It can be any * string that the LIB_SOURCE can parse and understand, perhaps using comma separation * between options. Options and their syntax is LIB_SOURCE implementation specific. */ SVN_LIB_SOURCE( const STRING& aSvnURL ) throws( IO_ERROR ); SVN_LIB_SOURCE( const STRING& aSvnURL, const STRING& aOptions ) throws( IO_ERROR ); }; Loading @@ -401,7 +421,7 @@ protected: */ class SCHEMATIC_LIB_SOURCE : public LIB_SOURCE { friend class LIBS; ///< constructor the LIB uses these functions. friend class LIB_TABLE; ///< constructor the LIB uses these functions. protected: Loading @@ -414,8 +434,12 @@ protected: * * @param aSchematicFile is a full path and filename. Example: * "/home/user/kicadproject/design.sch" * * @param aOptions is the options string from the library table. It can be any * string that the LIB_SOURCE can parse and understand, perhaps using comma separation * between options. Options and their syntax is LIB_SOURCE implementation specific. */ SCHEMATIC_LIB_SOURCE( const STRING& aSchematicFile ) throws( IO_ERROR ); SCHEMATIC_LIB_SOURCE( const STRING& aSchematicFile, const STRING& aOptions ) throws( IO_ERROR ); }; Loading Loading @@ -445,4 +469,6 @@ public: /// @todo remove endsWithRev() in favor of EndsWithRev(), find home for it. /// @todo add simple unit test infrastructure. // EOF
new/sch_dir_lib_source.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -590,7 +590,7 @@ void DIR_LIB_SOURCE::cacheOneDir( const STRING& aCategory ) throw( IO_ERROR ) } #if 1 && defined(DEBUG) #if 0 && defined(DEBUG) void DIR_LIB_SOURCE::Test( int argc, char** argv ) { Loading
new/sch_dir_lib_source.h +2 −2 Original line number Diff line number Diff line Loading @@ -69,7 +69,7 @@ namespace SCH { */ class DIR_LIB_SOURCE : public LIB_SOURCE { friend class LIBS; ///< LIBS::GetLib() can construct one. friend class LIB_TABLE; ///< constructor is protected, LIB_TABLE can construct bool useVersioning; ///< use files with extension ".revNNN..", else not Loading Loading @@ -146,7 +146,7 @@ protected: * * @param aOptions is the options string from the library table, currently * the only supported option, that this LIB_SOURCE knows about is * "userVersioning". If present means support versioning in the directory * "useVersioning". If present means support versioning in the directory * tree, otherwise only a single version of each part is recognized, namely the * one without the ".revN[N..]" trailer. */ Loading