ref: refs/heads/master
commit dd2fcde8a399e3adc95058671724005373f1caba
Author: Klaus Kämpf
Date: Fri Mar 13 16:37:09 2009 +0100
Further documentation improvements and cross-referencing
---
bindings/covenant.i | 7 +++++--
bindings/dataiterator.i | 4 +++-
bindings/decision.i | 6 ++++--
bindings/dependency.i | 3 ++-
bindings/job.i | 7 +++++--
bindings/problem.i | 7 ++++---
bindings/relation.i | 10 +++++-----
bindings/repodata.i | 5 +++--
bindings/rule.i | 4 +++-
bindings/solution.i | 4 ++++
bindings/solvable.i | 4 ++++
bindings/solver.i | 5 +++--
bindings/transaction.i | 5 +++++
13 files changed, 50 insertions(+), 21 deletions(-)
diff --git a/bindings/covenant.i b/bindings/covenant.i
index f0dcc9e..37b3afb 100644
--- a/bindings/covenant.i
+++ b/bindings/covenant.i
@@ -3,15 +3,18 @@
* Covenants ensure specific dependencies in the (installed) system.
* They are usually used to implement _locks_.
*
+ * === Constructor
* There is no constructor for Covenants defined, Covenants are created through the Solver,
- * see 'Solver.include' and 'Solver.exclude'
+ * see Solver.include and Solver.exclude
*
+ * === Usage
* Convenants can affect specific Solvables, Solvables per-name or
* Solvables per-provides. In the latter case, when including
* Solvables per-name or per-provides, the solver is free to
* choose a matching solvable.
*
- * See also: Solver.include, Solver.exclude
+ * === See also
+ * Solver.include, Solver.exclude
*
*/
diff --git a/bindings/dataiterator.i b/bindings/dataiterator.i
index 5be3d50..6a79b01 100644
--- a/bindings/dataiterator.i
+++ b/bindings/dataiterator.i
@@ -2,11 +2,13 @@
* Document-class: Dataiterator
* This class represents an _Iterator_ for Solvable attributes.
*
+ * === Usage
+ *
* The Dataiterator is the block argument for calls to +search+
* which is defined for Pool (search whole Pool) and Repository (limit
* search to Repository)
*
- * Example code
+ * === Example code
*
* - Search for exact string match in Pool
*
diff --git a/bindings/decision.i b/bindings/decision.i
index cff0190..a30026e 100644
--- a/bindings/decision.i
+++ b/bindings/decision.i
@@ -8,6 +8,10 @@
* Additionally they have a _back_ _pointer_ to the Rule which lead to the Decision.
* This allows to find out about the reasoning for the decision.
*
+ * === Constructor
+ * There is no constructor defined for Decision. Decisions are created by accessing
+ * the Solver result. See Solver.each_decision
+ *
*/
%nodefault _Decision;
@@ -29,8 +33,6 @@ typedef struct _Decision {} Decision;
/* free decision modifier */
%constant int DECISION_FREE = DECISION_FREE;
- /* no constructor defined, Decisions are created by accessing
- the Solver result. See 'Solver.each_decision'. */
~Decision()
{ decision_free( $self ); }
diff --git a/bindings/dependency.i b/bindings/dependency.i
index 69656a4..d2d7ede 100644
--- a/bindings/dependency.i
+++ b/bindings/dependency.i
@@ -61,7 +61,8 @@ typedef struct _Dependency {} Dependency;
%constant int DEP_ENH = DEP_ENH;
/*
- * Dependency constructor
+ * Dependency constructor, pass Solvable and kind of dependency.
+ *
* call-seq:
* dependency.new(solvable, Satsolver::DEP_REQ) -> Dependency
*
diff --git a/bindings/job.i b/bindings/job.i
index 4de7d1d..7e1907a 100644
--- a/bindings/job.i
+++ b/bindings/job.i
@@ -1,6 +1,11 @@
/*
* Document-class: Job
* A job is a single 'work item' of a transaction
+ *
+ * === Constructor
+ * There is no constructor defined for Job. Jobs are created by accessing
+ * a Transaction
+ *
*/
%nodefault _Job;
@@ -16,8 +21,6 @@ typedef struct _Job {} Job;
%constant int INSTALL_SOLVABLE_PROVIDES = SOLVER_INSTALL_SOLVABLE_PROVIDES;
%constant int REMOVE_SOLVABLE_PROVIDES = SOLVER_ERASE_SOLVABLE_PROVIDES;
- /* no constructor defined, Jobs are created by accessing
- a Transaction */
~Job()
{ job_free( $self ); }
diff --git a/bindings/problem.i b/bindings/problem.i
index 8fc4ad4..f13a6ff 100644
--- a/bindings/problem.i
+++ b/bindings/problem.i
@@ -6,6 +6,10 @@
*
* The Problem class represents such a reason and provides solutions.
*
+ * === Constructor
+ * There is no constructor defined for Problem. Problems are created by accessing
+ * the Solver result. See 'Solver.each_problem'.
+ *
*/
%{
@@ -55,9 +59,6 @@ typedef struct _Problem {} Problem;
/* A dependency of an already installed Solvable could not be fulfilled (broken system) */
%constant int SOLVER_PROBLEM_RPM_RULE = SOLVER_PROBLEM_RPM_RULE;
- /* no constructor defined, Problems are created by accessing
- the Solver result. See 'Solver.each_problem'. */
-
~Problem()
{ problem_free ($self); }
diff --git a/bindings/relation.i b/bindings/relation.i
index 2d6343b..127845f 100644
--- a/bindings/relation.i
+++ b/bindings/relation.i
@@ -38,13 +38,13 @@ typedef struct _Relation {} Relation;
/*
* Document-method: new
- * create a new relation
+ * Create a new relation inside Pool. Gets a name, plus optionally operand and edition-version-release (evr)
*
- * see also: create_relation
+ * see also: Pool.create_relation
*
- * call-seq
- * Relation.new pool, "kernel" -> Relation
- * Relation.new pool, "kernel", REL_GT, "2.6.26" -> Relation
+ * call-seq:
+ * Relation.new( pool, "kernel" ) -> Relation
+ * Relation.new( pool, "kernel", REL_GT, "2.6.26" ) -> Relation
*
*/
Relation( Pool *pool, const char *name, int op = 0, const char *evr = NULL )
diff --git a/bindings/repodata.i b/bindings/repodata.i
index 6a6da51..efd86a8 100644
--- a/bindings/repodata.i
+++ b/bindings/repodata.i
@@ -5,9 +5,10 @@
*
* Repodata is a Repo extension and thus belongs to a Repo.
*
- * There is
- * no way to create a Repodata on its own, it can only be accessed
+ * === Constructor
+ * There is no way to create a Repodata on its own, it can only be accessed
* through Pool.data
+ *
*/
%nodefault _Repodata;
diff --git a/bindings/rule.i b/bindings/rule.i
index dda209c..858cc16 100644
--- a/bindings/rule.i
+++ b/bindings/rule.i
@@ -7,6 +7,9 @@
*
* Rules are useful to traceback a decision or a problem.
*
+ * === Constructor
+ * There is no constructor for Rule. Rules are embedded in the Solver
+ *
*/
%nodefault rule;
@@ -15,7 +18,6 @@ typedef struct rule {} Rule;
%extend Rule {
- /* no constructor, Rule is embedded in Solver */
int p()
{ return $self->p; }
diff --git a/bindings/solution.i b/bindings/solution.i
index 82ba8db..810a393 100644
--- a/bindings/solution.i
+++ b/bindings/solution.i
@@ -2,6 +2,10 @@
* Document-class: Solution
* Solutions are attached to Problems and give hints on how to solve problems.
*
+ * === Constructor
+ * There is no constructor defined for Solution. Solution are part of Problem and can be
+ * accessed through Problem.each_solution
+ *
*/
%nodefault _Solution;
diff --git a/bindings/solvable.i b/bindings/solvable.i
index 6aa8779..8cbcb04 100644
--- a/bindings/solvable.i
+++ b/bindings/solvable.i
@@ -21,6 +21,10 @@ typedef struct _Solvable {} XSolvable; /* expose XSolvable as 'Solvable' */
/*
* Document-method: new
*
+ * Create a Solvable in a Repo, give it name, edition-version-release and optionally an architecture.
+ *
+ * Architecture defaults to _noarch_
+ *
* See also: Repo.create_solvable
*
* call-seq:
diff --git a/bindings/solver.i b/bindings/solver.i
index c75cc0c..768793d 100644
--- a/bindings/solver.i
+++ b/bindings/solver.i
@@ -17,7 +17,7 @@
* Solving can be controlled globally by setting solver flags.
* Additionally, specific constraints can be set by using Covenants.
*
- * Example code:
+ * === Example code
* pool = Satsolver::Pool.new
* pool.arch = "i686"
* system = pool.add_rpmdb( "/" )
@@ -97,9 +97,10 @@ typedef struct solver {} Solver;
%extend Solver {
/*
- * Document-method: new
* Create a solver operating on a pool
+ *
* Equivalent: Pool.create_solver
+ *
* call-seq:
* Solver.new(pool) -> Solver
*
diff --git a/bindings/transaction.i b/bindings/transaction.i
index 5db01a4..1ef2d9a 100644
--- a/bindings/transaction.i
+++ b/bindings/transaction.i
@@ -32,6 +32,11 @@ typedef struct _Transaction {} Transaction;
#endif
%extend Transaction {
+ /*
+ * Create transaction based on Pool
+ *
+ * See also: Pool.create_transaction
+ */
Transaction( Pool *pool )
{ return transaction_new( pool ); }
--
To unsubscribe, e-mail: zypp-commit+unsubscribe@opensuse.org
For additional commands, e-mail: zypp-commit+help@opensuse.org