Commit f6265fd2 authored by Dick Hollenbeck's avatar Dick Hollenbeck
Browse files

Added "lookup" functions to LIB_TABLE. Fixed up Doxygen output even more.

Include image file inline on main HTML page.
Added HTTP_LIB_SOURCE.
Added utf8.h
parent a9010796
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -25,7 +25,9 @@
#ifndef KICAD_EXCEPTIONS_H_
#define KICAD_EXCEPTIONS_H_

/*  Just exceptions
/**
 * @ingroup exception_types
 * @{
 */


@@ -84,4 +86,7 @@ struct PARSE_ERROR : public IO_ERROR
    }
};

/** @} exception_types */


#endif  // KICAD_EXCEPTIONS_H_
+17 −8
Original line number Diff line number Diff line
@@ -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
+47 −21
Original line number Diff line number Diff line
@@ -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

@@ -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:

@@ -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 );
};


@@ -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:

@@ -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 );
};


@@ -445,4 +469,6 @@ public:

/// @todo remove endsWithRev() in favor of EndsWithRev(), find home for it.

/// @todo add simple unit test infrastructure.

// EOF
+1 −1
Original line number Diff line number Diff line
@@ -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 )
{
+2 −2
Original line number Diff line number Diff line
@@ -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

@@ -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