Coconut Framework  beta
Classes | Enumerations | Functions
CNTextElement.h File Reference

Define CNTextElement class. More...

#include "CNObject.h"
#include <stdio.h>

Go to the source code of this file.

Classes

struct  CNTextElement
 Element of CNText. More...
 
struct  CNTextElementMethods
 

Enumerations

enum  CNTextElementKind { CNTextSectionElement, CNTextLineElement }
 Type of element of text.
 

Functions

static struct CNTextElementCNAllocateTextElement (CNTextElementKind kind, size_t objsize, const struct CNTextElementMethods *methods, struct CNResource *resource)
 Allocate text element. More...
 
static struct CNObjectCNObjectOfTextElement (struct CNTextElement *src)
 Get super class of text element. More...
 
static void CNRetainTextElement (struct CNTextElement *dst)
 Retain the reference count. More...
 
static void CNReleaseTextElement (struct CNTextElement *dst)
 Release the reference count. More...
 
static void CNPrintTextElement (FILE *outfp, unsigned int level, const struct CNTextElement *src)
 Print text element. More...
 

Detailed Description

Define CNTextElement class.

Copyright
Copyright (C) 2013 Steel Wheels Project

Function Documentation

static struct CNTextElement* CNAllocateTextElement ( CNTextElementKind  kind,
size_t  objsize,
const struct CNTextElementMethods methods,
struct CNResource *  resource 
)
static

Allocate text element.

Returns
Text element
Parameters
kindKind of text element
objsizeSize of object
methodsMethods for the source element
resourceResource to allocate the section

References CNAllocateObject(), CNTextElement::elementKind, and CNTextElementMethods::superClass.

static struct CNObject* CNObjectOfTextElement ( struct CNTextElement src)
static

Get super class of text element.

Returns
CNObject object
Parameters
srcSource text element

References CNTextElement::superClass.

Referenced by CNObjectOfTextLine(), and CNObjectOfTextSection().

static void CNRetainTextElement ( struct CNTextElement dst)
inlinestatic

Retain the reference count.

Parameters
dstDestination text element

References CNRetainObject(), and CNTextElement::superClass.

Referenced by CNRetainTextLine(), and CNRetainTextSection().

static void CNReleaseTextElement ( struct CNTextElement dst)
inlinestatic

Release the reference count.

Parameters
dstDestination text element

References CNReleaseObject(), and CNTextElement::superClass.

Referenced by CNReleaseTextLine(), and CNReleaseTextSection().

static void CNPrintTextElement ( FILE *  outfp,
unsigned int  level,
const struct CNTextElement src 
)
inlinestatic

Print text element.

Parameters
outfpOutput file stream
levelIndent level
srcSource text element

References CNMethodsOfObject(), CNTextElementMethods::printFunc, and CNTextElement::superClass.