text:
<title>Ogre::GLES2DefaultHardwareBufferManagerBase Class Reference - OGRE Documentation</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link type="text/css" rel="stylesheet" href="doxygen.css">
<link type="text/css" rel="stylesheet" href="tabs.css">

Main Page

Related Pages

Modules

Namespaces

Classes

Files

Directories

Class List

Class Index

Class Hierarchy

Class Members

Ogre

GLES2DefaultHardwareBufferManagerBase

Public Types |
Public Member Functions |
Protected Types |
Protected Member Functions |
Protected Attributes |
Static Protected Attributes

Ogre::GLES2DefaultHardwareBufferManagerBase Class Reference

Specialisation of HardwareBufferManager to emulate hardware buffers.
 More...

#include <OgreGLES2DefaultHardwareBufferManager.h>

Inheritance diagram for Ogre::GLES2DefaultHardwareBufferManagerBase:

<map name="Ogre_1_1GLES2DefaultHardwareBufferManagerBase_inherit__map" id="Ogre_1_1GLES2DefaultHardwareBufferManagerBase_inherit__map">
<area shape="rect" id="node2" href="classOgre_1_1HardwareBufferManagerBase.html" title="Base definition of a hardware buffer manager." alt="" coords="47,83,276,112"/><area shape="rect" id="node4" href="classOgre_1_1AllocatedObject.html" title="Superclass for all objects that wish to use custom memory allocators when their new / delete operator..." alt="" coords="119,5,204,35"/></map>
[legend]

List of all members.

Public Types

enum  	BufferLicenseType { BLT_MANUAL_RELEASE,
BLT_AUTOMATIC_RELEASE
 }

Public Member Functions

 	GLES2DefaultHardwareBufferManagerBase ()

virtual 	~GLES2DefaultHardwareBufferManagerBase ()

HardwareVertexBufferSharedPtr 	createVertexBuffer (size_t vertexSize, size_t numVerts, HardwareBuffer::Usage usage, bool useShadowBuffer=false)

 	Creates a vertex buffer.

HardwareIndexBufferSharedPtr 	createIndexBuffer (HardwareIndexBuffer::IndexType itype, size_t numIndexes, HardwareBuffer::Usage usage, bool useShadowBuffer=false)

 	Create a hardware vertex buffer.

RenderToVertexBufferSharedPtr 	createRenderToVertexBuffer (void)

 	Create a render to vertex buffer.

virtual VertexDeclaration * 	createVertexDeclaration (void)

 	Creates a new vertex declaration.

virtual void 	destroyVertexDeclaration (VertexDeclaration *decl)

 	Destroys a vertex declaration.

virtual VertexBufferBinding * 	createVertexBufferBinding (void)

 	Creates a new VertexBufferBinding.

virtual void 	destroyVertexBufferBinding (VertexBufferBinding *binding)

 	Destroys a VertexBufferBinding.

virtual void 	registerVertexBufferSourceAndCopy (const HardwareVertexBufferSharedPtr &sourceBuffer, const HardwareVertexBufferSharedPtr &copy)

 	Registers a vertex buffer as a copy of another.

virtual

HardwareVertexBufferSharedPtr 	allocateVertexBufferCopy (const HardwareVertexBufferSharedPtr &sourceBuffer, BufferLicenseType licenseType, HardwareBufferLicensee *licensee, bool copyData=false)

 	Allocates a copy of a given vertex buffer.

virtual void 	releaseVertexBufferCopy (const HardwareVertexBufferSharedPtr &bufferCopy)

 	Manually release a vertex buffer copy for others to subsequently use.

virtual void 	touchVertexBufferCopy (const HardwareVertexBufferSharedPtr &bufferCopy)

 	Tell engine that the vertex buffer copy intent to reuse.

virtual void 	_freeUnusedBufferCopies (void)

 	Free all unused vertex buffer copies.

virtual void 	_releaseBufferCopies (bool forceFreeUnused=false)

 	Internal method for releasing all temporary buffers which have been allocated using BLT_AUTOMATIC_RELEASE; is called by OGRE.

virtual void 	_forceReleaseBufferCopies (const HardwareVertexBufferSharedPtr &sourceBuffer)

 	Internal method that forces the release of copies of a given buffer.

virtual void 	_forceReleaseBufferCopies (HardwareVertexBuffer *sourceBuffer)

 	Internal method that forces the release of copies of a given buffer.

void 	_notifyVertexBufferDestroyed (HardwareVertexBuffer *buf)

 	Notification that a hardware vertex buffer has been destroyed.

void 	_notifyIndexBufferDestroyed (HardwareIndexBuffer *buf)

 	Notification that a hardware index buffer has been destroyed.

void * 	operator new (size_t sz, const char *file, int line, const char *func)

 	operator new, with debug line info

void * 	operator new (size_t sz)

void * 	operator new (size_t sz, void *ptr)

 	placement operator new

void * 	operator new[] (size_t sz, const char *file, int line, const char *func)

 	array operator new, with debug line info

void * 	operator new[] (size_t sz)

void 	operator delete (void *ptr)

void 	operator delete (void *ptr, void *)

void 	operator delete (void *ptr, const char *, int, const char *)

void 	operator delete[] (void *ptr)

void 	operator delete[] (void *ptr, const char *, int, const char *)

Protected Types

typedef set

< HardwareVertexBuffer * >

::type 	VertexBufferList

 	WARNING: The following two members should place before all other members.

typedef set

< HardwareIndexBuffer * >

::type 	IndexBufferList

typedef set< VertexDeclaration * >

::type 	VertexDeclarationList

typedef set

< VertexBufferBinding * >

::type 	VertexBufferBindingList

typedef multimap

< HardwareVertexBuffer

*, HardwareVertexBufferSharedPtr >

::type 	FreeTemporaryVertexBufferMap

 	Map from original buffer to temporary buffers.

typedef map

< HardwareVertexBuffer

*, VertexBufferLicense >::type 	TemporaryVertexBufferLicenseMap

 	Map from temporary buffer to details of a license.

Protected Member Functions

virtual void 	destroyAllDeclarations (void)

 	Internal method for destroys all vertex declarations.

virtual void 	destroyAllBindings (void)

 	Internal method for destroys all vertex buffer bindings.

virtual VertexDeclaration * 	createVertexDeclarationImpl (void)

 	Internal method for creates a new vertex declaration, may be overridden by certain rendering APIs.

virtual void 	destroyVertexDeclarationImpl (VertexDeclaration *decl)

 	Internal method for destroys a vertex declaration, may be overridden by certain rendering APIs.

virtual VertexBufferBinding * 	createVertexBufferBindingImpl (void)

 	Internal method for creates a new VertexBufferBinding, may be overridden by certain rendering APIs.

virtual void 	destroyVertexBufferBindingImpl (VertexBufferBinding *binding)

 	Internal method for destroys a VertexBufferBinding, may be overridden by certain rendering APIs.

virtual

HardwareVertexBufferSharedPtr 	makeBufferCopy (const HardwareVertexBufferSharedPtr &source, HardwareBuffer::Usage usage, bool useShadowBuffer)

 	Creates a new buffer as a copy of the source, does not copy data.

Protected Attributes

VertexBufferList 	mVertexBuffers

IndexBufferList 	mIndexBuffers

VertexDeclarationList 	mVertexDeclarations

VertexBufferBindingList 	mVertexBufferBindings

FreeTemporaryVertexBufferMap 	mFreeTempVertexBufferMap

 	Map of current available temp buffers.

TemporaryVertexBufferLicenseMap 	mTempVertexBufferLicenses

 	Map of currently licensed temporary buffers.

size_t 	mUnderUsedFrameCount

 	Number of frames elapsed since temporary buffers utilization was above half the available.

Static Protected Attributes

static const size_t 	UNDER_USED_FRAME_THRESHOLD

 	Number of frames to wait before free unused temporary buffers.

static const size_t 	EXPIRED_DELAY_FRAME_THRESHOLD

 	Frame delay for BLT_AUTOMATIC_RELEASE temporary buffers.

Detailed Description

Specialisation of HardwareBufferManager to emulate hardware buffers.

Remarks:

You might want to instantiate this class if you want to utilise classes like MeshSerializer without having initialised the rendering system (which is required to create a 'real' hardware buffer manager.

Definition at line 100 of file OgreGLES2DefaultHardwareBufferManager.h.

Member Typedef Documentation

          typedef multimap<HardwareVertexBuffer*, HardwareVertexBufferSharedPtr>::type Ogre::HardwareBufferManagerBase::FreeTemporaryVertexBufferMap [protected, inherited]

Map from original buffer to temporary buffers.

Definition at line 187 of file OgreHardwareBufferManager.h.

          typedef set<HardwareIndexBuffer*>::type Ogre::HardwareBufferManagerBase::IndexBufferList [protected, inherited]

Definition at line 120 of file OgreHardwareBufferManager.h.

          typedef map<HardwareVertexBuffer*, VertexBufferLicense>::type Ogre::HardwareBufferManagerBase::TemporaryVertexBufferLicenseMap [protected, inherited]

Map from temporary buffer to details of a license.

Definition at line 191 of file OgreHardwareBufferManager.h.

          typedef set<VertexBufferBinding*>::type Ogre::HardwareBufferManagerBase::VertexBufferBindingList [protected, inherited]

Definition at line 126 of file OgreHardwareBufferManager.h.

          typedef set<HardwareVertexBuffer*>::type Ogre::HardwareBufferManagerBase::VertexBufferList [protected, inherited]

WARNING: The following two members should place before all other members.

Members destruct order is very important here, because destructing other members will cause notify back to this class, and then will access to this two members.

Definition at line 119 of file OgreHardwareBufferManager.h.

          typedef set<VertexDeclaration*>::type Ogre::HardwareBufferManagerBase::VertexDeclarationList [protected, inherited]

Definition at line 125 of file OgreHardwareBufferManager.h.

Member Enumeration Documentation

          enum Ogre::HardwareBufferManagerBase::BufferLicenseType [inherited]

Enumerator:

BLT_MANUAL_RELEASE

Licensee will only release buffer when it says so.

BLT_AUTOMATIC_RELEASE

Licensee can have license revoked.

Definition at line 153 of file OgreHardwareBufferManager.h.

Constructor & Destructor Documentation

          Ogre::GLES2DefaultHardwareBufferManagerBase::GLES2DefaultHardwareBufferManagerBase
          (
          	)

          virtual Ogre::GLES2DefaultHardwareBufferManagerBase::~GLES2DefaultHardwareBufferManagerBase
          (
          	)
           [virtual]

Member Function Documentation

          virtual void Ogre::HardwareBufferManagerBase::_forceReleaseBufferCopies
          (
          const HardwareVertexBufferSharedPtr &
          sourceBuffer	)
           [virtual, inherited]

Internal method that forces the release of copies of a given buffer.

Remarks:

This usually means that the buffer which the copies are based on has been changed in some fundamental way, and the owner of the original wishes to make that known so that new copies will reflect the changes.

Parameters:

sourceBuffer	the source buffer as a shared pointer. Any buffer copies created from the source buffer are deleted.

Reimplemented in Ogre::HardwareBufferManager.

Referenced by Ogre::HardwareBufferManager::_forceReleaseBufferCopies().

          virtual void Ogre::HardwareBufferManagerBase::_forceReleaseBufferCopies
          (
          HardwareVertexBuffer *
          sourceBuffer	)
           [virtual, inherited]

Internal method that forces the release of copies of a given buffer.

Remarks:

This usually means that the buffer which the copies are based on has been changed in some fundamental way, and the owner of the original wishes to make that known so that new copies will reflect the changes.

Parameters:

sourceBuffer	the source buffer as a pointer. Any buffer copies created from the source buffer are deleted.

Reimplemented in Ogre::HardwareBufferManager.

          virtual void Ogre::HardwareBufferManagerBase::_freeUnusedBufferCopies
          (
          void
          	)
           [virtual, inherited]

Free all unused vertex buffer copies.

Remarks:

This method free all temporary vertex buffers that not in used. In normally, temporary vertex buffers are subsequently stored and can be made available for other purposes later without incurring the cost of construction / destruction. But in some cases you want to free them to save hardware memory (e.g. application was runs in a long time, you might free temporary buffers periodically to avoid memory overload).

Reimplemented in Ogre::HardwareBufferManager.

Referenced by Ogre::HardwareBufferManager::_freeUnusedBufferCopies().

          void Ogre::HardwareBufferManagerBase::_notifyIndexBufferDestroyed
          (
          HardwareIndexBuffer *
          buf	)
           [inherited]

Notification that a hardware index buffer has been destroyed.

Reimplemented in Ogre::HardwareBufferManager.

Referenced by Ogre::HardwareBufferManager::_notifyIndexBufferDestroyed().

          void Ogre::HardwareBufferManagerBase::_notifyVertexBufferDestroyed
          (
          HardwareVertexBuffer *
          buf	)
           [inherited]

Notification that a hardware vertex buffer has been destroyed.

Reimplemented in Ogre::HardwareBufferManager.

Referenced by Ogre::HardwareBufferManager::_notifyVertexBufferDestroyed().

          virtual void Ogre::HardwareBufferManagerBase::_releaseBufferCopies
          (
          bool
          forceFreeUnused = false	)
           [virtual, inherited]

Internal method for releasing all temporary buffers which have been allocated using BLT_AUTOMATIC_RELEASE; is called by OGRE.

Parameters:

forceFreeUnused	If true, free all unused temporary buffers. If false, auto detect and free all unused temporary buffers based on temporary buffers utilization.

Reimplemented in Ogre::HardwareBufferManager.

Referenced by Ogre::HardwareBufferManager::_releaseBufferCopies().

          virtual HardwareVertexBufferSharedPtr Ogre::HardwareBufferManagerBase::allocateVertexBufferCopy
          (
          const HardwareVertexBufferSharedPtr &
          sourceBuffer,

          BufferLicenseType
          licenseType,

          HardwareBufferLicensee *
          licensee,

          bool
          copyData = false

          )
          	 [virtual, inherited]

Allocates a copy of a given vertex buffer.

Remarks:

This method allocates a temporary copy of an existing vertex buffer. This buffer is subsequently stored and can be made available for other purposes later without incurring the cost of construction / destruction.

Parameters:

sourceBuffer	The source buffer to use as a copy

licenseType	The type of license required on this buffer - automatic release causes this class to release licenses every frame so that they can be reallocated anew.

licensee	Pointer back to the class requesting the copy, which must implement HardwareBufferLicense in order to be notified when the license expires.

copyData	If true, the current data is copied as well as the structure of the buffer

Reimplemented in Ogre::HardwareBufferManager.

Referenced by Ogre::HardwareBufferManager::allocateVertexBufferCopy().

          HardwareIndexBufferSharedPtr Ogre::GLES2DefaultHardwareBufferManagerBase::createIndexBuffer
          (
          HardwareIndexBuffer::IndexType
          itype,

          size_t
          numIndexes,

          HardwareBuffer::Usage
          usage,

          bool
          useShadowBuffer = false

          )
          	 [virtual]

Create a hardware vertex buffer.

Implements Ogre::HardwareBufferManagerBase.

          RenderToVertexBufferSharedPtr Ogre::GLES2DefaultHardwareBufferManagerBase::createRenderToVertexBuffer
          (
          void
          	)
           [virtual]

Create a render to vertex buffer.

Implements Ogre::HardwareBufferManagerBase.

          HardwareVertexBufferSharedPtr Ogre::GLES2DefaultHardwareBufferManagerBase::createVertexBuffer
          (
          size_t
          vertexSize,

          size_t
          numVerts,

          HardwareBuffer::Usage
          usage,

          bool
          useShadowBuffer = false

          )
          	 [virtual]

Creates a vertex buffer.

Implements Ogre::HardwareBufferManagerBase.

          virtual VertexBufferBinding* Ogre::HardwareBufferManagerBase::createVertexBufferBinding
          (
          void
          	)
           [virtual, inherited]

Creates a new VertexBufferBinding.

Reimplemented in Ogre::HardwareBufferManager.

Referenced by Ogre::HardwareBufferManager::createVertexBufferBinding().

          virtual VertexBufferBinding* Ogre::HardwareBufferManagerBase::createVertexBufferBindingImpl
          (
          void
          	)
           [protected, virtual, inherited]

Internal method for creates a new VertexBufferBinding, may be overridden by certain rendering APIs.

          virtual VertexDeclaration* Ogre::HardwareBufferManagerBase::createVertexDeclaration
          (
          void
          	)
           [virtual, inherited]

Creates a new vertex declaration.

Reimplemented in Ogre::HardwareBufferManager.

Referenced by Ogre::HardwareBufferManager::createVertexDeclaration().

          virtual VertexDeclaration* Ogre::HardwareBufferManagerBase::createVertexDeclarationImpl
          (
          void
          	)
           [protected, virtual, inherited]

Internal method for creates a new vertex declaration, may be overridden by certain rendering APIs.

Reimplemented in Ogre::D3D11HardwareBufferManagerBase, and Ogre::D3D9HardwareBufferManagerBase.

          virtual void Ogre::HardwareBufferManagerBase::destroyAllBindings
          (
          void
          	)
           [protected, virtual, inherited]

Internal method for destroys all vertex buffer bindings.

          virtual void Ogre::HardwareBufferManagerBase::destroyAllDeclarations
          (
          void
          	)
           [protected, virtual, inherited]

Internal method for destroys all vertex declarations.

          virtual void Ogre::HardwareBufferManagerBase::destroyVertexBufferBinding
          (
          VertexBufferBinding *
          binding	)
           [virtual, inherited]

Destroys a VertexBufferBinding.

Reimplemented in Ogre::HardwareBufferManager.

Referenced by Ogre::HardwareBufferManager::destroyVertexBufferBinding().

          virtual void Ogre::HardwareBufferManagerBase::destroyVertexBufferBindingImpl
          (
          VertexBufferBinding *
          binding	)
           [protected, virtual, inherited]

Internal method for destroys a VertexBufferBinding, may be overridden by certain rendering APIs.

          virtual void Ogre::HardwareBufferManagerBase::destroyVertexDeclaration
          (
          VertexDeclaration *
          decl	)
           [virtual, inherited]

Destroys a vertex declaration.

Reimplemented in Ogre::HardwareBufferManager.

Referenced by Ogre::HardwareBufferManager::destroyVertexDeclaration().

          virtual void Ogre::HardwareBufferManagerBase::destroyVertexDeclarationImpl
          (
          VertexDeclaration *
          decl	)
           [protected, virtual, inherited]

Internal method for destroys a vertex declaration, may be overridden by certain rendering APIs.

Reimplemented in Ogre::D3D11HardwareBufferManagerBase, and Ogre::D3D9HardwareBufferManagerBase.

          virtual HardwareVertexBufferSharedPtr Ogre::HardwareBufferManagerBase::makeBufferCopy
          (
          const HardwareVertexBufferSharedPtr &
          source,

          HardwareBuffer::Usage
          usage,

          bool
          useShadowBuffer

          )
          	 [protected, virtual, inherited]

Creates a new buffer as a copy of the source, does not copy data.

template<class Alloc >

          void Ogre::AllocatedObject< Alloc >::operator delete
          (
          void *
          ptr	)
           [inherited]

Definition at line 95 of file OgreMemoryAllocatedObject.h.

template<class Alloc >

          void Ogre::AllocatedObject< Alloc >::operator delete
          (
          void *
          ptr,

          void *

          )
          	 [inherited]

Definition at line 101 of file OgreMemoryAllocatedObject.h.

template<class Alloc >

          void Ogre::AllocatedObject< Alloc >::operator delete
          (
          void *
          ptr,

          const char *
          ,

          int
          ,

          const char *

          )
          	 [inherited]

Definition at line 107 of file OgreMemoryAllocatedObject.h.

template<class Alloc >

          void Ogre::AllocatedObject< Alloc >::operator delete[]
          (
          void *
          ptr	)
           [inherited]

Definition at line 112 of file OgreMemoryAllocatedObject.h.

template<class Alloc >

          void Ogre::AllocatedObject< Alloc >::operator delete[]
          (
          void *
          ptr,

          const char *
          ,

          int
          ,

          const char *

          )
          	 [inherited]

Definition at line 118 of file OgreMemoryAllocatedObject.h.

template<class Alloc >

          void* Ogre::AllocatedObject< Alloc >::operator new
          (
          size_t
          sz,

          const char *
          file,

          int
          line,

          const char *
          func

          )
          	 [inherited]

operator new, with debug line info

Definition at line 67 of file OgreMemoryAllocatedObject.h.

template<class Alloc >

          void* Ogre::AllocatedObject< Alloc >::operator new
          (
          size_t
          sz	)
           [inherited]

Definition at line 72 of file OgreMemoryAllocatedObject.h.

template<class Alloc >

          void* Ogre::AllocatedObject< Alloc >::operator new
          (
          size_t
          sz,

          void *
          ptr

          )
          	 [inherited]

placement operator new

Definition at line 78 of file OgreMemoryAllocatedObject.h.

template<class Alloc >

          void* Ogre::AllocatedObject< Alloc >::operator new[]
          (
          size_t
          sz,

          const char *
          file,

          int
          line,

          const char *
          func

          )
          	 [inherited]

array operator new, with debug line info

Definition at line 85 of file OgreMemoryAllocatedObject.h.

template<class Alloc >

          void* Ogre::AllocatedObject< Alloc >::operator new[]
          (
          size_t
          sz	)
           [inherited]

Definition at line 90 of file OgreMemoryAllocatedObject.h.

          virtual void Ogre::HardwareBufferManagerBase::registerVertexBufferSourceAndCopy
          (
          const HardwareVertexBufferSharedPtr &
          sourceBuffer,

          const HardwareVertexBufferSharedPtr &
          copy

          )
          	 [virtual, inherited]

Registers a vertex buffer as a copy of another.

Remarks:

This is useful for registering an existing buffer as a temporary buffer which can be allocated just like a copy.

Reimplemented in Ogre::HardwareBufferManager.

Referenced by Ogre::HardwareBufferManager::registerVertexBufferSourceAndCopy().

          virtual void Ogre::HardwareBufferManagerBase::releaseVertexBufferCopy
          (
          const HardwareVertexBufferSharedPtr &
          bufferCopy	)
           [virtual, inherited]

Manually release a vertex buffer copy for others to subsequently use.

Remarks:

Only required if the original call to allocateVertexBufferCopy included a licenseType of BLT_MANUAL_RELEASE.

Parameters:

bufferCopy	The buffer copy. The caller is expected to delete or at least no longer use this reference, since another user may well begin to modify the contents of the buffer.

Reimplemented in Ogre::HardwareBufferManager.

Referenced by Ogre::HardwareBufferManager::releaseVertexBufferCopy().

          virtual void Ogre::HardwareBufferManagerBase::touchVertexBufferCopy
          (
          const HardwareVertexBufferSharedPtr &
          bufferCopy	)
           [virtual, inherited]

Tell engine that the vertex buffer copy intent to reuse.

Remarks:

Ogre internal keep an expired delay counter of BLT_AUTOMATIC_RELEASE buffers, when the counter count down to zero, it'll release for other purposes later. But you can use this function to reset the counter to the internal configured value, keep the buffer not get released for some frames.

Parameters:

bufferCopy	The buffer copy. The caller is expected to keep this buffer copy for use.

Reimplemented in Ogre::HardwareBufferManager.

Referenced by Ogre::HardwareBufferManager::touchVertexBufferCopy().

Member Data Documentation

          const size_t Ogre::HardwareBufferManagerBase::EXPIRED_DELAY_FRAME_THRESHOLD [static, protected, inherited]

Frame delay for BLT_AUTOMATIC_RELEASE temporary buffers.

Definition at line 199 of file OgreHardwareBufferManager.h.

          FreeTemporaryVertexBufferMap Ogre::HardwareBufferManagerBase::mFreeTempVertexBufferMap [protected, inherited]

Map of current available temp buffers.

Definition at line 189 of file OgreHardwareBufferManager.h.

          IndexBufferList Ogre::HardwareBufferManagerBase::mIndexBuffers [protected, inherited]

Definition at line 122 of file OgreHardwareBufferManager.h.

          TemporaryVertexBufferLicenseMap Ogre::HardwareBufferManagerBase::mTempVertexBufferLicenses [protected, inherited]

Map of currently licensed temporary buffers.

Definition at line 193 of file OgreHardwareBufferManager.h.

          size_t Ogre::HardwareBufferManagerBase::mUnderUsedFrameCount [protected, inherited]

Number of frames elapsed since temporary buffers utilization was above half the available.

Definition at line 195 of file OgreHardwareBufferManager.h.

          VertexBufferBindingList Ogre::HardwareBufferManagerBase::mVertexBufferBindings [protected, inherited]

Definition at line 128 of file OgreHardwareBufferManager.h.

          VertexBufferList Ogre::HardwareBufferManagerBase::mVertexBuffers [protected, inherited]

Definition at line 121 of file OgreHardwareBufferManager.h.

          VertexDeclarationList Ogre::HardwareBufferManagerBase::mVertexDeclarations [protected, inherited]

Definition at line 127 of file OgreHardwareBufferManager.h.

          const size_t Ogre::HardwareBufferManagerBase::UNDER_USED_FRAME_THRESHOLD [static, protected, inherited]

Number of frames to wait before free unused temporary buffers.

Definition at line 197 of file OgreHardwareBufferManager.h.

The documentation for this class was generated from the following file:

OgreGLES2DefaultHardwareBufferManager.h

Copyright © 2012 Torus Knot Software Ltd

This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.

Last modified Sun Sep 2 2012 07:28:00


text:
import Joi from 'joi';

const ConnectionServerSchema = Joi.object().keys({
  host: Joi.string().required(),
  port: Joi.number().integer().required(),
  username: Joi.string().required(),
  password: Joi.string().required(),
  servers: Joi.array().items(Joi.object().keys({
    host: Joi.string().required(),
    port: Joi.number().integer().required(),
    active: Joi.boolean().default(true)
  }))
});

const ConnectionDatabaseSchema = Joi.object().keys({
  name: Joi.string().required(),
  username: Joi.string().required(),
  password: Joi.string().required(),
  type: Joi.string().default('graph'),
  storage: Joi.string().default('plocal')
});

const GraphConfigurationSchema = Joi.object().keys({
  connections: Joi.object().pattern(/^[$A-Z_][0-9A-Z_$]*$/i, Joi.object().keys({
    server: ConnectionServerSchema,
    database: ConnectionDatabaseSchema
  }))
});

export default GraphConfigurationSchema;

redpajama_set_name: RedPajamaGithub


text:
@font-face {
	font-family: "BPG Nino Elite Exp";
	src: url("../fonts/BPG Nino Elite Exp.otf");
	font-weight: normal;
	font-style: normal;
}


text:
class XtremeModelGenerator < Rails::Generator::NamedBase
  default_options :skip_timestamps => false, :skip_migration => false, :skip_fixture => false

  attr_reader :parent_class_name,
              :parent_singular_name,
              :parent_plural_name

  def parent?
    !options[:parent].blank?
  end

  def initialize(runtime_args, runtime_options = {})
    super

    if parent?
      @parent_class_name, @parent_singular_name, @parent_plural_name = inflect_names(options[:parent])
    else
      @parent_name = nil
    end
  end

  def manifest
    record do |m|
      # Check for class naming collisions.
      m.class_collisions class_path, class_name, "#{class_name}Test"

      # Model, test, and fixture directories.
      m.directory File.join('app/models', class_path)
      m.directory File.join('test/unit', class_path)
      m.directory File.join('test/fixtures', class_path)

      # Model class
      m.template 'model.rb',      File.join('app/models', class_path, "#{file_name}.rb")

      unless options[:skip_fixture]
       	m.template 'fixtures.yml',  File.join('test/fixtures', "#{table_name}.yml")
      end

      unless options[:skip_migration]
        m.migration_template 'migration.rb', 'db/migrate', :assigns => {
          :migration_name => "Create#{class_name.pluralize.gsub(/::/, '')}"
        }, :migration_file_name => "create_#{file_path.gsub(/\//, '_').pluralize}"
      end
    end
  end

  protected
    def banner
      "Usage: #{$0} #{spec.name} ModelName [field:type, field:type]"
    end

    def add_options!(opt)
      opt.separator ''
      opt.separator 'Options:'
      opt.on("--skip-timestamps",
             "Don't add timestamps to the migration file for this model") { |v| options[:skip_timestamps] = v }
      opt.on("--skip-migration",
             "Don't generate a migration file for this model") { |v| options[:skip_migration] = v }
      opt.on("--skip-fixture",
             "Don't generation a fixture file for this model") { |v| options[:skip_fixture] = v}
      opt.on("--belongs_to PARENT", "Name of model that this one belongs to in the routes.") do |parent|
        raise "No model given" if parent.empty?
        options[:parent] = parent
      end
    end
end


text:
layout: post

title: Git Basics
subtitle: "Introduction to Version Control using Git."
youtube: www.youtube.com/embed/ZTFaM2ITpjE
excerpt: "Version control(VCS) is a system that records changes to a file or a set of files in a repository. In the programming world a version control system is very useful. Its very convenient to have a tool that keeps track of the changes we've made overtime in the lifecycle of our project, if ever we made a mistake in our code we could easily reset a file back to a version where it was working."
category: "git"

author:
  name: Florida Elago
  twitter: floriidaaa
  gplus: +FloridaElago
  bio: Co-founder
  image: https://lh6.googleusercontent.com/-z__0yucwG38/AAAAAAAAAAI/AAAAAAAAJ_A/qDY5dtCZ4zo/s120-c/photo.jpg
---

# Koding Ruby Git Basics

Hello Everyone, this is the shownotes that comes with the Git Basics hangout that we just did

## What we learned

* Git explained, timelines, commits, staging, timecapsules
* VCS Concept
* Adding configurations
* Generating SSH keys
* Basic Commands
  * `git init`
  * `git status`
  * `git add`
  * `git commit`
  * `git remote`
  * `git push`
  * `git stash`
  * `git diff`
  * `HEAD`
  * `git reset`
  * `git checkout`
  * `git branch`

* Git Tips
  * using wildcards
  * Separate commits
  * branching
  * merge conflicts "OH NO T_T"

## Version Control Systems

Version control(VCS) is a system that records changes to a file or a set of files in a repository. In the programming world a version control system is very useful. Its very convenient to have a tool that keeps track of the changes we've made overtime in the lifecycle of our project, if ever we made a mistake in our code we could easily reset a file back to a version where it was working.

On top of all that a VCS is not just limited for programmers, writers, artists and basically anyone who uses a computer that makes changes to files can use this.

Having a version controll is also great for work that requires collaboration since everyone's changes are tracked and if we are to merge them all together we can do it easily using git.

## Git - a distributed Version Control System

 > Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency. [^1]

Git is actually one of many version control systems out there, and what makes git different from other version control systems is that it's "distributed"

**So what does distributed version control mean?**

Version control systems have different types:

**Local Version Control System**

> Many people's version-control method of choice is to copy files into another directory (perhaps a time-stamped directory, if they're clever). This approach is very common because it is so simple, but it is also incredibly error prone. It is easy to forget which directory you're in and accidentally write to the wrong file or copy over files you don't mean to.

> To deal with this issue, programmers long ago developed local VCSs that had a simple database that kept all the changes to files under revision control.

> defenition from [git-cm](http://git-scm.com/book/en/Getting-Started-About-Version-Control)

![image](http://git-scm.com/figures/18333fig0101-tn.png)
>Image from git-scm.com

**Centralized Version Control System**

>The next major issue that people encounter is that they need to collaborate with developers on other systems. To deal with this problem, Centralized Version Control Systems (CVCSs) were developed. These systems, such as CVS, Subversion, and Perforce, have a single server that contains all the versioned files, and a number of clients that check out files from that central place. For many years, this has been the standard for version control.
> defenition from [git-cm](http://git-scm.com/book/en/Getting-Started-About-Version-Control)

![image](http://git-scm.com/figures/18333fig0102-tn.png)
>Image from git-scm.com

**Distributed Version Control System**

>This is where Distributed Version Control Systems (DVCSs) step in. In a DVCS (such as Git, Mercurial, Bazaar or Darcs), clients don't just check out the latest snapshot of the files: they fully mirror the repository. Thus if any server dies, and these systems were collaborating via it, any of the client repositories can be copied back up to
the server to restore it. Every checkout is really a full backup of all the data.

> defenition from [git-cm](http://git-scm.com/book/en/Getting-Started-About-Version-Control)

![image](http://git-scm.com/figures/18333fig0103-tn.png)
>Image from git-scm.com

## Configuring our git

We want git to recognize who we are, so let's configure it to do so by running the following commands in our terminal.

```
git config --global user.name "Your User Name" # this will set the username
git config --global user.email your@email.com # this will set your email address
```

git config --global actually just stores these configuration in a separate file in your home directory. You can view it by typing:

```
cat ~/.gitconfig
```

We can actually do looots of things with git config, but for now, let's just use it to add our email and username.

**CONFIG BONUS**
Let's add pretty colors to our git <3

```
git config --global color.ui true
```

This will make our git interface have color syntax (e.g. red for lines removed and green for lines added)

## Setting up SSH KEYS

In our hangouts I simply demonstrated a tutorial provided by [Github](https://help.github.com/articles/generating-ssh-keys). Please follow that link to learn how to generate SSH keys for your machine and add them to github. Alternatively you can download the client for your machine and this will automatically add ssh keys and add them to github.

## Git timelines

Git creates a timeline for us that will contain time capsules or snapshots of our folder. The green marks below represent the snapshots. We will discuss what they are below

![image](https://www.evernote.com/shard/s217/sh/4165756c-a8e9-4f5a-9c03-2496ac5c0828/575891ce6d6a3415406823969b9b21bb/res/c016613c-5a7f-4810-9bcd-d99db9bef8c4/skitch.jpg)

## Basic Git Commands

### `git init`

`git init` initializes a git repository in whatever folder we're located in. It enables the folder we're in to be version controlled.

Without initializing git, we cannot run any git commands in our folder. Let's try it out.

```
git status #running git command in a folder is not git enabled
output: fatal: Not a git repository (or any of the parent directories): .git

git init # to initialize git
output: Initialized empty Git repository in /Users/shopify/test/.git/
```

### `git status`

`git status` displays if there's any differences between the current files we have and the last commit/snapshot that was in our repository. It also displays if there's anything currently staged in our repository.

### `git add`

`git add` adds files to our *stage*. Git add accepts a filename as an argument, or a wild card. We can do `git add .` to add all the files. We can also pass it the name of the extension + a wild card so that it will add all the files with that extension `git add '*.txt'` will add all the files that have `txt` as an extension.

#### What is staged?

So let's imagine an actual stage, and snapshots as actual pictures. When we add new files to our stage they are not necessarily in a snapshot yet, just think that they're getting ready for a photoshoot and they're posing right now. When we take the picture it's the actual snapshot and the files that are in the stage are the only ones included in it.

![image](https://www.evernote.com/shard/s217/sh/a540e82c-f5db-4c0a-a515-00ae8bf11904/9483f62530491fed6fe416757a8039e1/res/10d307fb-7053-42d0-b763-e782bf45eaf0/skitch.jpg)

### `git commit`

`git commit` records the changes or takes the "snapshot" of the files on the stage. `git commit` accepts the option `-m` and a message parameter that will serve as the title of the snapshot.

```
git commit -m "fixed the typo 'asdf' to 'qwerty'"
```

**Tip:** It's a good practice to pass short but detailed messages of what we did for the commit.

### `git remote`

We used `git remote` to connect with our github repo. Git remote allows us to add a remote repositorie from the cloud that will be connected to our current repository.

Usually it is best to keep our original repository in the cloud just in case something happens to our devices.

In the hangout we passed 3 parameters to `git remote [action] [name-of-remote-repository] [url-of-the-repository]`

#### Adding Repositories

`action` - we can pass either `add` or `rm` to add or remove our remote repository.

`name-of-repository` - here we will pass the name we would like to assign to our remote repository. It's common to name our remote cloud repository "origin".

`url-of-the-repository` - We've used github to get the url of our repository.

**Steps to get the remote url**

1. Navigate to http://github.com
2. Go to the repository that you want to use, and get the *SSH clone url*

<img src="http://i.gyazo.com/cc6b82746633400c20769fb2599074e1.gif" height="500px">

**This is what our git command looks like**

`git remote add origin git@github.com:your-user-name/git-basics.git`

#### Removing repositories

Removing remote repositories is *easy*. All we need to do is this: `git remote rm [name-of-repository]`. That's it.

So if I want to remove `origin` I will do `git remote rm origin`.

### Git push

Git push allows us to `push` and copies our last changes into the remote repository that we created. The changes that are going to be copied are only the ones that are commited.

### Git stash.

There may be times that we want git to remember the files we've added to the stage, but we also want to undo it and maybe try something else.

Git let's us `stash` the files on our stage and keeps it, until we are ready to `apply` it again.

Let's try it out.

1. First let's create 2 sample files

  `$ touch sample1.txt sample2.txt`

2. Then let's add them to our stage.

  `$ git add sample1.txt sample2.txt`

3. Let's check our status. We can see that we've added the files and that it's ready to be commited.

```bash
$ git status
> # Changes to be committed:
>#   (use "git reset HEAD <file>..." to unstage)
>#
>#  new file:   sample1.txt
>#  new file:   sample2.txt
>#
```
4. Now let's do a `git stash` and check the `status`. We can see that the files we created are gone.

```bash
$ git stash
> Saved working directory and index state WIP on gh-pages: 8741e43 fix date
> HEAD is now at 111111 fixing things
$ git status
> # On branch origin
> nothing to commit, working directory clean
  ```

6. In this step you guys free to add/change/modify any files.

5. Now let's do a `git stash apply`. Now we can see that the files have been added

```bash
$ git stash apply
># On branch gh-pages
># Changes to be committed:
>#   (use "git reset HEAD <file>..." to unstage)
>#
>#  new file:   sample1.txt
>#  new file:   sample2.txt
>#
```

https://help.github.com/articles/generating-ssh-keys
http://git-scm.com/
http://git-scm.com/book/en/Getting-Started-About-Version-Control
http://en.wikipedia.org/wiki/Revision_control


text:
title: Three flaws in software design
status: published
tags:
- software-design
- meta
---

Google posted a [small serie of videos](https://www.youtube.com/watch?v=JOAq3YN45YE) about some flaws in software design. I found it really interesting as it relates to the day to day life to any developer. Here's my quick takeaway.

### Don't write code that isn't needed.
It's similar to the MVP in the lean startup theory. Don't write code that does not bring value immediately. There was a great example about a youtube-like app. Don't start by writing the browsing feature, because, in itself that's useless. Start by writing the video player. That's the core of the application.

### Don't write code that is not easy to change
There was a lot of great examples coming from the bugzilla project. Basically, treat every asumptions like *users will never need to do that* as a warning. Be careful of magic numbers littering the code everywhere. One might be right in these asumptions, but most likely, he will be wrong.

### Don't be too generic (overengineering)
This point is hard to balance with the previous one. There was a great advice about it: the system should look like it was design from the start to do what it's doing. The example was about a socket implementation.

You start with a simple unix socket, with 2 classes: `Socket` and `SocketTest`. Then, when you want to add a UDP socket, you don't add an `if` statement in the `Socket` class. At that point, you create an abstract class with `UnixSocket` and `UDPSocket` as concrete implementation. And so on, when you have to add the TCP socket feature, you can then pull out the IP layer.

### Some generic advices
The last part was about some final thoughts. And especially, two things I'll remember.

* Design with unit test in mind **from the start**. It's really really hard to add unit testing in a codebase not designed for that. (I'm struggling with that every day at the day job).
* Internationalization is **hard** to add later on. But don't build the whole framework from the start. Just add a simple layer which will make the addition of international support later easier.

The talks were made by a book author and I am now seriously considering reading his book, there was a lot of value in his talks.
Go through the videos if you have one hour to spare.


text:
var definitions, handler, merge, utils, yaml;

definitions = {
  config: {
    type: 'object',
    properties: {
      'append': {
        type: 'boolean',
        default: false,
        description: `Append the content to the target file. If target does not exist, the
file will be created. When used with the \`match\` and \`replace\` config,
it will append the \`replace\` value at the end of the file if no match
if found and if the value is a string.`
      },
      'backup': {
        type: ['boolean', 'string'],
        default: false,
        description: `Create a backup, append a provided string to the filename extension or
a timestamp if value is not a string, only apply if the target file
exists and is modified.`
      },
      'clean': {
        type: 'boolean',
        default: true,
        description: `Remove all \`null\` and \`undefined\` values.`
      },
      'content': {
        type: 'object',
        description: `The javascript code to stringify.`
      },
      'from': {
        type: 'string',
        description: `Replace from after this marker, a string or a regular expression.`
      },
      'gid': {
        $ref: 'module://@nikitajs/file/lib/index#/definitions/config/properties/gid'
      },
      'indent': {
        type: 'integer',
        default: 2,
        description: `Number of space used for indentation. Default to 2.`
      },
      'line_width': {
        type: 'integer',
        default: 160,
        description: `Number of max character before a new line is written. Default to 160.`
      },
      'local': {
        type: 'boolean',
        default: false,
        description: `Treat the source as local instead of remote, only apply with "ssh"
option.`
      },
      'match': {
        oneOf: [
          {
            type: 'string'
          },
          {
            instanceof: 'RegExp'
          }
        ],
        description: `Replace this marker, default to the replaced string if missing.`
      },
      'merge': {
        type: 'boolean',
        default: false,
        description: `Read the target if it exists and merge its content.`
      },
      'mode': {
        $ref: 'module://@nikitajs/file/lib/index#/definitions/config/properties/mode'
      },
      'replace': {
        type: 'array',
        items: {
          type: 'string'
        },
        description: `The content to be inserted, used conjointly with the from, to or match
options.`
      },
      'source': {
        type: 'string',
        description: `File path from where to extract the content, do not use conjointly
with content.`
      },
      'ssh': {
        type: 'object',
        description: `Run the action on a remote server using SSH, an ssh2 instance or an
configuration object used to initialize the SSH connection.`
      },
      'stdout': {
        // instanceof: 'Writable'
        description: `Writable EventEmitter in which the standard output of executed
commands will be piped.`
      },
      'stderr': {
        // instanceof: 'Writable'
        description: `Writable EventEmitter in which the standard error output of executed
command will be piped.`
      },
      'target': {
        oneOf: [
          {
            type: 'string'
          },
          {
            typeof: 'function'
          }
        ],
        description: `File path where to write content to. Pass the content.`
      },
      'to': {
        oneOf: [
          {
            type: 'string'
          },
          {
            instanceof: 'RegExp'
          }
        ],
        description: `Replace to before this marker, a string or a regular expression.`
      },
      'uid': {
        $ref: 'module://@nikitajs/file/lib/index#/definitions/config/properties/uid'
      }
    },
    required: ['content', 'target']
  }
};

// ## Handler
handler = async function({
    config,
    tools: {log}
  }) {
  var data, err;
  try {
    // Start real work
    if (config.merge) {
      ({data} = (await this.fs.base.readFile({
        target: config.target,
        encoding: 'utf8'
      })));
      data = yaml.load(data);
      config.content = merge(data, config.content);
    }
  } catch (error) {
    err = error;
    if (err.code !== 'NIKITA_FS_CRS_TARGET_ENOENT') {
      throw err;
    }
  }
  if (config.clean) {
    log({
      message: "Clean content",
      level: 'INFO'
    });
    // console.info JSON.stringify config.content, null, true
    utils.object.clean(config.content);
  }
  log({
    message: "Serialize content",
    level: 'DEBUG'
  });
  config.content = yaml.dump(config.content, {
    noRefs: true,
    lineWidth: config.line_width
  });
  return (await this.file(config));
};

// ## Exports
module.exports = {
  handler: handler,
  metadata: {
    definitions: definitions
  }
};

// ## Dependencies
utils = require('./utils');

yaml = require('js-yaml');

({merge} = require('mixme'));

// [js-yaml]: https://github.com/nodeca/js-yaml


text:
% rtcSetGeometrySubdivisionMode(3) | Embree Ray Tracing Kernels 3

#### NAME

    rtcSetGeometrySubdivisionMode - sets the subdivision mode
      of a subdivision geometry

#### SYNOPSIS

    #include <embree3/rtcore.h>

    void rtcSetGeometrySubdivisionMode(
      RTCGeometry geometry,
      unsigned int topologyID,
      enum RTCSubdivisionMode mode
    );

#### DESCRIPTION

The `rtcSetGeometrySubdivisionMode` function sets the subdivision mode
(`mode` parameter) for the topology (`topologyID` parameter) of the
specified subdivision geometry (`geometry` parameter).

The subdivision modes can be used to force linear interpolation for
certain parts of the subdivision mesh:

+ `RTC_SUBDIVISION_MODE_NO_BOUNDARY`: Boundary patches are ignored.
  This way each rendered patch has a full set of control vertices.

+ `RTC_SUBDIVISION_MODE_SMOOTH_BOUNDARY`: The sequence of boundary
  control points are used to generate a smooth B-spline boundary
  curve (default mode).

+ `RTC_SUBDIVISION_MODE_PIN_CORNERS`: Corner vertices are pinned to
  their location during subdivision.

+ `RTC_SUBDIVISION_MODE_PIN_BOUNDARY`: All vertices at the border are
  pinned to their location during subdivision. This way the boundary
  is interpolated linearly. This mode is typically used for texturing
  to also map texels at the border of the texture to the mesh.

+ `RTC_SUBDIVISION_MODE_PIN_ALL`: All vertices at the border are
  pinned to their location during subdivision. This way all patches
  are linearly interpolated.

#### EXIT STATUS

On failure an error code is set that can be queried using
`rtcGetDeviceError`.

#### SEE ALSO

[RTC_GEOMETRY_TYPE_SUBDIVISION]


text:
/***************************************************************************//**
* \file CSD.h
* \version 3.0
*
* \brief
*   This file includes all header files of the CSD component modules.
*
* \see CapSense P4 v3.0 Datasheet
*
*//*****************************************************************************
* Copyright (2016), Cypress Semiconductor Corporation.
********************************************************************************
* This software is owned by Cypress Semiconductor Corporation (Cypress) and is
* protected by and subject to worldwide patent protection (United States and
* foreign), United States copyright laws and international treaty provisions.
* Cypress hereby grants to licensee a personal, non-exclusive, non-transferable
* license to copy, use, modify, create derivative works of, and compile the
* Cypress Source Code and derivative works for the sole purpose of creating
* custom software in support of licensee product to be used only in conjunction
* with a Cypress integrated circuit as specified in the applicable agreement.
* Any reproduction, modification, translation, compilation, or representation of
* this software except as specified above is prohibited without the express
* written permission of Cypress.
*
* Disclaimer: CYPRESS MAKES NO WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, WITH
* REGARD TO THIS MATERIAL, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
* Cypress reserves the right to make changes without further notice to the
* materials described herein. Cypress does not assume any liability arising out
* of the application or use of any product or circuit described herein. Cypress
* does not authorize its products for use as critical components in life-support
* systems where a malfunction or failure may reasonably be expected to result in
* significant injury to the user. The inclusion of Cypress' product in a life-
* support systems application implies that the manufacturer assumes all risk of
* such use and in doing so indemnifies Cypress against all charges. Use may be
* limited by and subject to the applicable Cypress software license agreement.
*******************************************************************************/

#if !defined(CY_CAPSENSE_CSD_H)

#define CY_CAPSENSE_CSD_H

#include "CSD_Configuration.h"
#include "CSD_Control.h"
#include "CSD_Filter.h"
#include "CSD_Processing.h"
#include "CSD_Sensing.h"
#if (CSD_ENABLE == CSD_CSD_EN)
    #include "CSD_SensingCSD_LL.h"
#endif /* (CSD_ENABLE == CSD_CSD_EN) */
#if (CSD_ENABLE == CSD_CSD2X_EN)
    #include "CSD_SensingCSD2X_LL.h"
#endif /* (CSD_ENABLE == CSD_CSD2X_EN) */
#if (CSD_ENABLE == CSD_CSX_EN)
    #include "CSD_SensingCSX_LL.h"
#endif /* (CSD_ENABLE == CSD_CSX_EN) */
#include "CSD_Structure.h"
#include "CSD_Tuner.h"

#endif /* End CY_CAPSENSE_CSD_H */

/* [] END OF FILE */


text:
<?php

	/**
	 * Usually, this is the path in which krome resides. This particular constant
	 * is only used within this file, and therfore doesn't need to exist unless
	 * another definition in this file is referencing it. No other files should
	 * be using this definition.
	 **/
	define( 'KROME_BASEPATH',                   realpath( dirname(__FILE__) ) . '/' );

	/**
	 * The file extension that your server is using for PHP files. This is
	 * almost always set to .php and as so, doesn't need changing. If this is
	 * changed, files will have to be renamed also.
	 **/
	define( 'KROME_FILEEXT',                    '.php' );

	/**
	 * The directory containing all components that Krome should be using.
	 **/
	define( 'KROME_COMPONENTDIR',               KROME_BASEPATH . 'components/' );

	/**
	 * The directory containing all applications that Krome will be able to
	 * execute.
	 **/
	define( 'KROME_APPLICATIONS_DIR',           KROME_BASEPATH . 'applications/' );

	/**
	 * The name of the class that the system uses to manage components. If this is
	 * changed, most standard libraries will not work correctly.
	 **/
	define( 'KROME_COMPONENTMANAGER_CLASSNAME', 'CKromeComponentManager' );

	/**
	 * The classname of Krome's exception object.
	 **/
	define( 'KROME_EXCEPTION_CLASSNAME',        'CKromeException' );

	/**
	 * Assigned a boolean value depending on if Krome is running in a CLI or an
	 * HTTP environment.
	 **/
	define( 'KROME_CLI',                        !isset($_SERVER['HTTP_HOST']) );

	$applications = Array(
	                   'Example'  => true
	                     );
?>


text: {{ error }}


text:
autogenerate mocha-tests from a swagger spec

## Usage
```bash
docker pull luckymark/swagger-test
docker run -it -v ${PWD}/apitest:/home/apitest luckymark/swagger-test node ./dist/src/app.js -a ${url-of-spec or filename} -s ${url-root-of-api-server}

ls ./apitest
```
then you can run test:
```bash
docker run -it -v ${PWD}/apitest:/home/apitest luckymark/swagger-test npm run apitest
```

## please check: [sample.yml](./test/spec/sample.yml)


text:
<?xml version="1.0" encoding="utf-8"?>
<com.chenantao.autolayout.AutoFrameLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:emojicon="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:descendantFocusability="beforeDescendants"
    android:focusableInTouchMode="true"
    android:orientation="vertical">

    <com.rockerhieu.emojicon.EmojiconEditText
        android:clickable="true"
        android:inputType="textMultiLine"
        android:minLines="10"
        android:id="@+id/etMessage"
        style="@style/mid_black"
        android:layout_width="match_parent"
        android:layout_height="1000px"
        android:background="@null"
        android:hint="写出你的标题..."
        android:gravity="left|top"
        android:paddingLeft="10px"
        android:paddingTop="5px"
        emojicon:emojiconSize="28sp"/>

    <include
        layout="@layout/include_write_msg_tool_box"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_gravity="bottom"/>
</com.chenantao.autolayout.AutoFrameLayout>


text:
using namespace ColorScrollWithViewModel;

using namespace Platform;
using namespace Windows::UI;
using namespace Windows::UI::Xaml::Data;
using namespace Windows::UI::Xaml::Media;

RgbViewModel::RgbViewModel()
{
    this->color = ColorHelper::FromArgb(255, 0, 0, 0);
}

void RgbViewModel::Red::set(double value)
{
    if (red != value)
    {
        red = value;
        OnPropertyChanged("Red");
        Calculate();
    }
}

double RgbViewModel::Red::get()
{
    return red;
}

void RgbViewModel::Green::set(double value)
{
    if (green != value)
    {
        green = value;
        OnPropertyChanged("Green");
        Calculate();
    }
}

double RgbViewModel::Green::get()
{
    return green;
}

void RgbViewModel::Blue::set(double value)
{
    if (blue != value)
    {
        blue = value;
        OnPropertyChanged("Blue");
        Calculate();
    }
}

double RgbViewModel::Blue::get()
{
    return blue;
}

Color RgbViewModel::Color::get()
{
    return color;
}

void RgbViewModel::Calculate()
{
    this->color = ColorHelper::FromArgb(255, unsigned char(this->Red),
                                             unsigned char(this->Green),
                                             unsigned char(this->Blue));
    OnPropertyChanged("Color");
}

void RgbViewModel::OnPropertyChanged(String^ propertyName)
{
    PropertyChanged(this, ref new PropertyChangedEventArgs(propertyName));
}