Module: AutoC

Defined in:
lib/autoc.rb,
lib/autoc/type.rb,
lib/autoc/code.rb,
lib/autoc/collection.rb,
lib/autoc/collection/list.rb,
lib/autoc/collection/queue.rb,
lib/autoc/collection/vector.rb,
lib/autoc/collection/hash_set.rb,
lib/autoc/collection/hash_map.rb

Overview

AutoC is a host of Ruby modules related to automatic C source code generation.

  1. Code - generic C multi-source module generator.

  2. Collection - strongly-typed data structure generators similar to the C++ STL container classes.

Versioning scheme

AutoC adheres to simple major.minor versioning scheme.

Change in major number states incompatible changes in the code while change in minor number states (rather) small incremental changes that should not normally break things.

That said, release 1.0 is the first release of version 1 which is considered beta, not stable. Note that it is not necessary stable or feature complete. Releases 1.1+ will present incremental improvements, bugfixes, documentation updates etc. to version 1. Should the major incompatible changes be made, the new release 2.0 will be introduced and so forth.

Defined Under Namespace

Modules: Priority Classes: Code, Collection, HashMap, HashSet, List, Module, Queue, Type, UserDefinedType, Vector

Constant Summary

VERSION =
"1.1"

Class Method Summary (collapse)

Class Method Details

+ (Object) priority_sort(entities, reverse = false)



123
124
125
126
127
# File 'lib/autoc/code.rb', line 123

def self.priority_sort(entities, reverse = false)
  list = entities.to_a.sort! {|a,b| a.priority <=> b.priority}
  list.reverse! unless reverse
  list
end