Skip to content

Commit

Permalink
Converted ValaDoc comments to Visual Studio
Browse files Browse the repository at this point in the history
  • Loading branch information
smx-smx committed Dec 14, 2017
1 parent 1b324b0 commit aaae0d1
Show file tree
Hide file tree
Showing 193 changed files with 6,280 additions and 6,278 deletions.
6 changes: 3 additions & 3 deletions CCodeGen/CCodeAttribute.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
using static GLibPorts.GLib;

namespace CCodeGen {
/**
* Cache for the CCode attribute
*/
/// <summary>
/// Cache for the CCode attribute
/// </summary>
public class CCodeAttribute : AttributeCache {
private CodeNode node;
private Symbol sym;
Expand Down
18 changes: 9 additions & 9 deletions CCodeGen/CCodeCompiler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@

namespace CCodeGen {

/**
* Interface to the C compiler.
*/
/// <summary>
/// Interface to the C compiler.
/// </summary>
public class CCodeCompiler {
public string path { get; set; }

Expand Down Expand Up @@ -45,12 +45,12 @@ static bool package_exists(string package_name, string pkg_config_command = "pkg
}
}

/**
* Compile generated C code to object code and optionally link object
* files.
*
* @param context a code context
*/
/// <summary>
/// Compile generated C code to object code and optionally link object
/// files.
///
/// <param name="context">a code context</param>
/// </summary>
public void compile(CodeContext context, string cc_command, string[] cc_options, string pkg_config_command = null) {
bool use_pkgconfig = false;

Expand Down
12 changes: 6 additions & 6 deletions CCodeGen/CType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
using Vala.Lang.Types;

namespace CCodeGen {
/**
* A C type, used only for code generation purposes.
*/
/// <summary>
/// A C type, used only for code generation purposes.
/// </summary>
public class CType : DataType {
/**
* The name of the C type.
*/
/// <summary>
/// The name of the C type.
/// </summary>
public string ctype_name { get; set; }

public CType(string ctype_name) {
Expand Down
24 changes: 12 additions & 12 deletions CCodeGen/ClassRegisterFunction.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,21 @@
using Vala.Lang.TypeSymbols;

namespace CCodeGen {
/**
* C function to register a class at runtime.
*/
/// <summary>
/// C function to register a class at runtime.
/// </summary>
public class ClassRegisterFunction : TypeRegisterFunction {
/**
* Specifies the class to be registered.
*/
/// <summary>
/// Specifies the class to be registered.
/// </summary>
public Class class_reference { get; set; }

/**
* Creates a new C function to register the specified class at runtime.
*
* @param cl a class
* @return newly created class register function
*/
/// <summary>
/// Creates a new C function to register the specified class at runtime.
///
/// <param name="cl">a class</param>
/// <returns>newly created class register function</returns>
/// </summary>
public ClassRegisterFunction(Class cl, CodeContext context) {
class_reference = cl;
this.context = context;
Expand Down
24 changes: 12 additions & 12 deletions CCodeGen/EnumRegisterFunction.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,21 @@
using Vala.Lang.TypeSymbols;

namespace CCodeGen {
/**
* C function to register an enum at runtime.
*/
/// <summary>
/// C function to register an enum at runtime.
/// </summary>
public class EnumRegisterFunction : TypeRegisterFunction {
/**
* Specifies the enum to be registered.
*/
/// <summary>
/// Specifies the enum to be registered.
/// </summary>
public ValaEnum enum_reference { get; set; }

/**
* Creates a new C function to register the specified enum at runtime.
*
* @param en an enum
* @return newly created enum register function
*/
/// <summary>
/// Creates a new C function to register the specified enum at runtime.
///
/// <param name="en">an enum</param>
/// <returns>newly created enum register function</returns>
/// </summary>
public EnumRegisterFunction(ValaEnum en, CodeContext context) {
enum_reference = en;
this.context = context;
Expand Down
12 changes: 6 additions & 6 deletions CCodeGen/InterfaceRegisterFunction.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@
using Vala.Lang.TypeSymbols;

namespace CCodeGen {
/**
* C function to register an interface at runtime.
*/
/// <summary>
/// C function to register an interface at runtime.
/// </summary>
public class InterfaceRegisterFunction : TypeRegisterFunction {
/**
* Specifies the interface to be registered.
*/
/// <summary>
/// Specifies the interface to be registered.
/// </summary>
public Interface interface_reference { get; set; }

public InterfaceRegisterFunction(Interface iface, CodeContext context) {
Expand Down
6 changes: 3 additions & 3 deletions CCodeGen/Modules/CCodeAssignmentModule.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
using static GLibPorts.GLib;

namespace CCodeGen.Modules {
/**
* The link between an assignment and generated code.
*/
/// <summary>
/// The link between an assignment and generated code.
/// </summary>
public class CCodeAssignmentModule : CCodeMemberAccessModule {
TargetValue emit_simple_assignment(Assignment assignment) {
Variable variable = (Variable)assignment.left.symbol_reference;
Expand Down
56 changes: 28 additions & 28 deletions CCodeGen/Modules/CCodeBaseModule.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@
using static GLibPorts.GLib;

namespace CCodeGen.Modules {
/**
* Code visitor generating C Code.
*/
/// <summary>
/// Code visitor generating C Code.
/// </summary>
public abstract class CCodeBaseModule : CodeGenerator {
public class EmitContext {
public Symbol current_symbol;
Expand Down Expand Up @@ -1357,11 +1357,11 @@ public bool is_constant_ccode_expression(CCodeExpression cexpr) {
} else if (cexpr is CCodeUnaryExpression) {
var cunary = (CCodeUnaryExpression)cexpr;
switch (cunary.Operator) {
case CCodeUnaryOperator.PREFIX_INCREMENT:
case CCodeUnaryOperator.PREFIX_DECREMENT:
case CCodeUnaryOperator.POSTFIX_INCREMENT:
case CCodeUnaryOperator.POSTFIX_DECREMENT:
return false;
case CCodeUnaryOperator.PREFIX_INCREMENT:
case CCodeUnaryOperator.PREFIX_DECREMENT:
case CCodeUnaryOperator.POSTFIX_INCREMENT:
case CCodeUnaryOperator.POSTFIX_DECREMENT:
return false;
}
return is_constant_ccode_expression(cunary.inner);
} else if (cexpr is CCodeBinaryExpression) {
Expand All @@ -1373,10 +1373,10 @@ public bool is_constant_ccode_expression(CCodeExpression cexpr) {
return (null != cparenthesized && is_constant_ccode_expression(cparenthesized.inner));
}

/**
* Returns whether the passed cexpr is a pure expression, i.e. an
* expression without side-effects.
*/
/// <summary>
/// Returns whether the passed cexpr is a pure expression, i.e. an
/// expression without side-effects.
/// </summary>
public bool is_pure_ccode_expression(CCodeExpression cexpr) {
if (cexpr is CCodeConstant || cexpr is CCodeIdentifier) {
return true;
Expand All @@ -1386,13 +1386,13 @@ public bool is_pure_ccode_expression(CCodeExpression cexpr) {
} else if (cexpr is CCodeUnaryExpression) {
var cunary = (CCodeUnaryExpression)cexpr;
switch (cunary.Operator) {
case CCodeUnaryOperator.PREFIX_INCREMENT:
case CCodeUnaryOperator.PREFIX_DECREMENT:
case CCodeUnaryOperator.POSTFIX_INCREMENT:
case CCodeUnaryOperator.POSTFIX_DECREMENT:
return false;
default:
return is_pure_ccode_expression(cunary.inner);
case CCodeUnaryOperator.PREFIX_INCREMENT:
case CCodeUnaryOperator.PREFIX_DECREMENT:
case CCodeUnaryOperator.POSTFIX_INCREMENT:
case CCodeUnaryOperator.POSTFIX_DECREMENT:
return false;
default:
return is_pure_ccode_expression(cunary.inner);
}
} else if (cexpr is CCodeMemberAccess) {
var cma = (CCodeMemberAccess)cexpr;
Expand Down Expand Up @@ -2447,9 +2447,9 @@ public override void visit_local_variable(LocalVariable local) {
local.active = true;
}

/**
* Create a temporary variable and return lvalue access to it
*/
/// <summary>
/// Create a temporary variable and return lvalue access to it
/// </summary>
public TargetValue create_temp_value(DataType type, bool init, CodeNode node_reference, bool? value_owned = null) {
var local = new LocalVariable(type.copy(), "_tmp%d_".printf(next_temp_var_id++), null, node_reference.source_reference);
local.init = init;
Expand Down Expand Up @@ -2483,9 +2483,9 @@ public TargetValue create_temp_value(DataType type, bool init, CodeNode node_ref
return value;
}

/**
* Load a temporary variable returning or owned rvalue access to it, depending on the ownership of the value type.
*/
/// <summary>
/// Load a temporary variable returning or owned rvalue access to it, depending on the ownership of the value type.
/// </summary>
public TargetValue load_temp_value(TargetValue lvalue) {
var value = ((GLibValue)lvalue).copy();
var deleg_type = value.value_type as DelegateType;
Expand All @@ -2501,9 +2501,9 @@ public TargetValue load_temp_value(TargetValue lvalue) {
return value;
}

/**
* Store a value in a temporary variable and return or owned rvalue access to it, depending on the ownership of the given type.
*/
/// <summary>
/// Store a value in a temporary variable and return or owned rvalue access to it, depending on the ownership of the given type.
/// </summary>
public TargetValue store_temp_value(TargetValue initializer, CodeNode node_reference, bool? value_owned = null) {
var lvalue = create_temp_value(initializer.value_type, false, node_reference, value_owned);
store_value(lvalue, initializer, node_reference.source_reference);
Expand Down
18 changes: 9 additions & 9 deletions CCodeGen/Modules/CCodeMethodModule.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
using static GLibPorts.GLib;

namespace CCodeGen.Modules {
/**
* The link between a method and generated code.
*/
/// <summary>
/// The link between a method and generated code.
/// </summary>
public abstract class CCodeMethodModule : CCodeStructModule {

private bool ellipses_to_valist = false;
Expand Down Expand Up @@ -303,12 +303,12 @@ void register_plugin_type(ObjectTypeSymbol type_symbol, HashSet<Symbol> register
}
}

/**
* This function generates the code the given method. If the method is
* a constructor, _construct is generated, unless it's variadic, in which
* case _constructv is generated (and _construct is generated together
* with _new in visit_creation_method).
*/
/// <summary>
/// This function generates the code the given method. If the method is
/// a constructor, _construct is generated, unless it's variadic, in which
/// case _constructv is generated (and _construct is generated together
/// with _new in visit_creation_method).
/// </summary>
public override void visit_method(Method m) {
string real_name = get_ccode_real_name(m);
if (m is CreationMethod && m.is_variadic()) {
Expand Down
24 changes: 12 additions & 12 deletions CCodeGen/StructRegisterFunction.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,21 @@
using Vala.Lang.TypeSymbols;

namespace CCodeGen {
/**
* C function to register a struct at runtime.
*/
/// <summary>
/// C function to register a struct at runtime.
/// </summary>
public class StructRegisterFunction : TypeRegisterFunction {
/**
* Specifies the struct to be registered.
*/
/// <summary>
/// Specifies the struct to be registered.
/// </summary>
public Struct struct_reference { get; set; }

/**
* Creates a new C function to register the specified struct at runtime.
*
* @param st a struct
* @return newly created struct register function
*/
/// <summary>
/// Creates a new C function to register the specified struct at runtime.
///
/// <param name="st">a struct</param>
/// <returns>newly created struct register function</returns>
/// </summary>
public StructRegisterFunction(Struct st, CodeContext context) {
struct_reference = st;
this.context = context;
Expand Down
Loading

0 comments on commit aaae0d1

Please sign in to comment.