//\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
// UserRTX.NET satellite library | Author: Sergei Y.Kitáev
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
using System;

#if !WASM
namespace user_rtx { using u = user_rtx;
#else
namespace user_rtx.wasm { using u = user_rtx.wasm;
#endif
//--------------------------------------------------------------------------------------------------

/// <summary>
/// Input parameter (remark attribute)
/// </summary>
[AttributeUsage( AttributeTargets.Parameter )]
public class inputAttribute: Attribute {}
/// <summary>
/// Output parameter (remark attribute)
/// </summary>
[AttributeUsage( AttributeTargets.Parameter )]
public class outputAttribute: Attribute {}

/// <summary>
/// Optional parameter (remark attribute)
/// </summary>
[AttributeUsage( AttributeTargets.Parameter )]
public class optAttribute: Attribute {}
/// <summary>
/// Optional through minus one (remark attribute)
/// </summary>
[AttributeUsage( AttributeTargets.Parameter | AttributeTargets.Method | AttributeTargets.Property | AttributeTargets.Field )]
public class opt_through_minus_1Attribute: Attribute {}
/// <summary>
/// Relatively optional parameter (remark attribute)
/// </summary>
[AttributeUsage( AttributeTargets.Parameter | AttributeTargets.Method | AttributeTargets.Property )]
public class rel_optAttribute: Attribute {}
/// <summary>
/// Hidden null parameter (remark attribute)
/// </summary>
[AttributeUsage( AttributeTargets.Parameter | AttributeTargets.Method | AttributeTargets.Property | AttributeTargets.Field )]
public class hidden_nullAttribute: Attribute {}

/// <summary>
/// Attribute related or (remark attribute)
/// </summary>
[AttributeUsage( AttributeTargets.Parameter | AttributeTargets.Method | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Constructor )]
public class orAttribute: Attribute {}

//--------------------------------------------------------------------------------------------------

/// <summary>
/// Function result interpretation for failure (remark attribute)
/// </summary>
[AttributeUsage( AttributeTargets.Method )]
public class failure_as_nullAttribute: Attribute {}
/// <summary>
/// Function result interpretation for failure (remark attribute)
/// </summary>
[AttributeUsage( AttributeTargets.Method )]
public class failure_as_minus_1Attribute: Attribute {}
/// <summary>
/// Function result interpretation for failure (remark attribute)
/// </summary>
[AttributeUsage( AttributeTargets.Method )]
public class failure_as_zeroAttribute: Attribute {}

//--------------------------------------------------------------------------------------------------

/// <summary>
/// Universal remark attribute
/// </summary>
[AttributeUsage( AttributeTargets.Parameter | AttributeTargets.Method | AttributeTargets.Property | AttributeTargets.Field )]
public class remarkAttribute: Attribute
{
   public remarkAttribute( string remark ) {}
}

//--------------------------------------------------------------------------------------------------

/// <summary>
/// Default value for parameter (remark attribute)
/// </summary>
[AttributeUsage( AttributeTargets.Parameter | AttributeTargets.Property )]
public class defAttribute: Attribute
{
   public defAttribute( object? value ) {}
}

/// <summary>
/// Default-true value for parameter (remark attribute)
/// </summary>
/// <remarks>
/// This attribute has sence in context of overloaded function version(s).
/// </remarks>
[AttributeUsage( AttributeTargets.Parameter | AttributeTargets.Property )]
public class def_trueAttribute: Attribute {}

/// <summary>
/// Positive value (remark attribute)
/// </summary>
[AttributeUsage( AttributeTargets.Parameter | AttributeTargets.Method | AttributeTargets.Property | AttributeTargets.Field )]
public class positiveAttribute: Attribute {}
/// <summary>
/// Not-negative value (remark attribute)
/// </summary>
[AttributeUsage( AttributeTargets.Parameter | AttributeTargets.Method | AttributeTargets.Property | AttributeTargets.Field )]
public class not_negativeAttribute: Attribute {}

/// <summary>
/// Negative value (remark attribute)
/// </summary>
[AttributeUsage( AttributeTargets.Parameter | AttributeTargets.Method | AttributeTargets.Property | AttributeTargets.Field )]
public class negativeAttribute: Attribute {}
/// <summary>
/// Not-positive value (remark attribute)
/// </summary>
[AttributeUsage( AttributeTargets.Parameter | AttributeTargets.Method | AttributeTargets.Property | AttributeTargets.Field )]
public class not_positiveAttribute: Attribute {}

/// <summary>
/// Range attribute (with Value property)
/// </summary>
[AttributeUsage( AttributeTargets.Parameter | AttributeTargets.Method | AttributeTargets.Property | AttributeTargets.Field )]
public class rangeAttribute: Attribute
{
   public rangeAttribute( object from, object to)
   {
      From = from;
      To = to;
   }
   public object? From { get; set; }
   public object? To { get; set; }
}

//--------------------------------------------------------------------------------------------------

/// <summary>
/// Readonly parameter (remark attribute)
/// </summary>
[AttributeUsage( AttributeTargets.Parameter )]
public class roAttribute: Attribute {}

/// <summary>
/// Required parameter (remark attribute)
/// </summary>
[AttributeUsage( AttributeTargets.Parameter )]
public class reqAttribute: Attribute {}

//--------------------------------------------------------------------------------------------------

/// <summary>
/// Pseudo-static class or member (remark attribute)
/// </summary>
[AttributeUsage( AttributeTargets.Class | AttributeTargets.Method | AttributeTargets.Property )]
public class pseudo_staticAttribute: Attribute {}

/// <summary>
/// Virtual static class or member (remark attribute)
/// </summary>
[AttributeUsage( AttributeTargets.Class | AttributeTargets.Method | AttributeTargets.Property )]
public class virtual_staticAttribute: Attribute {}

/// <summary>
/// Instance class (remark attribute), for usage in couple with StaticAttribute
/// </summary>
[AttributeUsage( AttributeTargets.Class )]
public class instanceAttribute: Attribute {}

//--------------------------------------------------------------------------------------------------

/// <summary>
/// Not null (remark attribute)
/// </summary>
[AttributeUsage( AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Method )]
public class not_nullAttribute: Attribute {}

/// <summary>
/// Optional value (remark attribute)
/// </summary>
[AttributeUsage( AttributeTargets.Property | AttributeTargets.Field )]
public class opt_valueAttribute: Attribute {}

/// <summary>
/// Optional result (remark attribute)
/// </summary>
[AttributeUsage( AttributeTargets.Method )]
public class opt_resultAttribute: Attribute {}

/// <summary>
/// Strict result (remark attribute)
/// </summary>
[AttributeUsage( AttributeTargets.Method | AttributeTargets.Property )]
public class strict_resultAttribute: Attribute {}

//--------------------------------------------------------------------------------------------------

/// <summary>
/// Not null (remark attribute)
/// </summary>
[AttributeUsage( AttributeTargets.Parameter | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Method )]
public class not_emptyAttribute: Attribute {}

//--------------------------------------------------------------------------------------------------

/// <summary>
/// Returns true (remark attribute)
/// </summary>
[AttributeUsage( AttributeTargets.Method )]
public class returns_trueAttribute: Attribute {}
/// <summary>
/// Returns false (remark attribute)
/// </summary>
[AttributeUsage( AttributeTargets.Method )]
public class returns_falseAttribute: Attribute {}
/// <summary>
/// Returns zero (remark attribute)
/// </summary>
[AttributeUsage( AttributeTargets.Method )]
public class returns_zeroAttribute: Attribute {}
/// <summary>
/// Returns null (remark attribute)
/// </summary>
[AttributeUsage( AttributeTargets.Method )]
public class returns_nullAttribute: Attribute {}
/// <summary>
/// Returns attribute (with value)
/// </summary>
[AttributeUsage( AttributeTargets.Method )]
public class returnsAttribute: Attribute
{
   public returnsAttribute( string value ) {}
}

/// <summary>
/// Returns current (remark attribute)
/// </summary>
[AttributeUsage( AttributeTargets.Method )]
public class returns_currentAttribute: Attribute {}
/// <summary>
/// Returns source (remark attribute)
/// </summary>
[AttributeUsage( AttributeTargets.Method )]
public class returns_sourceAttribute: Attribute {}
/// <summary>
/// Returns self (remark attribute)
/// </summary>
[AttributeUsage( AttributeTargets.Property | AttributeTargets.Method )]
public class returns_selfAttribute: Attribute {}
/// <summary>
/// Returns previous (remark attribute)
/// </summary>
[AttributeUsage( AttributeTargets.Method )]
public class returns_previousAttribute: Attribute
{
   public returns_previousAttribute() {}
   public returns_previousAttribute( string propertyName ) {}
}
/// <summary>
/// Returns target (remark attribute)
/// </summary>
[AttributeUsage( AttributeTargets.Method )]
public class returns_targetAttribute: Attribute {}
/// <summary>
/// Returns true if changed (remark attribute)
/// </summary>
[AttributeUsage( AttributeTargets.Method )]
public class returns_changedAttribute: Attribute
{
   public returns_changedAttribute() {}
   public returns_changedAttribute( string propertyName ) {}
}

/// <summary>
/// Returns property value (remark attribute)
/// </summary>
[AttributeUsage( AttributeTargets.Method )]
public class returns_propertyAttribute: Attribute
{
   public returns_propertyAttribute( string propertyNameOrPath ) {}
}

/// <summary>
/// Returns null on success (remark attribute)
/// </summary>
[AttributeUsage( AttributeTargets.Method )]
public class null_on_successAttribute: Attribute {}

/// <summary>
/// Not returns (remark attribute)
/// </summary>
[AttributeUsage( AttributeTargets.Method )]
public class doesnt_returnAttribute: Attribute {}

/// <summary>
/// Fatal error on failure (remark attribute)
/// </summary>
[AttributeUsage( AttributeTargets.Method | AttributeTargets.Property | AttributeTargets.Constructor )]
public class fatal_error_on_failureAttribute: Attribute {}

//--------------------------------------------------------------------------------------------------

/// <summary>
/// For read intended result object (remark attribute)
/// </summary>
[AttributeUsage( AttributeTargets.Method | AttributeTargets.Property )]
public class for_readAttribute: Attribute {}

/// <summary>
/// Readonly object (remark attribute)
/// </summary>
[AttributeUsage( AttributeTargets.Method | AttributeTargets.Property )]
public class readonly_objectAttribute: Attribute {}

//--------------------------------------------------------------------------------------------------

/// <summary>
/// Zero-based index (remark attribute)
/// </summary>
[AttributeUsage( AttributeTargets.Method | AttributeTargets.Property | AttributeTargets.Parameter )]
public class zero_based_indexAttribute: Attribute {}

/// <summary>
/// One-based index (remark attribute)
/// </summary>
[AttributeUsage( AttributeTargets.Method | AttributeTargets.Property | AttributeTargets.Parameter )]
public class one_based_indexAttribute: Attribute {}

//--------------------------------------------------------------------------------------------------

/// <summary>
/// Needs free (remark attribute)
/// </summary>
[AttributeUsage( AttributeTargets.Method | AttributeTargets.Parameter )]
public class needs_freeAttribute: Attribute {}

/// <summary>
/// Needs finalize (remark attribute)
/// </summary>
[AttributeUsage( AttributeTargets.Method | AttributeTargets.Parameter )]
public class needs_finalizeAttribute: Attribute {}

//--------------------------------------------------------------------------------------------------

[AttributeUsage( AttributeTargets.Parameter )]
public class resetAttribute: Attribute {}

[AttributeUsage( AttributeTargets.Property | AttributeTargets.Field )]
public class resettable_valueAttribute: Attribute {}

//--------------------------------------------------------------------------------------------------

/// <summary>
/// Once-invocable restriction (remark attribute)
/// </summary>
[AttributeUsage( AttributeTargets.Method | AttributeTargets.Property )]
public class once_invocableAttribute: Attribute {}

//--------------------------------------------------------------------------------------------------
} // user_rtx (.wasm)
