FreeFem 3.5.x
Public Member Functions | Public Attributes | List of all members
fem::AAcreal Class Reference

Public Member Functions

 AAcreal (long=0)
 
 AAcreal (const AAcreal &)
 
void destroy ()
 
Acrealoperator[] (long i)
 
Acrealoperator& ()
 
void init (long)
 

Public Attributes

long szz
 
Acrealcc
 

Constructor & Destructor Documentation

◆ AAcreal() [1/2]

fem::AAcreal::AAcreal ( long  sz = 0)
385{
386 cc = 0;
387 if (sz > 0)
388 {
389 cc = new Acreal[sz];
390 if (!cc)
391 erreur ("Out of Memory");
392 for (int i = 0; i < sz; i++)
393 cc[i] = 0;
394 };
395 szz = sz;
396}

◆ AAcreal() [2/2]

fem::AAcreal::AAcreal ( const AAcreal a)
398{
399 cc = 0;
400 if (a.szz > 0)
401 {
402 szz = a.szz;
403 cc = new Acreal[szz];
404 if (!cc)
405 erreur ("Out of Memory");
406 else
407 for (int i = 0; i < szz; i++)
408 cc[i] = a.cc[i];
409 }
410 else
411 {
412 cc = NULL;
413 szz = 0;
414 }
415}

◆ ~AAcreal()

fem::AAcreal::~AAcreal ( )
inline
400{ delete [] cc;cc=0;szz = 0;}

Member Function Documentation

◆ destroy()

void fem::AAcreal::destroy ( )
inline
401{delete [] cc;cc=0;szz = 0;}

◆ init()

void fem::AAcreal::init ( long  newSize)
418{
419 myassert (!(szz || cc));
420 szz = newSize;
421 cc = new Acreal[szz];
422 if (!cc)
423 erreur ("Out of Memory");
424 for (int i = 0; i < szz; i++)
425 cc[i] = 0;
426}

◆ operator&()

Acreal * fem::AAcreal::operator& ( )
inline
403{ return cc;}

◆ operator[]()

Acreal & fem::AAcreal::operator[] ( long  i)
inline
402{ /*myassert((i< szz)&&(i>=0));*/ return cc[i];}

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

This is the FreeFEM reference manual
Provided by The KFEM project