Author: visnov
Date: Tue Sep 30 22:50:07 2008
New Revision: 51719
URL: http://svn.opensuse.org/viewcvs/yast?rev=51719&view=rev
Log:
more docu for libycp
Modified:
trunk/core/libycp/src/include/ycp/Parser.h
trunk/core/libycp/src/include/ycp/YCode.h
Modified: trunk/core/libycp/src/include/ycp/Parser.h
URL: http://svn.opensuse.org/viewcvs/yast/trunk/core/libycp/src/include/ycp/Pars…
==============================================================================
--- trunk/core/libycp/src/include/ycp/Parser.h (original)
+++ trunk/core/libycp/src/include/ycp/Parser.h Tue Sep 30 22:50:07 2008
@@ -36,7 +36,8 @@
class YBlock;
/**
- * @short YCP parser
+ * @short YCP language parser
+ *
* A YCP parser read a characters stream and outputs a sequence
* of YCP values. Three properties of the YCP grammar are important:
*
Modified: trunk/core/libycp/src/include/ycp/YCode.h
URL: http://svn.opensuse.org/viewcvs/yast/trunk/core/libycp/src/include/ycp/YCod…
==============================================================================
--- trunk/core/libycp/src/include/ycp/YCode.h (original)
+++ trunk/core/libycp/src/include/ycp/YCode.h Tue Sep 30 22:50:07 2008
@@ -29,6 +29,11 @@
* \ref ycpvalues, easy access to \ref components, common control structures and more.
* It is designed to be well suited for system configuration manipulation.
*
+ * YCP interpreter consists of the following parts:
+ * - YCP \ref Parser which parses ASCII representation into in-memory representation (C++ classes
+ * inheriting from the \ref YCode class.
+ * - YCP interpreter - the \ref YCode based classes
+ * - \ref YCP bytecode implementation
*/
#include <string>
@@ -58,7 +63,14 @@
typedef struct ycodelist ycodelist_t;
/**
- * @short YCode for precompiled ycp code
+ * \brief YCode for precompiled ycp code
+ *
+ * A class representing parsed YCP code. This is an abstract base class for implementing
+ * any YCP language feature. \ref kind uniquely identifies the type of the class.
+ * The class provides infrastructure for dumping a bytecode representation (\ref toStream),
+ * XML representation (\ref toXML) and ASCII representation (\ref toString).
+ *
+ * The represented YCP code is executed via invoking \ref evaluate.
*/
class YCode : public Rep
#ifdef D_MEMUSAGE
@@ -142,73 +154,107 @@
YCode ();
/**
- * Cleans up
+ * Destructor
*/
virtual ~YCode();
/**
- * Returns the YCode kind
+ * Kind of this \ref YCode. This method must be reimplemented in the inherited classes.
+ *
+ * \return the YCode kind
*/
virtual ykind kind() const = 0;
/**
- * Returns an ASCII representation of the YCode.
+ * Return ASCII represtation of this YCP code.
+ *
+ * \return ASCII string representation
*/
virtual string toString() const;
+
+ /**
+ * String representation of the YCode kind value. For debugging purposes.
+ *
+ * \param kind which kind representation should be returned
+ * \return string representation
+ */
static string toString(ykind kind);
/**
- * writes YCode to a stream
- * see Bytecode for read
+ * Write YCP code to a byte stream (bytecode implementation). Every
+ * class inheriting from \ref YCode must reimplement this method.
+ * \param str byte stream to store into
+ * \return byte stream for chaining writing bytecode (str)
*/
virtual std::ostream & toStream (std::ostream & str) const = 0;
+
+ /**
+ * Write YCP code as XML representation. Every class inheriting from
+ * \ref YCode must reimplement this method.
+ * \param str string stream to store into
+ * \param indend indentation level for pretty print
+ * \return string stream for chaining writing XML (str)
+ */
virtual std::ostream & toXml (std::ostream & str, int indent ) const = 0;
/**
- * returns true if the YCode represents a constant
+ * Is this code constant?
+ *
+ * \return true if the \ref YCode represents a constant
*/
virtual bool isConstant () const;
/**
- * returns true if the YCode represents an error
+ * Is this code a representation of an error?
+ *
+ * \returns true if the \ref YCode represents an error
*/
bool isError () const;
/**
- * returns true if the YCode represents a statement
+ * Is this a YCP statement (e.g. if, while, ...)
+ *
+ * \return true if the \ref YCode represents a statement
*/
virtual bool isStatement () const;
/**
- * returns true if the YCode represents a block
+ * Is this a YCP block?
+ *
+ * \return true if the \ref YCode represents a block
*/
virtual bool isBlock () const;
/**
- * returns true if the YCode represents something we can reference to
+ * Can this code be stored in a variable of a type reference?
+ *
+ * \return true if the \ref YCode represents something we can reference to
*/
virtual bool isReferenceable () const;
/**
- * evaluate YCode to YCPValue
- * if debugger == 0
- * called for parse time evaluation (i.e. constant subexpression elimination)
- * else
- * called for runtime evaluation
+ * Execute YCP code to get the resulting \ref YCPValue. Every inherited class of YCode should reimplement
+ * this method.
+ *
+ * \return \ref YCPValue after executing the code
+ * \param cse should the evaluation be done for parse time evaluation (i.e. constant subexpression elimination)
*/
virtual YCPValue evaluate (bool cse = false);
/**
- * return type (interesting mostly for function calls)
+ * Return type of this YCP code (interesting mostly for function calls).
+ *
+ * \return type of the value to be returned after calling \ref evaluate
*/
virtual constTypePtr type() const;
};
/**
- * constant (-> YCPValue)
+ * \brief YCP Constant
+ *
+ * The base class for YCP constants (\ref YCPValue).
*/
-
class YConst : public YCode
{
REP_BODY(YConst);
--
To unsubscribe, e-mail: yast-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: yast-commit+help(a)opensuse.org
Author: visnov
Date: Tue Sep 30 21:47:37 2008
New Revision: 51718
URL: http://svn.opensuse.org/viewcvs/yast?rev=51718&view=rev
Log:
very basic libycp documentation
Modified:
trunk/core/liby2/src/include/y2/Y2Component.h
trunk/core/libycp/src/include/YCP.h
trunk/core/libycp/src/include/ycp/YCode.h
Modified: trunk/core/liby2/src/include/y2/Y2Component.h
URL: http://svn.opensuse.org/viewcvs/yast/trunk/core/liby2/src/include/y2/Y2Comp…
==============================================================================
--- trunk/core/liby2/src/include/y2/Y2Component.h (original)
+++ trunk/core/liby2/src/include/y2/Y2Component.h Tue Sep 30 21:47:37 2008
@@ -88,8 +88,7 @@
* defined protocol. Both the language and the protocol are
* called <i>YCP (YaST2 communication protocol)</i>. One protocol
* step consists of one of the partners sending exactly one
- * <a href="../libycp/YCP-datatypes.html">YCP value</a>
- * to the other and the other receiving that value. In the
+ * of \ref ycpvalues to the other and the other receiving that value. In the
* next step, the component that just was receiving, is now sending and
* vice versa. The only exception is, that one of that partners
* may terminate the session and send a last <i>result</i> message
@@ -136,8 +135,7 @@
* <ul>
*
* <li>An executable program (ELF, /bin/sh, or whatsoever)</li>
- * <li>A C++ class using <tt><a href="../libycp/autodocs/intro.html">libycp</a></tt>
- * and \ref liby2</li>
+ * <li>A C++ class using \ref libycp and \ref liby2</li>
* <li>A YCP script executed by the <i>Workflowmanager</i></li>
* <li>Youself typing some YCP code at a terminal</li>
*
@@ -159,8 +157,7 @@
* <p>The data flowing through these pipes is YCP Ascii
* representation. Each communication side needs a parser to analyse the
* data and a YCP syntax generater to write data to the pipe. Both can be
- * found in the <tt><a href="../libycp/autodocs/intro.html">libycp</a></tt>,
- * which can only used from C++ programs.
+ * found in the \ref libycp, which can only used from C++ programs.
*
* <p>But the production of YCP code
* can in many cases very easily be done be printing to stdout, for
@@ -178,8 +175,7 @@
* component implementation.
*
* <p>What you have to do is to subclass at least two classes:
- * <tt><a href="../liby2/autodocs/Y2ComponentCreator.html">Y2ComponentCreator</a></tt> and
- * <tt><a href="../liby2/autodocs/Y2Component.html">Y2Component</a></tt> and
+ * \ref Y2ComponentCreator and \ref Y2Component and
*
* <p>Depending on whether you want to implement a server or a client component
* you have to override different methods. Many examples can be found within the liby2
Modified: trunk/core/libycp/src/include/YCP.h
URL: http://svn.opensuse.org/viewcvs/yast/trunk/core/libycp/src/include/YCP.h?re…
==============================================================================
--- trunk/core/libycp/src/include/YCP.h (original)
+++ trunk/core/libycp/src/include/YCP.h Tue Sep 30 21:47:37 2008
@@ -29,6 +29,12 @@
// include all basic types
/**
+ * \page libycp libycp Library
+ *
+ * This is a library implementing basic \ref ycpvalues and \ref ycplanguage.
+ */
+
+/**
* \page ycpvalues YCP Values
*
* YCP values are the primary way of communicating of YaST components. The following values are implemented:
Modified: trunk/core/libycp/src/include/ycp/YCode.h
URL: http://svn.opensuse.org/viewcvs/yast/trunk/core/libycp/src/include/ycp/YCod…
==============================================================================
--- trunk/core/libycp/src/include/ycp/YCode.h (original)
+++ trunk/core/libycp/src/include/ycp/YCode.h Tue Sep 30 21:47:37 2008
@@ -21,6 +21,16 @@
#ifndef YCode_h
#define YCode_h
+/**
+ * \page ycplanguage YCP Scripting Language
+ * \todo Enhance
+ *
+ * YCP is a very simple imperative scripting language with builtin support for
+ * \ref ycpvalues, easy access to \ref components, common control structures and more.
+ * It is designed to be well suited for system configuration manipulation.
+ *
+ */
+
#include <string>
using std::string;
--
To unsubscribe, e-mail: yast-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: yast-commit+help(a)opensuse.org
Author: visnov
Date: Tue Sep 30 21:26:43 2008
New Revision: 51717
URL: http://svn.opensuse.org/viewcvs/yast?rev=51717&view=rev
Log:
Documentation improvements:
- liby2 overview
- more links from the main page
Modified:
trunk/core/liby2/src/genericfrontend.cc
trunk/core/liby2/src/include/Y2.h
trunk/core/liby2/src/include/y2/Y2Component.h
Modified: trunk/core/liby2/src/genericfrontend.cc
URL: http://svn.opensuse.org/viewcvs/yast/trunk/core/liby2/src/genericfrontend.c…
==============================================================================
--- trunk/core/liby2/src/genericfrontend.cc (original)
+++ trunk/core/liby2/src/genericfrontend.cc Tue Sep 30 21:26:43 2008
@@ -37,7 +37,17 @@
* - \ref components
* - \ref componentbroker
* - \ref componentsearch
+ *
* - Handling of error codes: \ref exitcodes
+ *
+ * - Libraries
+ * - \ref liby2
+ * - \ref libycp
+ * - \ref libscr
+ *
+ * - Generic components
+ * - \ref SCR
+ * - \ref WFM
*/
/**
Modified: trunk/core/liby2/src/include/Y2.h
URL: http://svn.opensuse.org/viewcvs/yast/trunk/core/liby2/src/include/Y2.h?rev=…
==============================================================================
--- trunk/core/liby2/src/include/Y2.h (original)
+++ trunk/core/liby2/src/include/Y2.h Tue Sep 30 21:26:43 2008
@@ -26,7 +26,9 @@
#include <y2/Y2ComponentCreator.h>
#include <y2/Y2ComponentBroker.h>
-/***
+/**
+ * \page liby2 liby2 Library
+ *
* <h2>The YaST2 component architecture</h2>
*
* <p>The YaST2 system consists of different components. These are
@@ -53,9 +55,9 @@
* time and provide single isolated binaries as well as clusters of components, that need
* not be disjunct.
*
- * <h2>The generic frontend (GF)</h2>
+ * <h2>The generic frontend (y2base)</h2>
*
- * <p>The liby2 provides a main function. A component linked to liby2
+ * <p>The liby2 provides a \ref main function. A component linked to liby2
* therefore need not and cannot have its own main function. This
* generic main function does:
*
@@ -64,36 +66,29 @@
* <li>find the server and the client component regardless, whether they are realized
* as external programs,
* shared library plugins, YCP scripts or objects that are linked to the main binary</li>
- * <li>parameter checking (not yet implemented)
+ * <li>parameter checking
* <li>launches the server and the client component with the correct paramters</li>
* <li>start the communication between client and server</li>
* </ul>
*
* <p>A YaST2 binary does always consist of the generic frontend and zero or more
- * components that are linked in. The binary <tt>y2gf</tt> just contains the frontend
+ * components that are linked in. The binary <tt>y2base</tt> just contains the frontend
* and the builtin components <tt>cat</tt> and <tt>stdio</tt>. <tt>cat</tt> is
* a server component that can be used instead of a user interface. It simply prints
* all commands it gets to stdout and waits for the answer at stdin. <tt>stdio</tt>
* works similary, but is a client.
*
* <p>The general synopsis of a call of a YaST2 binary is:
- * <pre>y2gf [server] client [client-options] [server-options]</pre>
+ * <pre>y2base client server [client-options] [server-options]</pre>
*
* <p><font size="-1">( Please don't ask yet, why the server-options are stated <i>after</i>
* the client options. We will see later. )</font> </p>
*
* <p>An example would be:
- * <pre>y2gf qt mainmenu</pre>
+ * <pre>y2base menu qt</pre>
*
* <p>This call would use the component <tt>qt</tt>, which is the Qt-lib base graphical
- * user interface, as display server and start the module <tt>mainmenu</tt>.
- *
- * <p>If the name of the YaST2 binary is not equal to <tt>y2gf</tt>, then the name
- * without the <tt>y2</tt> is used as the name of the first component:
- * <pre>y2qt mainmenu</pre>
- * <p>This call does the same as the upper one. The generic frontend contained in <tt>y2qt</tt>
- * first looks for a builtin (linked against) component named <tt>qt</tt>. If it finds one
- * <i>in itself</i>, it does not have to launch an external program component.
+ * user interface, as display server and start the module <tt>menu</tt>.
*
* <h3>Server options</h3>
* <p>Every command line argument
Modified: trunk/core/liby2/src/include/y2/Y2Component.h
URL: http://svn.opensuse.org/viewcvs/yast/trunk/core/liby2/src/include/y2/Y2Comp…
==============================================================================
--- trunk/core/liby2/src/include/y2/Y2Component.h (original)
+++ trunk/core/liby2/src/include/y2/Y2Component.h Tue Sep 30 21:26:43 2008
@@ -137,7 +137,7 @@
*
* <li>An executable program (ELF, /bin/sh, or whatsoever)</li>
* <li>A C++ class using <tt><a href="../libycp/autodocs/intro.html">libycp</a></tt>
- * and <tt><a href="../liby2/autodocs/intro.html">liby2</a></tt></li>
+ * and \ref liby2</li>
* <li>A YCP script executed by the <i>Workflowmanager</i></li>
* <li>Youself typing some YCP code at a terminal</li>
*
--
To unsubscribe, e-mail: yast-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: yast-commit+help(a)opensuse.org
Author: rpmcruz
Date: Tue Sep 30 19:28:13 2008
New Revision: 51715
URL: http://svn.opensuse.org/viewcvs/yast?rev=51715&view=rev
Log:
* src/YGPackageSelector.cc: also, set a tooltip for the type combo box.
Modified:
trunk/gtk/ChangeLog
trunk/gtk/src/YGPackageSelector.cc
Modified: trunk/gtk/ChangeLog
URL: http://svn.opensuse.org/viewcvs/yast/trunk/gtk/ChangeLog?rev=51715&r1=51714…
==============================================================================
--- trunk/gtk/ChangeLog (original)
+++ trunk/gtk/ChangeLog Tue Sep 30 19:28:13 2008
@@ -13,6 +13,8 @@
telling the user there is a pattern available for the keyword he is
looking for once, and depending on the current view.
+ * src/YGPackageSelector.cc: also, set a tooltip for the type combo box.
+
2008-09-30 Katarina Machalkova <kmachalkova(a)suse.cz>
* version 2.17.1
Modified: trunk/gtk/src/YGPackageSelector.cc
URL: http://svn.opensuse.org/viewcvs/yast/trunk/gtk/src/YGPackageSelector.cc?rev…
==============================================================================
--- trunk/gtk/src/YGPackageSelector.cc (original)
+++ trunk/gtk/src/YGPackageSelector.cc Tue Sep 30 19:28:13 2008
@@ -1480,6 +1480,14 @@
gtk_combo_box_append_text (GTK_COMBO_BOX (m_type), _("Groups"));
gtk_combo_box_append_text (GTK_COMBO_BOX (m_type), _("Patterns"));
gtk_combo_box_append_text (GTK_COMBO_BOX (m_type), _("Languages"));
+ gtk_widget_set_tooltip_markup (m_type,
+ _("Packages can be organized in:\n"
+ "<b>Groups:</b> simple categorization of packages by purpose.\n"
+ "<b>Patterns:</b> assists in installing all packages necessary "
+ "for several working environments.\n"
+ "<b>Languages:</b> adds another language to the system.\n"
+ "<b>Repositories:</b> catalogues what the several configured "
+ "repositories have available."));
}
gtk_combo_box_append_text (GTK_COMBO_BOX (m_type), _("Repositories"));
gtk_combo_box_set_active (GTK_COMBO_BOX (m_type), 0);
--
To unsubscribe, e-mail: yast-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: yast-commit+help(a)opensuse.org